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) {
showAds();
fakeBox._visible = false;
}
}
function showAds() {
trace("showing");
var _local1 = "2747QFC7CAEC0";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + _local1);
}
urls_allowed = ["flashgamelicense.com", "www.flashgamelicense.com", "i.notdoppler.com", "www.notdoppler.com", "notdoppler.com", "www.bubblebox.com", "bubblebox.com", "www.freeonlinegames.com", "freeonlinegames.com", "www.addictinggames.com", "addictinggames.com"];
sitelock(urls_allowed);
function onEnterFrame() {
loaded_txt.text = ("Loading... (" + percentage) + ")";
percentage = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
if (((_root.getBytesLoaded() / _root.getBytesTotal()) >= 1) && (timer <= 0)) {
clearInterval(countdownInterval);
delete this.onEnterFrame;
loadingbox._visible = true;
playbtn._visible = true;
}
}
loadingbox._visible = false;
playbtn._visible = false;
stop();
timer = 3;
countdown = function () {
timer--;
if (timer == 0) {
clearInterval(countdownInterval);
}
};
countdownInterval = setInterval(countdown, 1000);
stop();
Instance of Symbol 152 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 176 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 176 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 176 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 176 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 152 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 152 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 176 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 152 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 176 MovieClip in Frame 1
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndPlay(Math.round(Math.random() * this._totalframes) + 1);
}
Instance of Symbol 183 MovieClip "loadingbox" in Frame 1
on (release) {
_root.notdopplerintro.gotoAndPlay(2);
this.enabled = false;
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 190 MovieClip in Frame 1
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
on (rollOut) {
this.gotoAndStop(1);
}
Frame 2
var upgradesound = new Sound(this);
upgradesound.attachSound("upgradesound");
var zombiesound = new Sound(this);
zombiesound.attachSound("zombiesound");
var forestsound = new Sound(this);
forestsound.attachSound("forestsound");
var bgsound = new Sound(this);
bgsound.attachSound("bgsound");
Frame 3
var fleshsound = new Sound(this);
fleshsound.attachSound("fleshsound");
var gatesound = new Sound(this);
gatesound.attachSound("gatesound");
var swampsound = new Sound(this);
swampsound.attachSound("swampsound");
var clicksound = new Sound(this);
clicksound.attachSound("clicksound");
var hoversound = new Sound(this);
hoversound.attachSound("hoversound");
var errorsound = new Sound(this);
errorsound.attachSound("errorsound");
var registersound = new Sound(this);
registersound.attachSound("registersound");
var gunsound = new Sound(this);
gunsound.attachSound("gunsound");
var machgunsound = new Sound(this);
machgunsound.attachSound("machgunsound");
var flamesound = new Sound(this);
flamesound.attachSound("flamesound");
var crashsound = new Sound(this);
crashsound.attachSound("crashsound");
var elecsound = new Sound(this);
elecsound.attachSound("elecsound");
var snipersound = new Sound(this);
snipersound.attachSound("snipersound");
var reloadsound = new Sound(this);
reloadsound.attachSound("reloadsound");
var gatlingsound = new Sound(this);
gatlingsound.attachSound("gatlingsound");
var coinsound = new Sound(this);
coinsound.attachSound("coinsound");
var hoversound = new Sound(this);
hoversound.attachSound("hoversound");
var upgradesound = new Sound(this);
upgradesound.attachSound("upgradesound");
var zombiesound = new Sound(this);
zombiesound.attachSound("zombiesound");
var forestsound = new Sound(this);
forestsound.attachSound("forestsound");
var bgsound = new Sound(this);
bgsound.attachSound("bgsound");
stopAllSounds();
upgradesound.start(0, 999);
Mouse.show();
tiponce = false;
_root.wavecomplete.removeMovieClip();
_quality = "HIGH";
_root.prev = "MEDS";
_root.shooter._visible = false;
pause_mc.gotoAndStop(1);
var score = 0;
var coins = 0;
var crateHeight = 70;
stop();
restart = false;
gameOver_mc.removeMovieClip();
removeMovieClip(wavePresent);
var dadTimer = 0;
var sisTimer = 0;
var sisDamage = 3;
var sisSpeed = 35;
var dadAllyBought = false;
var momAllyBought = false;
var sisAllyBought = false;
sisbullet.removeMovieClip();
var crate1full = false;
var crate2full = false;
var crate3full = false;
var pistolbought = true;
var machinegunbought = false;
var shotgunbought = false;
var gatlinggunbought = false;
var sniperbought = false;
var pulsegunbought = false;
var flamethrowerbought = false;
var pistolselected = true;
var machinegunselected = false;
var shotgunselected = false;
var gatlinggunselected = false;
var sniperselected = false;
var pulsegunselected = false;
var flamethrowerselected = false;
var stats1Inc = 50;
var tinyDrop = 9;
var smallDrop = 14;
var mediumDrop = 17;
var bigDrop = 33;
var hugeDrop = 77;
var maxDrop = 223;
var midbossDrop = 1000;
var quickSpeed = 9;
var fastSpeed = 5;
var normalSpeed = 3.5;
var joggingSpeed = 1.5;
var walkSpeed = 0.9;
var slowSpeed = 0.6;
var elephantTime = 200;
var turtleHealth = 30;
var turtleHealth2 = 999;
var eagleHealth = 6;
var monkeyHealth = 4;
var monkeyHealth2 = 12;
var kangarooHealth = 5;
var kangarooHealth2 = 20;
var pandaHealth = 6;
var elephantHealth = 5;
var elephantHealth2 = 60;
var rabbitHealth = 5;
var rabbitHealth2 = 10;
var polarHealth = 180;
var hippoHealth = 25;
var hippoTime = 140;
var lionHealth = 30;
var bearHealth = 120;
var snakeHealth = 12;
var rhinoHealth = 350;
var gorillaHealth = 120;
var crocodileHealth = 30;
var bossHealth = 1500;
var bossTime = 1000;
var bossTime2 = 400;
var weaponDatabase = new Array();
var tempWeapon = {itemName:"Pistol", itemDesc:"Aren't you glad you brought this all along?", itemCost:"", bulletNumber:1, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:99999, bulletAmmo:99999, bulletClip:99999, bulletDamage:1, bulletOffset:0, bulletSpeed:35, bulletMaxAge:99999, barrelLength:20, reloadComplete:true, pistolon:true, machinegunon:false, gatlingunon:false, sniperon:false, shotgunon:false, flamethroweron:false, pulsegunon:false, upgradeCrateOn:false, buyCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, repairCrateOn:false, reloadSpeed:600, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Shotgun", itemDesc:"Shower them with hate and tell them they are not welcome in your camp.", itemCost:500, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:stats1Inc, bulletNumber:3, bulletAmmo:9, bulletClip:9, bulletDamage:3, bulletOffset:23, bulletSpeed:20, bulletMaxAge:99999, barrelLength:35, reloadComplete:true, pistolon:false, machinegunon:false, sniperon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false, shotgunon:true, upgradeCrateOn:false, buyCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, repairCrateOn:false, reloadSpeed:900, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Machine Gun", itemDesc:"This is a fine gun for taking out zombies anytime of the day.", itemCost:300, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:stats1Inc, bulletNumber:0.5, bulletAmmo:30, bulletClip:30, bulletDamage:1, bulletOffset:0, bulletSpeed:45, bulletMaxAge:99999, barrelLength:38, reloadComplete:true, pistolon:false, sniperon:false, machinegunon:true, gatlingunon:false, flamethroweron:false, pulsegunon:false, shotgunon:false, buyCrateOn:false, repairCrateOn:false, upgradeCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, reloadSpeed:360, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Gatling Gun", itemDesc:"Be sure you know how to handle this big baby.", itemCost:3000, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:stats1Inc, bulletNumber:1, bulletAmmo:60, bulletClip:60, bulletDamage:2, bulletOffset:0, bulletSpeed:50, bulletMaxAge:99999, barrelLength:65, reloadComplete:true, pistolon:false, gatlingunon:true, machinegunon:false, shotgunon:false, flamethroweron:false, pulsegunon:false, buyCrateOn:false, repairCrateOn:false, upgradeCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, reloadSpeed:260, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Sniper", itemDesc:"One shot, boom! Pow! Limited clips though.", itemCost:1500, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:stats1Inc, bulletNumber:1, bulletAmmo:8, bulletClip:8, bulletDamage:9, bulletOffset:0, bulletSpeed:25, bulletMaxAge:99999, barrelLength:38, reloadComplete:true, machinegunon:false, pistolon:false, gatlingunon:false, sniperon:true, flamethroweron:false, shotgunon:false, pulsegunon:false, buyCrateOn:false, repairCrateOn:false, upgradeCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, reloadSpeed:900, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Pulse Gun", itemDesc:"The future has brought us more weapons of destruction!", itemCost:3500, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:99999, bulletNumber:1, bulletAmmo:99999, bulletClip:99999, bulletDamage:20, bulletOffset:0, bulletSpeed:0, bulletMaxAge:200, barrelLength:35, reloadComplete:true, machinegunon:false, pistolon:false, sniperon:false, shotgunon:false, flamethroweron:false, gatlingunon:false, pulsegunon:true, buyCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, upgradeCrateOn:false, repairCrateOn:false, reloadSpeed:1800, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Flamethrower", itemDesc:"If killing is not enough, you got to do it with style.", itemCost:6000, stats1Cost:stats1Inc, stats2Cost:stats1Inc, stats3Cost:stats1Inc, bulletNumber:1, bulletAmmo:60, bulletClip:60, bulletDamage:1, bulletOffset:0, bulletSpeed:15, bulletMaxAge:999, barrelLength:35, reloadComplete:true, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:true, buyCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, upgradeCrateOn:false, repairCrateOn:false, reloadSpeed:250, reloadTimer:0};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Repair Crate", itemDesc:"Fix your bottom to save the day!", itemCost:50, buyCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, repairCrateOn:true, upgradeCrateOn:false, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Buy Crate", itemDesc:"Replace a lost crate for defense.", itemCost:250, buyCrateOn:true, buyMomOn:false, buyDadOn:false, buySisOn:false, upgradeCrateOn:false, repairCrateOn:false, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Hire Mom", itemDesc:"Mom has the power to attract money.", itemCost:100, buyCrateOn:false, buyMomOn:true, buyDadOn:false, buySisOn:false, upgradeCrateOn:false, repairCrateOn:false, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Hire Dad", itemDesc:"Dad the handyman repairs damaged crates too!", itemCost:300, buyCrateOn:false, buyMomOn:false, buyDadOn:true, buySisOn:false, upgradeCrateOn:false, repairCrateOn:false, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Hire Sis", itemDesc:"Sister provides offensive support!", itemCost:500, buyCrateOn:false, upgradeCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:true, repairCrateOn:false, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false};
weaponDatabase.push(tempWeapon);
var tempWeapon = {itemName:"Upgrade Crate", itemDesc:"Fortify your defense by increasing the crate's HP.", itemCost:1000, upgradeCrateOn:true, buyCrateOn:false, buyMomOn:false, buyDadOn:false, buySisOn:false, repairCrateOn:false, pistolon:false, sniperon:false, machinegunon:false, shotgunon:false, gatlingunon:false, pulsegunon:false, flamethroweron:false};
weaponDatabase.push(tempWeapon);
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("89359ba6", this, 10301, true);
function gotoMysSite() {
getURL ("http://www.andkon.com/arcade/", "_blank");
}
function gotoHisSite() {
getURL ("http://www.andkon.com/arcade/", "_blank");
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
Instance of Symbol 1563 MovieClip in Frame 3
on (release) {
getURL ("http://www.astiggames.com/", "_blank");
}
Instance of Symbol 190 MovieClip in Frame 3
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
on (rollOut) {
this.gotoAndStop(1);
}
Frame 4
function showMessage() {
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
}
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function createBullet() {
var _local3 = 0;
while (_local3 < playerWeapon.bulletNumber) {
var _local2 = _root.attachMovie("bullet", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local2.cacheAsBitmap = true;
if (playerWeapon.flamethroweron) {
_local2.gotoAndStop(2);
}
if ((!playerWeapon.flamethroweron) || (!playerWeapon.shotgunon)) {
_local2._rotation = Math.atan2(_ymouse - player_mc._y, _xmouse - player_mc._x) * radians2;
}
if (playerWeapon.gatlingunon) {
_local2.gotoAndStop(3);
}
if (playerWeapon.shotgunon) {
_local2.gotoAndStop(4);
}
if (playerWeapon.machinegunon) {
_local2.gotoAndStop(4);
}
if (playerWeapon.machinegunon) {
_local2.gotoAndStop(5);
}
if (playerWeapon.pulsegunon) {
_local2._x = _xmouse;
_local2._y = _ymouse;
} else {
_local2._x = player_mc._x + (playerWeapon.barrelLength * Math.cos(player_mc._rotation * radians));
_local2._y = player_mc._y + (playerWeapon.barrelLength * Math.sin(player_mc._rotation * radians));
}
var _local5 = random(playerWeapon.bulletOffset) - (playerWeapon.bulletOffset / 2);
var _local4 = (player_mc._rotation + _local5) * radians;
_local2.xSpeed = Math.cos(_local4) * playerWeapon.bulletSpeed;
_local2.ySpeed = Math.sin(_local4) * playerWeapon.bulletSpeed;
if (playerWeapon.pulsegunon) {
_local2.lifeTimer = setInterval(destroyBullet, playerWeapon.bulletMaxAge, _local2);
}
bulletArray.push(_local2);
_local3++;
}
startReloading();
}
function startReloading() {
playerWeapon.reloadComplete = false;
playerWeapon.reloadTimer = setInterval(gunReloaded, playerWeapon.reloadSpeed);
screenTimer = setInterval(this, "clearScreen", clearSpeed);
}
function gunReloaded() {
clearInterval(playerWeapon.reloadTimer);
playerWeapon.reloadComplete = true;
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function destroyBullet(_bullet) {
var _local1 = 0;
while (_local1 < bulletArray.length) {
flameLifeCount = 0;
var _local2 = bulletArray[_local1];
if (_local2 == _bullet) {
bulletArray.splice(_local1, 1);
if (playerWeapon.pulsegunon) {
clearInterval(_local2.lifeTimer);
}
removeMovieClip(_local2);
}
_local1++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function gameoverHit(_bullet) {
if (gameOver) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this._x = this._x + (this.yspeed * 8);
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
this.attackTime++;
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 5)) {
if (bellTotal2 > 5) {
bellLimit2 = 150;
}
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = joggingSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this._x = this._x + (this.yspeed * 8);
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
this.attackTime++;
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
}
function rotatePlayer() {
if (_xmouse >= (player_mc._x + 60)) {
player_mc._rotation = Math.atan2(_ymouse - player_mc._y, _xmouse - player_mc._x) * radians2;
sisbow1._rotation = Math.atan2(_ymouse - sisbow1._y, _xmouse - sisbow1._x) * radians2;
sisbow2._rotation = Math.atan2(_ymouse - sisbow2._y, _xmouse - sisbow2._x) * radians2;
sisbow3._rotation = Math.atan2(_ymouse - sisbow3._y, _xmouse - sisbow3._x) * radians2;
}
}
function shakeScreen() {
shaker.play();
}
finalwave = false;
if (restart) {
continueGame();
}
var crates = 3;
var flameLifeCount = 0;
var momAllyOn = false;
var dadAllyOn = false;
var momCrate1on = false;
var momCrate2on = false;
var momCrate3on = false;
var dadCrate1on = false;
var dadCrate2on = false;
var dadCrate3on = false;
var sisCrate1on = false;
var sisCrate2on = false;
var sisCrate3on = false;
var momPlaced = false;
var dadPlaced = false;
var sisPlaced = false;
var towerLife = 50;
var towerLifeOrig = 50;
var restart = false;
var waveNumber = 1;
var firstplay = true;
var showmessage = false;
showmessage_mc.gotoAndPlay(2);
var sisbow1_origy = sisbow1._y;
var sisbow2_origy = sisbow2._y;
var sisbow3_origy = sisbow3._y;
var crate1_origy = crate1._y;
var crate2_origy = crate2._y;
var crate3_origy = crate3._y;
var ally_crate1_origy = ally_crate1._y;
var ally_crate2_origy = ally_crate2._y;
var ally_crate3_origy = ally_crate3._y;
var player_mc_origy = player_mc._y;
var player_anim_origy = player_anim._y;
var head_mc_origy = head_mc._y;
var winonce = false;
var totalEnemiesGoal = 19;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTop = 740;
var bellTime = -480;
var bellLimit = 250;
var bellTotal = 0;
var bellTime2 = -40;
var bellLimit2 = 100;
var bellTotal2 = 0;
var bellTime3 = 520;
var bellLimit3 = 850;
var bellTotal3 = 0;
var bellTime13 = 20;
var bellLimit13 = 50;
var bellTotal13 = 0;
var bulletArray = new Array();
var enemyArray = new Array();
var playerWeapon = new Object();
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
loadWeapon("Pistol");
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
function showIconHow() {
notYet_mc.gotoAndStop(3);
}
function showNotYet() {
notYet_mc.gotoAndStop(2);
}
function massKill() {
i = 0;
while (i < 99) {
_root.bellHolder["bell_a" + i].gotoAndStop(2);
_root.bellHolder["coinbell_a" + i].removeMovieClip();
_root.bellHolder["barbell_a" + i].removeMovieClip();
_root.bellHolder["bloodbell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 99) {
_root.bellHolder["bell_b" + g].gotoAndStop(2);
_root.bellHolder["coin2bell_b" + g].removeMovieClip();
_root.bellHolder["bar2bell_b" + g].removeMovieClip();
_root.bellHolder["blood2bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 99) {
_root.bellHolder["bell_c" + h].gotoAndStop(2);
_root.bellHolder["coin3bell_c" + h].removeMovieClip();
_root.bellHolder["bar3bell_c" + h].removeMovieClip();
_root.bellHolder["blood3bell_c" + h].removeMovieClip();
_root.bellHolder["enembulletbell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 99) {
_root.bellHolder["bell_d" + j].gotoAndStop(2);
_root.bellHolder["coin4bell_d" + j].removeMovieClip();
_root.bellHolder["bar4bell_d" + j].removeMovieClip();
_root.bellHolder["blood4bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 99) {
_root.bellHolder["bell_e" + k].gotoAndStop(2);
_root.bellHolder["coin5bell_e" + k].removeMovieClip();
_root.bellHolder["bar5bell_e" + k].removeMovieClip();
_root.bellHolder["blood5bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 99) {
_root.bellHolder["bell_f" + l].gotoAndStop(2);
_root.bellHolder["coin6bell_f" + l].removeMovieClip();
_root.bellHolder["bar6bell_f" + l].removeMovieClip();
_root.bellHolder["blood6bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 99) {
_root.bellHolder["bell_g" + m].gotoAndStop(2);
_root.bellHolder["coin7bell_g" + m].removeMovieClip();
_root.bellHolder["bar7bell_g" + m].removeMovieClip();
_root.bellHolder["blood7bell_g" + m].removeMovieClip();
m++;
}
o = 0;
while (o < 99) {
_root.bellHolder["bell_i" + o].gotoAndStop(2);
_root.bellHolder["coin9bell_i" + o].removeMovieClip();
_root.bellHolder["bar9bell_i" + o].removeMovieClip();
_root.bellHolder["blood9bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 99) {
_root.bellHolder["bell_j" + p].gotoAndStop(2);
_root.bellHolder["coin10bell_j" + p].removeMovieClip();
_root.bellHolder["bar10bell_j" + p].removeMovieClip();
_root.bellHolder["blood10bell_j" + p].removeMovieClip();
p++;
}
q = 0;
while (q < 99) {
_root.bellHolder["bell_z" + q].gotoAndStop(2);
_root.bellHolder["coin13bell_z" + q].removeMovieClip();
_root.bellHolder["bar13bell_z" + q].removeMovieClip();
_root.bellHolder["blood13bell_z" + q].removeMovieClip();
q++;
}
r = 0;
while (r < 999) {
_root.bellHolder["bullet" + r].removeMovieClip();
r++;
}
}
function continueGame() {
_root.gameOver = false;
_root.bgsound.start(0, 99);
_root.forestsound.start(0, 99);
winonce = false;
life_mc.bar_mc._x = -15;
r = 0;
while (r < 999) {
_root.bellHolder["bullet" + r].removeMovieClip();
r++;
}
towerLife = towerLifeOrig;
_root.gamewononce = false;
sisbow1.gotoAndStop(1);
sisbow2.gotoAndStop(1);
sisbow3.gotoAndStop(1);
_root.crate1full = false;
_root.crate2full = false;
_root.crate3full = false;
_root.nextFrame();
_root.playerWeapon.bulletAmmo = _root.playerWeapon.bulletClip;
_root.clip_mc.bar_mc._x = -15;
_root.reloadingNow = false;
_root.changeWeapon = false;
_root.reloadsound.start(0, 1);
_root.bulletAmmoCounter = 0;
_root.crate1full = false;
_root.crate2full = false;
_root.crate3full = false;
wall.gotoAndStop(1);
crate1.gotoAndStop(1);
crate2.gotoAndStop(1);
crate3.gotoAndStop(1);
ally_crate1.gotoAndStop(1);
ally_crate2.gotoAndStop(1);
ally_crate3.gotoAndStop(1);
sisbow1._y = sisbow1_origy;
sisbow2._y = sisbow2_origy;
sisbow3._y = sisbow3_origy;
crate1._y = crate1_origy;
crate2._y = crate2_origy;
crate3._y = crate3_origy;
ally_crate1._y = ally_crate1_origy;
ally_crate2._y = ally_crate2_origy;
ally_crate3._y = ally_crate3_origy;
player_mc._y = player_mc_origy;
player_anim._y = player_anim_origy;
head_mc._y = head_mc_origy;
crates = 3;
restart = false;
score = score * 0.75;
score = Math.round(score);
towerLife = towerLifeOrig;
gameOver_mc.removeMovieClip();
i = 0;
while (i < 99) {
_root.bellHolder["bell_a" + i].removeMovieClip();
_root.bellHolder["coinbell_a" + i].removeMovieClip();
_root.bellHolder["barbell_a" + i].removeMovieClip();
_root.bellHolder["bloodbell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 99) {
_root.bellHolder["bell_b" + g].removeMovieClip();
_root.bellHolder["coin2bell_b" + g].removeMovieClip();
_root.bellHolder["bar2bell_b" + g].removeMovieClip();
_root.bellHolder["blood2bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 99) {
_root.bellHolder["bell_c" + h].removeMovieClip();
_root.bellHolder["coin3bell_c" + h].removeMovieClip();
_root.bellHolder["bar3bell_c" + h].removeMovieClip();
_root.bellHolder["blood3bell_c" + h].removeMovieClip();
_root.bellHolder["enembulletbell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 99) {
_root.bellHolder["bell_d" + j].removeMovieClip();
_root.bellHolder["coin4bell_d" + j].removeMovieClip();
_root.bellHolder["bar4bell_d" + j].removeMovieClip();
_root.bellHolder["blood4bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 99) {
_root.bellHolder["bell_e" + k].removeMovieClip();
_root.bellHolder["coin5bell_e" + k].removeMovieClip();
_root.bellHolder["bar5bell_e" + k].removeMovieClip();
_root.bellHolder["blood5bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 99) {
_root.bellHolder["bell_f" + l].removeMovieClip();
_root.bellHolder["coin6bell_f" + l].removeMovieClip();
_root.bellHolder["bar6bell_f" + l].removeMovieClip();
_root.bellHolder["blood6bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 99) {
_root.bellHolder["bell_g" + m].removeMovieClip();
_root.bellHolder["coin7bell_g" + m].removeMovieClip();
_root.bellHolder["bar7bell_g" + m].removeMovieClip();
_root.bellHolder["blood7bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 99) {
_root.bellHolder["bell_h" + n].removeMovieClip();
_root.bellHolder["coin8bell_h" + n].removeMovieClip();
_root.bellHolder["bar8bell_h" + n].removeMovieClip();
_root.bellHolder["blood8bell_h" + n].removeMovieClip();
_root.bellHolder["enembulletbell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 99) {
_root.bellHolder["bell_i" + o].removeMovieClip();
_root.bellHolder["coin9bell_i" + o].removeMovieClip();
_root.bellHolder["bar9bell_i" + o].removeMovieClip();
_root.bellHolder["blood9bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 99) {
_root.bellHolder["bell_j" + p].removeMovieClip();
_root.bellHolder["coin10bell_j" + p].removeMovieClip();
_root.bellHolder["bar10bell_j" + p].removeMovieClip();
_root.bellHolder["blood10bell_j" + p].removeMovieClip();
p++;
}
q = 0;
while (q < 99) {
_root.bellHolder["bell_z" + q].removeMovieClip();
_root.bellHolder["coin13bell_z" + q].removeMovieClip();
_root.bellHolder["bar13bell_z" + q].removeMovieClip();
_root.bellHolder["blood13bell_z" + q].removeMovieClip();
q++;
}
}
_root.scoretosend = 0;
weaponbar.weaponbar.weapon1.gotoAndStop(2);
var pressed23 = false;
var prev1 = "UNPAUSED";
_root.shooter._visible = true;
_root.bgsound.start(0, 99);
forestsound.start(0, 99);
_root.zombiesound.start(0, 1);
soundPlay = new Sound(this);
max = 3;
min = 1;
rndClip = Math.round(Math.random() * (max - min)) + min;
soundPlay.attachSound(rndClip);
var gpause = false;
_root.onEnterFrame = function () {
if (playerWeapon.flamethroweron) {
weaponbar.weaponbar.weapon7.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon7.gotoAndStop(1);
}
if (playerWeapon.pulsegunon) {
weaponbar.weaponbar.weapon6.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon6.gotoAndStop(1);
}
if (playerWeapon.sniperon) {
weaponbar.weaponbar.weapon4.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon4.gotoAndStop(1);
}
if (playerWeapon.gatlingunon) {
weaponbar.weaponbar.weapon5.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon5.gotoAndStop(1);
}
if (playerWeapon.shotgunon) {
weaponbar.weaponbar.weapon3.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon3.gotoAndStop(1);
}
if (playerWeapon.machinegunon) {
weaponbar.weaponbar.weapon2.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon2.gotoAndStop(1);
}
if (playerWeapon.pistolon) {
weaponbar.weaponbar.weapon1.gotoAndStop(2);
} else {
weaponbar.weaponbar.weapon1.gotoAndStop(1);
}
weaponbar.weaponbar.macRem.text = "Enemies left: " + ((totalEnemiesGoal - totalKillsCount) + 1);
if (_root.momAllyBought && (!momPlaced)) {
momIcon.gotoAndStop(1);
} else {
momIcon.gotoAndStop(2);
}
if (_root.dadAllyBought && (!dadPlaced)) {
dadIcon.gotoAndStop(1);
} else {
dadIcon.gotoAndStop(2);
}
if (_root.sisAllyBought && (!sisPlaced)) {
sisIcon.gotoAndStop(1);
} else {
sisIcon.gotoAndStop(2);
}
if ((momCrate1on || (momCrate2on)) || (momCrate3on)) {
momAllyOn = true;
} else {
momAllyOn = false;
}
if ((dadCrate1on || (dadCrate2on)) || (dadCrate3on)) {
dadAllyOn = true;
} else {
dadAllyOn = false;
}
if ((sisCrate1on || (sisCrate2on)) || (sisCrate3on)) {
sisAllyOn = true;
} else {
sisAllyOn = false;
}
weaponbar.weaponbar.scoreTxt.text = "Score: " + _root.score;
if ((Key.isDown(80) && (!winonce)) && (!gameOver)) {
if (pressed23 == false) {
if (prev1 == "PAUSED") {
_root.gpause = false;
prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if (prev1 == "UNPAUSED") {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
prev1 = "PAUSED";
}
}
pressed23 = true;
} else {
pressed23 = false;
}
if (!gpause) {
radians = (Math.PI/180);
bulletAngle1 = sisbow1._rotation * radians;
bulletAngle2 = sisbow2._rotation * radians;
bulletAngle3 = sisbow3._rotation * radians;
ally_crate1.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = sisbow1._x + (30 * Math.cos(sisbow1._rotation * radians));
sisbullet._y = sisbow1._y + (30 * Math.sin(sisbow1._rotation * radians));
sisbow1.bowstrike.gotoAndPlay(2);
sisbullet._rotation = Math.atan2(_ymouse - sisbow1._y, _xmouse - sisbow1._x) * radians2;
sisTimer = 0;
sisbullet.xSpeed = Math.cos(bulletAngle1) * 30;
sisbullet.ySpeed = Math.sin(bulletAngle1) * 30;
sisbullet.onEnterFrame = function () {
if (!gpause) {
this._x = this._x + sisbullet.xSpeed;
this._y = this._y + sisbullet.ySpeed;
}
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate2.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = sisbow2._x + (30 * Math.cos(sisbow2._rotation * radians));
sisbullet._y = sisbow2._y + (30 * Math.sin(sisbow2._rotation * radians));
sisbow2.bowstrike.gotoAndPlay(2);
sisbullet._rotation = Math.atan2(_ymouse - sisbow2._y, _xmouse - sisbow2._x) * radians2;
sisTimer = 0;
sisbullet.xSpeed = Math.cos(bulletAngle2) * 30;
sisbullet.ySpeed = Math.sin(bulletAngle2) * 30;
sisbullet.onEnterFrame = function () {
if (!gpause) {
this._x = this._x + sisbullet.xSpeed;
this._y = this._y + sisbullet.ySpeed;
}
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate3.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = sisbow3._x + (30 * Math.cos(sisbow3._rotation * radians));
sisbullet._y = sisbow3._y + (30 * Math.sin(sisbow3._rotation * radians));
sisbow2.bowstrike.gotoAndPlay(2);
sisbow3.bowstrike.gotoAndPlay(2);
sisbullet._rotation = Math.atan2(_ymouse - sisbow3._y, _xmouse - sisbow3._x) * radians2;
sisTimer = 0;
sisbullet.xSpeed = Math.cos(bulletAngle3) * 30;
sisbullet.ySpeed = Math.sin(bulletAngle3) * 30;
sisbullet.onEnterFrame = function () {
if (!gpause) {
this._x = this._x + sisbullet.xSpeed;
this._y = this._y + sisbullet.ySpeed;
}
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
if ((dadAllyOn && (towerLife < towerLifeOrig)) && (!winonce)) {
dadTimer++;
if (dadTimer > 77) {
towerLife = towerLife + 1;
life_mc.bar_mc._x = life_mc.bar_mc._x - ((1 / towerLifeOrig) * 30);
dadTimer = 0;
if (towerLife > towerLifeOrig) {
towerLife = towerLifeOrig;
life_mc.bar_mc._x = -15;
}
}
}
macCrate.text = "x" + crates;
macLife.text = (towerLife + " / ") + towerLifeOrig;
if ((totalEnemies <= totalEnemiesGoal) && (!gameOver)) {
makeLvl();
}
if (totalKillsCount >= (totalEnemiesGoal + 1)) {
if ((!winonce) && (!finalwave)) {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
mouseClicked = false;
_root.attachMovie("wavecomplete", "wavecomplete", bellHolder.getNextHighestDepth());
wavecomplete._x = -640;
wavecomplete._y = 0;
winonce = true;
_root.notYet_mc.gotoAndStop(1);
}
}
if (mouseClicked && (!playerWeapon.pulsegunon)) {
fireWeapon();
}
if (playerWeapon.gatlingunon && (weaponFired)) {
weaponFired = false;
}
if (playerWeapon.machinegunon && (weaponFired)) {
weaponFired = false;
}
if (playerWeapon.pulsegunon && (weaponFired)) {
weaponFired = false;
}
rotatePlayer();
updateBullets();
macStats1.text = "$" + _root.playerWeapon.stats1Cost;
macStats2.text = "$" + _root.playerWeapon.stats2Cost;
if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macStats3.text = "Max";
} else {
macStats3.text = "$" + _root.playerWeapon.stats3Cost;
}
macName.text = _root.playerWeapon.itemName;
macHand.text = "Handling: " + playerWeapon.bulletOffset;
macDam.text = "Damage: " + playerWeapon.bulletDamage;
macRel.text = "Reload: " + playerWeapon.reloadSpeed;
if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macAmmo.text = "\u221E/\u221E";
} else {
macAmmo.text = (playerWeapon.bulletAmmo + "/") + playerWeapon.bulletClip;
}
CoinTxt.text = "$" + coins;
waveTxt.text = "Wave " + waveNumber;
effectHolder_mc.laser_mc.clear();
if (playerWeapon.bulletAmmo <= 0) {
bulletAmmoCounter++;
clip_mc.bar_mc._x = clip_mc.bar_mc._x + 0.3;
}
if (bulletAmmoCounter >= 100) {
playerWeapon.bulletAmmo = playerWeapon.bulletClip;
var _local3 = new Array();
clip_mc.bar_mc._x = -15;
clearInterval(playerWeapon.reloadTimer);
playerWeapon.reloadTimer = 0;
reloadingNow = false;
changeWeapon = false;
_root.reloadsound.start(0, 1);
bulletAmmoCounter = 0;
}
if (towerLife < 0) {
towerLife = 0;
}
if (towerLife == 0) {
if (crates == 3) {
crate1full = false;
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate1.gotoAndStop(3);
if (momCrate1on) {
momCrate1on = false;
momAllyBought = false;
}
if (dadCrate1on) {
dadCrate1on = false;
dadAllyBought = false;
}
if (sisCrate1on) {
sisCrate1on = false;
sisAllyBought = false;
}
ally_crate1.gotoAndStop(1);
crate2.gotoAndStop(2);
crate2.bounce_mc.gotoAndPlay(2);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
tripod._y = tripod._y + crateHeight;
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
sisbow1.gotoAndStop(1);
sisbow1._y = sisbow1._y + crateHeight;
sisbow2._y = sisbow2._y + crateHeight;
sisbow3._y = sisbow3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 2;
_root.crashsound.start(0, 1);
} else if (crates == 2) {
crate2full = false;
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate2.gotoAndStop(3);
if (momCrate2on) {
momCrate2on = false;
momAllyBought = false;
}
if (dadCrate2on) {
dadCrate2on = false;
dadAllyBought = false;
}
if (sisCrate2on) {
sisCrate2on = false;
sisAllyBought = false;
}
ally_crate2.gotoAndStop(1);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
tripod._y = tripod._y + crateHeight;
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
sisbow1._y = sisbow1._y + crateHeight;
sisbow2._y = sisbow2._y + crateHeight;
sisbow3._y = sisbow3._y + crateHeight;
sisbow2.gotoAndStop(1);
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 1;
_root.crashsound.start(0, 1);
} else if (crates == 1) {
crate3full = false;
crate3.gotoAndStop(3);
sisbow1._y = sisbow1._y + crateHeight;
sisbow2._y = sisbow2._y + crateHeight;
sisbow3._y = sisbow3._y + crateHeight;
sisbow3.gotoAndStop(1);
ally_crate3.gotoAndStop(1);
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
_root.restart = true;
_root.attachMovie("gameOver_mc", "gameOver_mc", _root.getNextHighestDepth());
gameOver_mc._x = -7;
gameOver_mc._y = 0;
Mouse.show();
wall.gotoAndStop(2);
crates = 0;
_root.crashsound.start(0, 1);
if (momCrate3on) {
momCrate3on = false;
momAllyBought = false;
}
if (dadCrate3on) {
dadCrate3on = false;
dadAllyBought = false;
}
if (sisCrate3on) {
sisCrate3on = false;
sisAllyBought = false;
}
}
}
if (Key.isDown(49)) {
loadWeapon("Pistol");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = true;
machinegunselected = false;
shotgunselected = false;
gatlinggunselected = false;
sniperselected = false;
pulsegunselected = false;
flamethrowerselected = false;
}
}
if (Key.isDown(51)) {
if (shotgunbought) {
loadWeapon("Shotgun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = false;
machinegunselected = false;
shotgunselected = true;
gatlinggunselected = false;
sniperselected = false;
pulsegunselected = false;
flamethrowerselected = false;
}
} else {
showNotYet();
}
}
if (Key.isDown(50)) {
if (machinegunbought) {
loadWeapon("Machine Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = false;
machinegunselected = true;
shotgunselected = false;
gatlinggunselected = false;
sniperselected = false;
pulsegunselected = false;
flamethrowerselected = false;
}
} else {
showNotYet();
}
}
if (Key.isDown(52)) {
if (gatlinggunbought) {
loadWeapon("Gatling Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = false;
machinegunselected = false;
shotgunselected = false;
gatlinggunselected = true;
sniperselected = false;
pulsegunselected = false;
flamethrowerselected = false;
}
} else {
showNotYet();
}
}
if (Key.isDown(53)) {
if (sniperbought) {
loadWeapon("Sniper");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = false;
machinegunselected = false;
shotgunselected = false;
gatlinggunselected = false;
sniperselected = true;
pulsegunselected = false;
flamethrowerselected = false;
}
} else {
showNotYet();
}
}
if (Key.isDown(54)) {
if (pulsegunbought) {
loadWeapon("Pulse Gun");
weaponFired = false;
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = false;
machinegunselected = false;
shotgunselected = false;
gatlinggunselected = false;
sniperselected = false;
pulsegunselected = true;
flamethrowerselected = false;
} else {
showNotYet();
}
}
if (Key.isDown(55)) {
if (flamethrowerbought) {
loadWeapon("Flamethrower");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
pistolselected = false;
machinegunselected = false;
shotgunselected = false;
gatlinggunselected = false;
sniperselected = false;
pulsegunselected = false;
flamethrowerselected = true;
}
} else {
showNotYet();
}
}
}
};
upg_btn1.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats1Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats1Cost;
_root.score = _root.score + _root.playerWeapon.stats1Cost;
_root.playerWeapon.stats1Cost = _root.playerWeapon.stats1Cost * 2;
_root.clicksound.start(0, 1);
_root.playerWeapon.bulletDamage = _root.playerWeapon.bulletDamage + 0.5;
macInfo.text = "";
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn2.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats2Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats2Cost;
_root.score = _root.score + _root.playerWeapon.stats2Cost;
_root.clicksound.start(0, 1);
_root.playerWeapon.stats2Cost = _root.playerWeapon.stats2Cost * 2;
if (_root.playerWeapon.pulsegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 150;
} else if (_root.playerWeapon.machinegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.gatlingunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.flamethroweron) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.pistolon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 50;
macInfo.text = "";
}
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn3.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats3Cost) {
macInfo.text = "";
_root.coins = _root.coins - _root.playerWeapon.stats3Cost;
_root.score = _root.score + _root.playerWeapon.stats3Cost;
_root.clicksound.start(0, 1);
_root.playerWeapon.stats3Cost = _root.playerWeapon.stats3Cost * 2;
if (_root.playerWeapon.shotgunon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 9;
} else if (_root.playerWeapon.sniperon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 6;
} else {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 10;
}
} else if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macInfo.text = "Maxed out!";
_root.errorsound.start(0, 1);
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
function addSparkles(_targetX, _targetY, _sparkNumber, _distance, _sparkSize) {
var _local6 = 0;
while (_local6 < _sparkNumber) {
var _local4 = _root.attachMovie("spark", "spark_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local3 = _root.attachMovie("spark2", "spark2_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = (_targetX + random(_distance)) - (_distance / 2);
_local4._y = (_targetY + random(_distance)) - (_distance / 2);
_local3._x = (_targetX + random(_distance)) - (_distance / 2);
_local3._y = (_targetY + random(_distance)) - (_distance / 2);
var _local5 = random(_sparkSize) + (_sparkSize / 4);
_local4._xscale = _local5;
_local4._yscale = _local5;
_local5 = random(_sparkSize) + (_sparkSize / 4);
_local3._xscale = _local5;
_local3._yscale = _local5;
_local3._rotation = random(359);
_local4._alpha = lightningAlpha;
_local3._alpha = lightningAlpha;
_local6++;
}
}
var lightningOffset = 15;
var lightningFrequency = 15;
var lightningWidth = 1;
var lightningColor = "0x5C98EF";
var lightningAlpha = 75;
var lightningBranches = 3;
var sparkNumber = 7;
var sparkDistance = 23;
var sparkSize = 100;
var reloadSpeed = 250;
var clearSpeed = 100;
var glow = (new flash.filters.GlowFilter());
glow.color = 16711680 /* 0xFF0000 */;
glow.alpha = 1;
glow.blurX = 7;
glow.blurY = 7;
glow.quality = 2;
effectHolder_mc.laser_mc.filters = new Array(glow);
var glow_color = lightningColor;
var glow_alpha = 0.6;
var glow_blurX = 5;
var glow_blurY = 5;
var glow_strength = 2;
var glow_quality = 3;
var effectHolder = effectHolder_mc;
var filter_glow = (new flash.filters.GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality));
effectHolder.filters = [filter_glow];
Instance of Symbol 1641 MovieClip "effectHolder_mc" in Frame 4
onClipEvent (load) {
this.useHandCursor = false;
}
Instance of Symbol 1600 MovieClip "shooter" in Frame 4
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (enterFrame) {
this.tabEnabled = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
this.swapDepths(_root.getNextHighestDepth());
if (_root._currentframe == 100) {
removeMovieClip("");
Mouse.show();
}
}
Instance of Symbol 1733 MovieClip "momIcon" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndStop(2);
xMouse1 = this._x;
yMouse1 = this._y;
}
onClipEvent (enterFrame) {
if (!dragged) {
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
on (press) {
dragged = true;
if (!root.winonce) {
this.startDrag();
}
}
on (release) {
this.stopDrag();
dragged = false;
if (this.hitTest(_root.crate1.crate_mc) && (!_root.crate1full)) {
_root.ally_crate1.gotoAndStop(2);
_root.momCrate1on = true;
_root.momPlaced = true;
_root.crate1full = true;
this.gotoAndStop(2);
} else if (this.hitTest(_root.crate2.crate_mc) && (!_root.crate2full)) {
_root.ally_crate2.gotoAndStop(2);
_root.momCrate2on = true;
_root.momPlaced = true;
_root.crate2full = true;
this.gotoAndStop(2);
} else if (this.hitTest(_root.crate3.crate_mc) && (!_root.crate3full)) {
_root.ally_crate3.gotoAndStop(2);
_root.momCrate3on = true;
_root.momPlaced = true;
_root.crate3full = true;
this.gotoAndStop(2);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1735 MovieClip "dadIcon" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndStop(2);
xMouse1 = this._x;
yMouse1 = this._y;
}
onClipEvent (enterFrame) {
if (!dragged) {
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
on (press) {
dragged = true;
if (!root.winonce) {
this.startDrag();
}
}
on (release) {
this.stopDrag();
dragged = false;
if (this.hitTest(_root.crate1.crate_mc) && (!_root.crate1full)) {
_root.ally_crate1.gotoAndStop(3);
_root.dadCrate1on = true;
_root.dadPlaced = true;
_root.crate1full = true;
this.gotoAndStop(2);
} else if (this.hitTest(_root.crate2.crate_mc) && (!_root.crate2full)) {
_root.ally_crate2.gotoAndStop(3);
_root.dadCrate2on = true;
_root.dadPlaced = true;
_root.crate2full = true;
this.gotoAndStop(2);
} else if (this.hitTest(_root.crate3.crate_mc) && (!_root.crate3full)) {
_root.ally_crate3.gotoAndStop(3);
_root.dadCrate3on = true;
_root.dadPlaced = true;
_root.crate3full = true;
this.gotoAndStop(2);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1737 MovieClip "sisIcon" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
this.gotoAndStop(2);
xMouse1 = this._x;
yMouse1 = this._y;
}
onClipEvent (enterFrame) {
if (!dragged) {
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
on (press) {
dragged = true;
if (!root.winonce) {
this.startDrag();
}
}
on (release) {
this.stopDrag();
dragged = false;
if (this.hitTest(_root.crate1.crate_mc) && (!_root.crate1full)) {
_root.ally_crate1.gotoAndStop(4);
_root.sisbow1.gotoAndStop(2);
_root.sisCrate1on = true;
_root.sisPlaced = true;
_root.crate1full = true;
this.gotoAndStop(2);
} else if (this.hitTest(_root.crate2.crate_mc) && (!_root.crate2full)) {
_root.ally_crate2.gotoAndStop(4);
_root.sisbow2.gotoAndStop(2);
_root.sisCrate2on = true;
_root.sisPlaced = true;
_root.crate2full = true;
this.gotoAndStop(2);
} else if (this.hitTest(_root.crate3.crate_mc) && (!_root.crate3full)) {
_root.ally_crate3.gotoAndStop(4);
_root.sisbow3.gotoAndStop(2);
_root.sisCrate3on = true;
_root.sisPlaced = true;
_root.crate3full = true;
this.gotoAndStop(2);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1465 MovieClip "upg_btn1" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn2" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn3" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1751 MovieClip in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (release) {
_root.clicksound.start(0, 1);
if ((!restart) || (!winonce)) {
if (_root.prev1 == "PAUSED") {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if ((_root.prev1 = "UNPAUSED")) {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
_root.prev1 = "PAUSED";
}
}
}
Instance of Symbol 1754 MovieClip "Btn_Mute" in Frame 4
onClipEvent (load) {
this.tabEnabled = false;
}
on (release) {
_root.clicksound.start(0, 1);
if (_root.bgsound.getVolume() != 0) {
this.gotoAndStop(2);
_root.oldVolume = _root.bgsound.getVolume();
_root.slider.slidebar.onEnterFrame = null;
_root.bgsound.setVolume(0);
} else {
this.gotoAndStop(1);
_root.slider.slidebar.onEnterFrame = _root.adjustVolume;
_root.bgsound.setVolume(_root.oldVolume);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1568 MovieClip in Frame 4
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
Instance of Symbol 1763 MovieClip in Frame 4
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
Instance of Symbol 1786 MovieClip "pause_mc" in Frame 4
onClipEvent (enterFrame) {
this.tabEnabled = false;
this.swapDepths(_root.getNextHighestDepth());
}
Frame 5
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
flameLifeCount = 0;
gameoverHit(_local1);
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 5)) {
if (bellTotal2 > 4) {
bellLimit2 = 90;
}
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = joggingSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
bellHolder["blood2" + this._name].removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
macInfo.text = "TIP! You can upgrade your current gun's stats down here!";
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var firstplay = false;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 2;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 24;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 119;
var bellLimit = 250;
var bellTotal = 0;
var bellTime2 = 60;
var bellLimit2 = 280;
var bellTotal2 = 0;
var bellTime3 = 290;
var bellLimit3 = 300;
var bellTotal3 = 0;
var bellTime4 = 250;
var bellLimit4 = 260;
var bellTotal4 = 0;
var bellTime5 = 250;
var bellLimit5 = 260;
var bellTotal5 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 6
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit13(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit13(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit13(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_z" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood13bell_z" + k].removeMovieClip();
if ((!bellHolder["bar13bell_z" + k].healthno) == 0) {
bellHolder["bell_z" + k].yspeed = bellHolder["bell_z" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["blood13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["blood13bell_z" + k]._y = bellHolder["bell_z" + k]._y - 20;
}
bellHolder["bell_z" + k]._x = bellHolder["bell_z" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar13bell_z" + k].bar_mc._x = bellHolder["bar13bell_z" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar13bell_z" + k].healthorigno) * 30);
bellHolder["bar13bell_z" + k].healthno = bellHolder["bar13bell_z" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar13bell_z" + k].healthno <= 0) && (!bellHolder["bell_z" + k].notdead)) {
bellHolder["bell_z" + k].notdead = true;
bellHolder.attachMovie("coin", "coin13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["coin13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["coin13bell_z" + k]._y = bellHolder["bell_z" + k]._y + 20;
bellHolder["coin13bell_z" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_z" + k].yspeed = -1;
bellHolder["bar13bell_z" + k].removeMovieClip();
bellHolder["bell_z" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime13++;
if ((bellTime13 >= bellLimit13) && (enemyCount13 < 5)) {
bellTotal13++;
bellHolder.attachMovie("enemy_mc13", "bell_z" + bellTotal13, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13]._y = Math.floor(Math.random() * 151) + 200;
bellHolder["bell_z" + bellTotal13].landing = bellHolder["bell_z" + bellTotal13]._y;
totalEnemies = totalEnemies + 1;
enemyCount13 = enemyCount13 + 1;
bellHolder["bell_z" + bellTotal13].yspeed = joggingSpeed;
bellHolder["bell_z" + bellTotal13].jumpSpeedLimit = 8;
bellHolder["bell_z" + bellTotal13].jumpSpeed = 8;
bellHolder["bell_z" + bellTotal13].damage = 1;
bellHolder["bell_z" + bellTotal13].attackTime = 0;
bellHolder["bell_z" + bellTotal13].yorigspeed = bellHolder["bell_z" + bellTotal13].yspeed;
bellHolder["bell_z" + bellTotal13]._x = bellTop;
bellHolder["bell_z" + bellTotal13].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_z" + bellTotal13].baron) {
bellHolder.attachMovie("healthbar", "bar13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13].baron = true;
bellHolder["bar13" + this._name].healthno = kangarooHealth;
bellHolder["bar13" + this._name].healthorigno = bellHolder["bar13" + this._name].healthno;
}
bellHolder["bar13" + this._name]._x = this._x;
bellHolder["bar13" + this._name]._y = this._y - 60;
bellHolder["bar13" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.jumpSpeed < 0) {
this.jumpSpeed = this.jumpSpeed * (1 - (this.jumpSpeedLimit / 125));
if (this.jumpSpeed > ((-this.jumpSpeedLimit) * 0.2)) {
this.jumpSpeed = this.jumpSpeed * -1;
}
}
if ((this.jumpSpeed > 0) && (this.jumpSpeed <= this.jumpSpeedLimit)) {
this.jumpSpeed = this.jumpSpeed * (1 + (this.jumpSpeedLimit / 200));
}
this._y = this._y + this.jumpSpeed;
if (this._y > this.landing) {
if (this.jumpSpeed > 0) {
this.jumpSpeed = this.jumpSpeedLimit * -1;
this._y = this.landing;
}
}
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar13" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
bellHolder["blood13" + this._name].removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar13" + this._name].healthno) == 0) {
bellHolder["bar13" + this._name].healthno = bellHolder["bar13" + this._name].healthno - sisDamage;
bellHolder["bar13" + this._name].bar_mc._x = bellHolder["bar13" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar13" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood13" + this._name]._x = this._x;
bellHolder["blood13" + this._name]._y = this._y;
}
if ((bellHolder["bar13" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin13" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin13" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin13" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar13" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime13 = 0;
}
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 5)) {
if (bellTotal2 > 4) {
bellLimit2 = 90;
}
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = joggingSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var waveNumber = 3;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 24;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount13 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 320;
var bellTotal = 0;
var bellTime2 = 110;
var bellLimit2 = 210;
var bellTotal2 = 0;
var bellTime3 = 380;
var bellLimit3 = 480;
var bellTotal3 = 0;
var bellTime4 = 290;
var bellLimit4 = 320;
var bellTotal4 = 0;
var bellTime5 = 300;
var bellLimit5 = 380;
var bellTotal5 = 0;
var bellTime13 = 180;
var bellLimit13 = 200;
var bellTotal13 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 7
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit13(_local1);
checkWallHit5(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit13(_local1);
checkWallHit5(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit13(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_z" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood13bell_z" + k].removeMovieClip();
if ((!bellHolder["bar13bell_z" + k].healthno) == 0) {
bellHolder["bell_z" + k].yspeed = bellHolder["bell_z" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["blood13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["blood13bell_z" + k]._y = bellHolder["bell_z" + k]._y - 20;
}
bellHolder["bell_z" + k]._x = bellHolder["bell_z" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar13bell_z" + k].bar_mc._x = bellHolder["bar13bell_z" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar13bell_z" + k].healthorigno) * 30);
bellHolder["bar13bell_z" + k].healthno = bellHolder["bar13bell_z" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar13bell_z" + k].healthno <= 0) && (!bellHolder["bell_z" + k].notdead)) {
bellHolder["bell_z" + k].notdead = true;
bellHolder.attachMovie("coin", "coin13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["coin13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["coin13bell_z" + k]._y = bellHolder["bell_z" + k]._y + 20;
bellHolder["coin13bell_z" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_z" + k].yspeed = -1;
bellHolder["bar13bell_z" + k].removeMovieClip();
bellHolder["bell_z" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime13++;
if ((bellTime13 >= bellLimit13) && (enemyCount13 < 5)) {
bellTotal13++;
bellHolder.attachMovie("enemy_mc13", "bell_z" + bellTotal13, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13]._y = Math.floor(Math.random() * 151) + 200;
bellHolder["bell_z" + bellTotal13].landing = bellHolder["bell_z" + bellTotal13]._y;
totalEnemies = totalEnemies + 1;
enemyCount13 = enemyCount13 + 1;
bellHolder["bell_z" + bellTotal13].yspeed = joggingSpeed;
bellHolder["bell_z" + bellTotal13].jumpSpeedLimit = 8;
bellHolder["bell_z" + bellTotal13].jumpSpeed = 8;
bellHolder["bell_z" + bellTotal13].damage = 1;
bellHolder["bell_z" + bellTotal13].attackTime = 0;
bellHolder["bell_z" + bellTotal13].yorigspeed = bellHolder["bell_z" + bellTotal13].yspeed;
bellHolder["bell_z" + bellTotal13]._x = bellTop;
bellHolder["bell_z" + bellTotal13].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_z" + bellTotal13].baron) {
bellHolder.attachMovie("healthbar", "bar13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13].baron = true;
bellHolder["bar13" + this._name].healthno = kangarooHealth;
bellHolder["bar13" + this._name].healthorigno = bellHolder["bar13" + this._name].healthno;
}
bellHolder["bar13" + this._name]._x = this._x;
bellHolder["bar13" + this._name]._y = this._y - 60;
bellHolder["bar13" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.jumpSpeed < 0) {
this.jumpSpeed = this.jumpSpeed * (1 - (this.jumpSpeedLimit / 125));
if (this.jumpSpeed > ((-this.jumpSpeedLimit) * 0.2)) {
this.jumpSpeed = this.jumpSpeed * -1;
}
}
if ((this.jumpSpeed > 0) && (this.jumpSpeed <= this.jumpSpeedLimit)) {
this.jumpSpeed = this.jumpSpeed * (1 + (this.jumpSpeedLimit / 200));
}
this._y = this._y + this.jumpSpeed;
if (this._y > this.landing) {
if (this.jumpSpeed > 0) {
this.jumpSpeed = this.jumpSpeedLimit * -1;
this._y = this.landing;
}
}
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar13" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood13" + this._name].removeMovieClip();
if ((!bellHolder["bar13" + this._name].healthno) == 0) {
bellHolder["bar13" + this._name].healthno = bellHolder["bar13" + this._name].healthno - sisDamage;
bellHolder["bar13" + this._name].bar_mc._x = bellHolder["bar13" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar13" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood13" + this._name]._x = this._x;
bellHolder["blood13" + this._name]._y = this._y;
}
if ((bellHolder["bar13" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin13" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin13" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin13" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar13" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime13 = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 5)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = joggingSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
if (_root.gameOver) {
bellHolder["enembullet" + this._name].removeMovieClip();
}
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 4;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 34;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount13 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 189;
var bellLimit = 270;
var bellTotal = 0;
var bellTime2 = 70;
var bellLimit2 = 80;
var bellTotal2 = 0;
var bellTime3 = 180;
var bellLimit3 = 320;
var bellTotal3 = 0;
var bellTime4 = 350;
var bellLimit4 = 380;
var bellTotal4 = 0;
var bellTime5 = 250;
var bellLimit5 = 380;
var bellTotal5 = 0;
var bellTime13 = 120;
var bellLimit13 = 350;
var bellTotal13 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 8
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 5)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = joggingSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 7)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = slowSpeed;
bellHolder["bell_d" + bellTotal4].damage = 1;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 5;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 39;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 189;
var bellLimit = 390;
var bellTotal = 0;
var bellTime2 = 80;
var bellLimit2 = 110;
var bellTotal2 = 0;
var bellTime3 = 180;
var bellLimit3 = 340;
var bellTotal3 = 0;
var bellTime4 = 310;
var bellLimit4 = 380;
var bellTotal4 = 0;
var bellTime5 = 220;
var bellLimit5 = 290;
var bellTotal5 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 9
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit6(_local1);
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit6(_local1);
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < (totalEnemiesGoalRatio * 2)) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function makeLvl() {
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 9)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 5)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = slowSpeed;
bellHolder["bell_d" + bellTotal4].damage = 1;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 6;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 44;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 189;
var bellLimit = 190;
var bellTotal = 0;
var bellTime2 = 40;
var bellLimit2 = 50;
var bellTotal2 = 0;
var bellTime3 = 150;
var bellLimit3 = 160;
var bellTotal3 = 0;
var bellTime4 = 250;
var bellLimit4 = 260;
var bellTotal4 = 0;
var bellTime5 = 100;
var bellLimit5 = 120;
var bellTotal5 = 0;
var bellTime6 = 50;
var bellLimit6 = 60;
var bellTotal6 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 10
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < 2) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin2", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + midbossDrop;
score = score + midbossDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
totalKillsCount = totalKillsCount + 1;
score = score + 1000;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 20)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2b", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = walkSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth2;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 1)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc7", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = slowSpeed;
bellHolder["bell_g" + bellTotal7].damage = 3;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = polarHealth;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 80;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + midbossDrop;
score = score + midbossDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
totalKillsCount = totalKillsCount + 1;
score = score + 1000;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
if (bellTotal6 > 5) {
bellLimit6 = 250;
}
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 5)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = slowSpeed;
bellHolder["bell_d" + bellTotal4].damage = 1;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 7;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 50;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 160;
var bellLimit = 290;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 350;
var bellTotal2 = 0;
var bellTime3 = 150;
var bellLimit3 = 390;
var bellTotal3 = 0;
var bellTime4 = 200;
var bellLimit4 = 690;
var bellTotal4 = 0;
var bellTime5 = 250;
var bellLimit5 = 350;
var bellTotal5 = 0;
var bellTime6 = 310;
var bellLimit6 = 360;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 1200;
var bellTotal7 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 11
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < 60) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 60;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < (totalEnemiesGoalRatio * 3)) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 10)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc3b", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 131) + 150;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 5;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = elephantHealth2;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if (bellTime2 >= bellLimit2) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2b", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = walkSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth2;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 8;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 30;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 100;
var bellLimit = 350;
var bellTotal = 0;
var bellTime2 = -200;
var bellLimit2 = 150;
var bellTotal2 = 0;
var bellTime3 = 450;
var bellLimit3 = 460;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 900;
var bellLimit5 = 950;
var bellTotal5 = 0;
var bellTime6 = 260;
var bellLimit6 = 280;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 1800;
var bellTotal7 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 12
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < 99) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bar4bell_d" + m].onEnterFrame = function () {
if (gameOver) {
this.removeMovieClip();
}
};
bellHolder["bell_d" + m].yspeed = fastSpeed * -1.5;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
if (!bellHolder["bell_d" + m].hitonce) {
bellHolder.attachMovie("coin3", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["bell_d" + m].hitonce = true;
}
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
}
}
m++;
}
}
function makeLvl() {
bellTime4++;
if (bellTime4 >= bellLimit4) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4b", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 5;
bellHolder["bell_d" + bellTotal4].hitonce = false;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth2;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.yspeed = fastSpeed * -1.5;
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
crashsound.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
}
if (this.hitTest(wall3)) {
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bar4" + this._name].removeMovieClip();
totalKillsCount = totalKillsCount + 1;
this.removeMovieClip();
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
this.yspeed = fastSpeed * -1.5;
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
if (!bellHolder["bell_d" + bellTotal4].hitonce) {
bellHolder.attachMovie("coin3", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = this._x;
bellHolder["coin4" + this._name]._y = this._y + 20;
bellHolder["bell_d" + bellTotal4].hitonce = true;
}
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["blood4" + this._name].removeMovieClip();
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndPlay(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 9;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 77;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 119;
var bellLimit = 140;
var bellTotal = 0;
var bellTime2 = 40;
var bellLimit2 = 50;
var bellTotal2 = 0;
var bellTime3 = 110;
var bellLimit3 = 130;
var bellTotal3 = 0;
var bellTime4 = 0;
var bellLimit4 = 25;
var bellTotal4 = 0;
var bellTime5 = 120;
var bellLimit5 = 140;
var bellTotal5 = 0;
var bellTime6 = 50;
var bellLimit6 = 60;
var bellTotal6 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 13
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit2(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit2(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function makeLvl() {
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 20)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = walkSpeed + 1;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 8)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 5;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 10;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 50;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 50;
var bellLimit = 90;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 120;
var bellTotal2 = 0;
var bellTime3 = 210;
var bellLimit3 = 250;
var bellTotal3 = 0;
var bellTime4 = 30;
var bellLimit4 = 240;
var bellTotal4 = 0;
var bellTime5 = 30;
var bellLimit5 = 70;
var bellTotal5 = 0;
var bellTime6 = 0;
var bellLimit6 = 40;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 100;
var bellTotal7 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 14
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit7(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit7(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime7++;
if (bellTime7 >= bellLimit7) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc3b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 81) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = slowSpeed;
bellHolder["bell_g" + bellTotal7].damage = 5;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = elephantHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 50;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 5)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = slowSpeed;
bellHolder["bell_d" + bellTotal4].damage = 1;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 11;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 50;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 80;
var bellLimit = 140;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 150;
var bellTotal2 = 0;
var bellTime3 = 70;
var bellLimit3 = 130;
var bellTotal3 = 0;
var bellTime4 = 180;
var bellLimit4 = 220;
var bellTotal4 = 0;
var bellTime5 = 40;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = 100;
var bellLimit6 = 180;
var bellTotal6 = 0;
var bellTime7 = 150;
var bellLimit7 = 560;
var bellTotal7 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 15
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 12;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 5)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = walkSpeed;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 20)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2b", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = walkSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth2;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar2" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 1)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 5)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = slowSpeed;
bellHolder["bell_d" + bellTotal4].damage = 1;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
bellTime8++;
if ((bellTime8 >= bellLimit8) && (enemyCount8 < 3)) {
bellTotal8++;
bellHolder.attachMovie("enemy_mc8", "bell_h" + bellTotal8, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount8 = enemyCount8 + 1;
bellHolder["bell_h" + bellTotal8].yspeed = walkSpeed;
bellHolder["bell_h" + bellTotal8].firingSpeed = 0;
bellHolder["bell_h" + bellTotal8].damage = 0;
bellHolder["bell_h" + bellTotal8].attackTime = 0;
bellHolder["bell_h" + bellTotal8].yorigspeed = bellHolder["bell_h" + bellTotal8].yspeed;
bellHolder["bell_h" + bellTotal8]._x = bellTop;
bellHolder["bell_h" + bellTotal8].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_h" + bellTotal8].baron) {
bellHolder.attachMovie("healthbar", "bar8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8].baron = true;
bellHolder["bar8" + this._name].healthno = hippoHealth;
bellHolder["bar8" + this._name].healthorigno = bellHolder["bar8" + this._name].healthno;
}
bellHolder["bar8" + this._name]._x = this._x;
bellHolder["bar8" + this._name]._y = this._y - 30;
bellHolder["bar8" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall4)) {
this.yspeed = 0;
if ((this.firingSpeed > (hippoTime - 20)) && (bellHolder["bar8" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > hippoTime) {
bellHolder.attachMovie("bullets2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 1;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 3;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood8" + this._name].removeMovieClip();
if ((!bellHolder["bar8" + this._name].healthno) == 0) {
bellHolder["bar8" + this._name].healthno = bellHolder["bar8" + this._name].healthno - sisDamage;
bellHolder["bar8" + this._name].bar_mc._x = bellHolder["bar8" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar8" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood8" + this._name]._x = this._x;
bellHolder["blood8" + this._name]._y = this._y + 12;
}
if ((bellHolder["bar8" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin8" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin8" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin8" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar8" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime8 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 12;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 55;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 150;
var bellLimit = 190;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 150;
var bellTotal2 = 0;
var bellTime3 = 220;
var bellLimit3 = 260;
var bellTotal3 = 0;
var bellTime4 = 300;
var bellLimit4 = 260;
var bellTotal4 = 0;
var bellTime5 = 210;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = 190;
var bellLimit6 = 230;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 200;
var bellTotal7 = 0;
var bellTime8 = 60;
var bellLimit8 = 100;
var bellTotal8 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 16
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit3(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit3(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 12;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 10)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime8++;
if ((bellTime8 >= bellLimit8) && (enemyCount8 < 3)) {
bellTotal8++;
bellHolder.attachMovie("enemy_mc8", "bell_h" + bellTotal8, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount8 = enemyCount8 + 1;
bellHolder["bell_h" + bellTotal8].yspeed = walkSpeed;
bellHolder["bell_h" + bellTotal8].firingSpeed = 0;
bellHolder["bell_h" + bellTotal8].damage = 0;
bellHolder["bell_h" + bellTotal8].attackTime = 0;
bellHolder["bell_h" + bellTotal8].yorigspeed = bellHolder["bell_h" + bellTotal8].yspeed;
bellHolder["bell_h" + bellTotal8]._x = bellTop;
bellHolder["bell_h" + bellTotal8].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_h" + bellTotal8].baron) {
bellHolder.attachMovie("healthbar", "bar8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8].baron = true;
bellHolder["bar8" + this._name].healthno = hippoHealth;
bellHolder["bar8" + this._name].healthorigno = bellHolder["bar8" + this._name].healthno;
}
bellHolder["bar8" + this._name]._x = this._x;
bellHolder["bar8" + this._name]._y = this._y - 30;
bellHolder["bar8" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall4)) {
this.yspeed = 0;
if ((this.firingSpeed > (hippoTime - 20)) && (bellHolder["bar8" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > hippoTime) {
bellHolder.attachMovie("bullets2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 1;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 3;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood8" + this._name].removeMovieClip();
if ((!bellHolder["bar8" + this._name].healthno) == 0) {
bellHolder["bar8" + this._name].healthno = bellHolder["bar8" + this._name].healthno - sisDamage;
bellHolder["bar8" + this._name].bar_mc._x = bellHolder["bar8" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar8" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood8" + this._name]._x = this._x;
bellHolder["blood8" + this._name]._y = this._y + 12;
}
if ((bellHolder["bar8" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin8" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin8" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin8" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar8" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime8 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 13;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 60;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 360;
var bellLimit = 390;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 120;
var bellTotal2 = 0;
var bellTime3 = 120;
var bellLimit3 = 160;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 100;
var bellLimit5 = 150;
var bellTotal5 = 0;
var bellTime6 = 0;
var bellLimit6 = 35;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 40;
var bellTotal7 = 0;
var bellTime8 = 40;
var bellLimit8 = 80;
var bellTotal8 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 17
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
}
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function makeLvl() {
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 6)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc9", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = fastSpeed;
bellHolder["bell_b" + bellTotal2].damage = 2;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = lionHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 8)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 14;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 80;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 350;
var bellLimit = 390;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 250;
var bellTotal2 = 0;
var bellTime3 = 120;
var bellLimit3 = 160;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = 0;
var bellLimit6 = 40;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 30;
var bellTotal7 = 0;
var bellTime8 = 60;
var bellLimit8 = 100;
var bellTotal8 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 18
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 12;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
}
}
p++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function makeLvl() {
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 6)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc9", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = fastSpeed;
bellHolder["bell_b" + bellTotal2].damage = 2;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = lionHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 3)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc7b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = slowSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = bearHealth;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 80;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y - 10;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime8++;
if ((bellTime8 >= bellLimit8) && (enemyCount8 < 3)) {
bellTotal8++;
bellHolder.attachMovie("enemy_mc8", "bell_h" + bellTotal8, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount8 = enemyCount8 + 1;
bellHolder["bell_h" + bellTotal8].yspeed = walkSpeed;
bellHolder["bell_h" + bellTotal8].firingSpeed = 0;
bellHolder["bell_h" + bellTotal8].damage = 0;
bellHolder["bell_h" + bellTotal8].attackTime = 0;
bellHolder["bell_h" + bellTotal8].yorigspeed = bellHolder["bell_h" + bellTotal8].yspeed;
bellHolder["bell_h" + bellTotal8]._x = bellTop;
bellHolder["bell_h" + bellTotal8].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_h" + bellTotal8].baron) {
bellHolder.attachMovie("healthbar", "bar8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8].baron = true;
bellHolder["bar8" + this._name].healthno = hippoHealth;
bellHolder["bar8" + this._name].healthorigno = bellHolder["bar8" + this._name].healthno;
}
bellHolder["bar8" + this._name]._x = this._x;
bellHolder["bar8" + this._name]._y = this._y - 30;
bellHolder["bar8" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall4)) {
this.yspeed = 0;
if ((this.firingSpeed > (hippoTime - 20)) && (bellHolder["bar8" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > hippoTime) {
bellHolder.attachMovie("bullets2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 1;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 3;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood8" + this._name].removeMovieClip();
if ((!bellHolder["bar8" + this._name].healthno) == 0) {
bellHolder["bar8" + this._name].healthno = bellHolder["bar8" + this._name].healthno - sisDamage;
bellHolder["bar8" + this._name].bar_mc._x = bellHolder["bar8" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar8" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood8" + this._name]._x = this._x;
bellHolder["blood8" + this._name]._y = this._y + 12;
}
if ((bellHolder["bar8" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin8" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin8" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin8" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar8" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime8 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 15;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 50;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 350;
var bellLimit = 390;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 290;
var bellTotal2 = 0;
var bellTime3 = 150;
var bellLimit3 = 190;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 290;
var bellTotal5 = 0;
var bellTime6 = 30;
var bellLimit6 = 90;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 700;
var bellTotal7 = 0;
var bellTime8 = 100;
var bellLimit8 = 180;
var bellTotal8 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 19
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y - 60;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 0.1;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin2", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + midbossDrop;
score = score + midbossDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 10000;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
}
}
p++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 1)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc11", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = slowSpeed - 0.3;
bellHolder["bell_a" + bellTotal].damage = 5;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = rhinoHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 80;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 6)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc9", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = fastSpeed;
bellHolder["bell_b" + bellTotal2].damage = 2;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = lionHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 1)) {
if (bellTotal7 > 5) {
bellLimit7 = 250;
}
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
if (bellTotal6 > 5) {
bellLimit6 = 250;
}
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime8++;
if ((bellTime8 >= bellLimit8) && (enemyCount8 < 3)) {
bellTotal8++;
bellHolder.attachMovie("enemy_mc8", "bell_h" + bellTotal8, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount8 = enemyCount8 + 1;
bellHolder["bell_h" + bellTotal8].yspeed = walkSpeed;
bellHolder["bell_h" + bellTotal8].firingSpeed = 0;
bellHolder["bell_h" + bellTotal8].damage = 0;
bellHolder["bell_h" + bellTotal8].attackTime = 0;
bellHolder["bell_h" + bellTotal8].yorigspeed = bellHolder["bell_h" + bellTotal8].yspeed;
bellHolder["bell_h" + bellTotal8]._x = bellTop;
bellHolder["bell_h" + bellTotal8].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_h" + bellTotal8].baron) {
bellHolder.attachMovie("healthbar", "bar8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8].baron = true;
bellHolder["bar8" + this._name].healthno = hippoHealth;
bellHolder["bar8" + this._name].healthorigno = bellHolder["bar8" + this._name].healthno;
}
bellHolder["bar8" + this._name]._x = this._x;
bellHolder["bar8" + this._name]._y = this._y - 30;
bellHolder["bar8" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall4)) {
this.yspeed = 0;
if ((this.firingSpeed > (hippoTime - 20)) && (bellHolder["bar8" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > hippoTime) {
bellHolder.attachMovie("bullets2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 1;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 3;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood8" + this._name].removeMovieClip();
if ((!bellHolder["bar8" + this._name].healthno) == 0) {
bellHolder["bar8" + this._name].healthno = bellHolder["bar8" + this._name].healthno - sisDamage;
bellHolder["bar8" + this._name].bar_mc._x = bellHolder["bar8" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar8" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood8" + this._name]._x = this._x;
bellHolder["blood8" + this._name]._y = this._y;
}
if ((bellHolder["bar8" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin8" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin8" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin8" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar8" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime8 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 16;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 40;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 200;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 280;
var bellTotal2 = 0;
var bellTime3 = 720;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 900;
var bellLimit5 = 950;
var bellTotal5 = 0;
var bellTime6 = 260;
var bellLimit6 = 380;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 200;
var bellTotal7 = 0;
var bellTime8 = 190;
var bellLimit8 = 320;
var bellTotal8 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 20
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit10(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit10(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < (totalEnemiesGoalRatio + 10)) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime10++;
if ((bellTime10 >= bellLimit10) && (enemyCount10 < 20)) {
bellTotal10++;
bellHolder.attachMovie("enemy_mc10", "bell_j" + bellTotal10, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10]._x = Math.floor(Math.random() * 441) + 200;
totalEnemies = totalEnemies + 1;
enemyCount10 = enemyCount10 + 1;
bellHolder["bell_j" + bellTotal10].xspeed = quickSpeed;
bellHolder["bell_j" + bellTotal10].yspeed = walkSpeed;
bellHolder["bell_j" + bellTotal10].damage = 3;
bellHolder["bell_j" + bellTotal10].fallTime = 0;
bellHolder["bell_j" + bellTotal10].attackTime = 0;
bellHolder["bell_j" + bellTotal10].randFall = Math.floor(Math.random() * 12) + 30;
bellHolder["bell_j" + bellTotal10].yorigspeed = bellHolder["bell_j" + bellTotal10].yspeed;
bellHolder["bell_j" + bellTotal10]._y = bellTop2;
bellHolder["bell_j" + bellTotal10].onEnterFrame = function () {
if (!gpause) {
this.fallTime++;
if (!bellHolder["bell_j" + bellTotal10].baron) {
bellHolder.attachMovie("healthbar", "bar10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10].baron = true;
bellHolder["bar10" + this._name].healthno = snakeHealth;
bellHolder["bar10" + this._name].healthorigno = bellHolder["bar10" + this._name].healthno;
}
bellHolder["bar10" + this._name]._x = this._x;
bellHolder["bar10" + this._name]._y = this._y;
bellHolder["bar10" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.fallTime < this.randFall) {
this._y = this._y + this.xspeed;
} else {
this._x = this._x - this.yspeed;
}
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar10" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood10" + this._name].removeMovieClip();
if ((!bellHolder["bar10" + this._name].healthno) == 0) {
bellHolder["bar10" + this._name].healthno = bellHolder["bar10" + this._name].healthno - sisDamage;
bellHolder["bar10" + this._name].bar_mc._x = bellHolder["bar10" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar10" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood10" + this._name]._x = this._x;
bellHolder["blood10" + this._name]._y = this._y;
}
if ((bellHolder["bar10" + this._name].healthno <= 0) && (!this.notdead)) {
this.notdead = true;
bellHolder.attachMovie("coin", "coin10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin10" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin10" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin10" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar10" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime10 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 17;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 60;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTop2 = -50;
var bellTime = 350;
var bellLimit = 390;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 150;
var bellTotal2 = 0;
var bellTime3 = 120;
var bellLimit3 = 160;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = 10;
var bellLimit6 = 40;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 500;
var bellTotal7 = 0;
var bellTime8 = 50;
var bellLimit8 = 100;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 20;
var bellTotal10 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 21
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
}
gameoverHit(_local1);
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y - 30;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 8)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc2", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = joggingSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = monkeyHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 8)) {
if (bellTotal7 > 5) {
bellLimit7 = 90;
}
bellTotal7++;
bellHolder.attachMovie("enemy_mc2b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = joggingSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = monkeyHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 5)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc12", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = walkSpeed;
bellHolder["bell_f" + bellTotal6].damage = 7;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = gorillaHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 50;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 18;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 50;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 200;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 90;
var bellTotal2 = 0;
var bellTime3 = 750;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 900;
var bellLimit5 = 950;
var bellTotal5 = 0;
var bellTime6 = -600;
var bellLimit6 = 250;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 70;
var bellTotal7 = 0;
var bellTime8 = -500;
var bellLimit8 = 200;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 60;
var bellTotal10 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 22
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 1000;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 6)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc9", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = fastSpeed;
bellHolder["bell_b" + bellTotal2].damage = 2;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = lionHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 10)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc12", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = walkSpeed;
bellHolder["bell_f" + bellTotal6].damage = 7;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = gorillaHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 50;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
bellTime10++;
if ((bellTime10 >= bellLimit10) && (enemyCount10 < 20)) {
bellTotal10++;
bellHolder.attachMovie("enemy_mc10", "bell_j" + bellTotal10, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10]._x = Math.floor(Math.random() * 441) + 200;
totalEnemies = totalEnemies + 1;
enemyCount10 = enemyCount10 + 1;
bellHolder["bell_j" + bellTotal10].xspeed = quickSpeed;
bellHolder["bell_j" + bellTotal10].yspeed = walkSpeed;
bellHolder["bell_j" + bellTotal10].damage = 3;
bellHolder["bell_j" + bellTotal10].fallTime = 0;
bellHolder["bell_j" + bellTotal10].attackTime = 0;
bellHolder["bell_j" + bellTotal10].randFall = Math.floor(Math.random() * 12) + 30;
bellHolder["bell_j" + bellTotal10].yorigspeed = bellHolder["bell_j" + bellTotal10].yspeed;
bellHolder["bell_j" + bellTotal10]._y = bellTop2;
bellHolder["bell_j" + bellTotal10].onEnterFrame = function () {
if (!gpause) {
this.fallTime++;
if (!bellHolder["bell_j" + bellTotal10].baron) {
bellHolder.attachMovie("healthbar", "bar10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10].baron = true;
bellHolder["bar10" + this._name].healthno = snakeHealth;
bellHolder["bar10" + this._name].healthorigno = bellHolder["bar10" + this._name].healthno;
}
bellHolder["bar10" + this._name]._x = this._x;
bellHolder["bar10" + this._name]._y = this._y;
bellHolder["bar10" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.fallTime < this.randFall) {
this._y = this._y + this.xspeed;
} else {
this._x = this._x - this.yspeed;
}
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar10" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood10" + this._name].removeMovieClip();
if ((!bellHolder["bar10" + this._name].healthno) == 0) {
bellHolder["bar10" + this._name].healthno = bellHolder["bar10" + this._name].healthno - sisDamage;
bellHolder["bar10" + this._name].bar_mc._x = bellHolder["bar10" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar10" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood10" + this._name]._x = this._x;
bellHolder["blood10" + this._name]._y = this._y;
}
if ((bellHolder["bar10" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin10" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin10" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin10" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar10" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime10 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 19;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 50;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 200;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 160;
var bellTotal2 = 0;
var bellTime3 = 720;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 900;
var bellLimit5 = 950;
var bellTotal5 = 0;
var bellTime6 = 60;
var bellLimit6 = 480;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 200;
var bellTotal7 = 0;
var bellTime8 = 100;
var bellLimit8 = 120;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 60;
var bellTotal10 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 23
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit4(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit4(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y - 60;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 0.1;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin2", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + midbossDrop;
score = score + midbossDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 20000;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y - 30;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 15000;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 10;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 10000;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 1)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc11", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = slowSpeed - 0.3;
bellHolder["bell_a" + bellTotal].damage = 5;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = rhinoHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 80;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 9000;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 2)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc7b", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = slowSpeed;
bellHolder["bell_b" + bellTotal2].damage = 3;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = bearHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 80;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 1000;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 4)) {
if (bellTotal7 > 5) {
bellLimit7 = 90;
}
enemyCount4 = 999;
bellTotal7++;
bellHolder.attachMovie("enemy_mc3b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 131) + 150;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = walkSpeed;
bellHolder["bell_g" + bellTotal7].damage = 3;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = elephantHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 500;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 3)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc12", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = walkSpeed;
bellHolder["bell_f" + bellTotal6].damage = 7;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = gorillaHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 50;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 1)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc6", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 1;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = rabbitHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 20;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 30;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 533;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 467;
var bellTotal2 = 0;
var bellTime3 = 520;
var bellLimit3 = 560;
var bellTotal3 = 0;
var bellTime4 = 0;
var bellLimit4 = 1;
var bellTotal4 = 0;
var bellTime5 = 600;
var bellLimit5 = 650;
var bellTotal5 = 0;
var bellTime6 = -600;
var bellLimit6 = 490;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 437;
var bellTotal7 = 0;
var bellTime8 = -500;
var bellLimit8 = 200;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 60;
var bellTotal10 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 24
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit10(_local1);
checkWallHit7(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit10(_local1);
checkWallHit7(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 1000;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 10)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc14", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = walkSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = crocodileHealth;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 60;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime10++;
if ((bellTime10 >= bellLimit10) && (enemyCount10 < 20)) {
bellTotal10++;
bellHolder.attachMovie("enemy_mc10", "bell_j" + bellTotal10, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10]._x = Math.floor(Math.random() * 441) + 200;
totalEnemies = totalEnemies + 1;
enemyCount10 = enemyCount10 + 1;
bellHolder["bell_j" + bellTotal10].xspeed = quickSpeed;
bellHolder["bell_j" + bellTotal10].yspeed = walkSpeed;
bellHolder["bell_j" + bellTotal10].damage = 3;
bellHolder["bell_j" + bellTotal10].fallTime = 0;
bellHolder["bell_j" + bellTotal10].attackTime = 0;
bellHolder["bell_j" + bellTotal10].randFall = Math.floor(Math.random() * 12) + 30;
bellHolder["bell_j" + bellTotal10].yorigspeed = bellHolder["bell_j" + bellTotal10].yspeed;
bellHolder["bell_j" + bellTotal10]._y = bellTop2;
bellHolder["bell_j" + bellTotal10].onEnterFrame = function () {
if (!gpause) {
this.fallTime++;
if (!bellHolder["bell_j" + bellTotal10].baron) {
bellHolder.attachMovie("healthbar", "bar10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10].baron = true;
bellHolder["bar10" + this._name].healthno = snakeHealth;
bellHolder["bar10" + this._name].healthorigno = bellHolder["bar10" + this._name].healthno;
}
bellHolder["bar10" + this._name]._x = this._x;
bellHolder["bar10" + this._name]._y = this._y;
bellHolder["bar10" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.fallTime < this.randFall) {
this._y = this._y + this.xspeed;
} else {
this._x = this._x - this.yspeed;
}
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar10" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood10" + this._name].removeMovieClip();
if ((!bellHolder["bar10" + this._name].healthno) == 0) {
bellHolder["bar10" + this._name].healthno = bellHolder["bar10" + this._name].healthno - sisDamage;
bellHolder["bar10" + this._name].bar_mc._x = bellHolder["bar10" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar10" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood10" + this._name]._x = this._x;
bellHolder["blood10" + this._name]._y = this._y;
}
if ((bellHolder["bar10" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin10" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin10" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin10" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar10" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime10 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 21;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 70;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 200;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 160;
var bellTotal2 = 0;
var bellTime3 = 710;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 900;
var bellLimit5 = 950;
var bellTotal5 = 0;
var bellTime6 = 60;
var bellLimit6 = 240;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 200;
var bellTotal7 = 0;
var bellTime8 = 100;
var bellLimit8 = 120;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 20;
var bellTotal10 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 25
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit13(_local1);
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit13(_local1);
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit13(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_z" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood13bell_z" + k].removeMovieClip();
if ((!bellHolder["bar13bell_z" + k].healthno) == 0) {
bellHolder["bell_z" + k].yspeed = bellHolder["bell_z" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["blood13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["blood13bell_z" + k]._y = bellHolder["bell_z" + k]._y - 20;
}
bellHolder["bell_z" + k]._x = bellHolder["bell_z" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar13bell_z" + k].bar_mc._x = bellHolder["bar13bell_z" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar13bell_z" + k].healthorigno) * 30);
bellHolder["bar13bell_z" + k].healthno = bellHolder["bar13bell_z" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar13bell_z" + k].healthno <= 0) && (!bellHolder["bell_z" + k].notdead)) {
bellHolder["bell_z" + k].notdead = true;
bellHolder.attachMovie("coin", "coin13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["coin13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["coin13bell_z" + k]._y = bellHolder["bell_z" + k]._y + 20;
bellHolder["coin13bell_z" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_z" + k].yspeed = -1;
bellHolder["bar13bell_z" + k].removeMovieClip();
bellHolder["bell_z" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 0.1;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 10000;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y - 30;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 400;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime13++;
if ((bellTime13 >= bellLimit13) && (enemyCount13 < 5)) {
bellTotal13++;
bellHolder.attachMovie("enemy_mc13", "bell_z" + bellTotal13, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13]._y = Math.floor(Math.random() * 151) + 200;
bellHolder["bell_z" + bellTotal13].landing = bellHolder["bell_z" + bellTotal13]._y;
totalEnemies = totalEnemies + 1;
enemyCount13 = enemyCount13 + 1;
bellHolder["bell_z" + bellTotal13].yspeed = joggingSpeed;
bellHolder["bell_z" + bellTotal13].jumpSpeedLimit = 8;
bellHolder["bell_z" + bellTotal13].jumpSpeed = 8;
bellHolder["bell_z" + bellTotal13].damage = 1;
bellHolder["bell_z" + bellTotal13].attackTime = 0;
bellHolder["bell_z" + bellTotal13].yorigspeed = bellHolder["bell_z" + bellTotal13].yspeed;
bellHolder["bell_z" + bellTotal13]._x = bellTop;
bellHolder["bell_z" + bellTotal13].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_z" + bellTotal13].baron) {
bellHolder.attachMovie("healthbar", "bar13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13].baron = true;
bellHolder["bar13" + this._name].healthno = kangarooHealth;
bellHolder["bar13" + this._name].healthorigno = bellHolder["bar13" + this._name].healthno;
}
bellHolder["bar13" + this._name]._x = this._x;
bellHolder["bar13" + this._name]._y = this._y - 60;
bellHolder["bar13" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.jumpSpeed < 0) {
this.jumpSpeed = this.jumpSpeed * (1 - (this.jumpSpeedLimit / 125));
if (this.jumpSpeed > ((-this.jumpSpeedLimit) * 0.2)) {
this.jumpSpeed = this.jumpSpeed * -1;
}
}
if ((this.jumpSpeed > 0) && (this.jumpSpeed <= this.jumpSpeedLimit)) {
this.jumpSpeed = this.jumpSpeed * (1 + (this.jumpSpeedLimit / 200));
}
this._y = this._y + this.jumpSpeed;
if (this._y > this.landing) {
if (this.jumpSpeed > 0) {
this.jumpSpeed = this.jumpSpeedLimit * -1;
this._y = this.landing;
}
}
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar13" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood13" + this._name].removeMovieClip();
if ((!bellHolder["bar13" + this._name].healthno) == 0) {
bellHolder["bar13" + this._name].healthno = bellHolder["bar13" + this._name].healthno - sisDamage;
bellHolder["bar13" + this._name].bar_mc._x = bellHolder["bar13" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar13" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood13" + this._name]._x = this._x;
bellHolder["blood13" + this._name]._y = this._y;
}
if ((bellHolder["bar13" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin13" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin13" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin13" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar13" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime13 = 0;
}
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 1)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = slowSpeed;
bellHolder["bell_a" + bellTotal].damage = 5;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = pandaHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime2++;
if ((bellTime2 >= bellLimit2) && (enemyCount2 < 8)) {
bellTotal2++;
bellHolder.attachMovie("enemy_mc6", "bell_b" + bellTotal2, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount2 = enemyCount2 + 1;
bellHolder["bell_b" + bellTotal2].yspeed = fastSpeed;
bellHolder["bell_b" + bellTotal2].damage = 1;
bellHolder["bell_b" + bellTotal2].attackTime = 0;
bellHolder["bell_b" + bellTotal2].yorigspeed = bellHolder["bell_b" + bellTotal2].yspeed;
bellHolder["bell_b" + bellTotal2]._x = bellTop;
bellHolder["bell_b" + bellTotal2].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_b" + bellTotal2].baron) {
bellHolder.attachMovie("healthbar", "bar2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_b" + bellTotal2].baron = true;
bellHolder["bar2" + this._name].healthno = rabbitHealth;
bellHolder["bar2" + this._name].healthorigno = bellHolder["bar2" + this._name].healthno;
}
bellHolder["bar2" + this._name]._x = this._x;
bellHolder["bar2" + this._name]._y = this._y - 20;
bellHolder["bar2" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood2" + this._name].removeMovieClip();
if ((!bellHolder["bar2" + this._name].healthno) == 0) {
bellHolder["bar2" + this._name].healthno = bellHolder["bar2" + this._name].healthno - sisDamage;
bellHolder["bar2" + this._name].bar_mc._x = bellHolder["bar2" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar2" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood2" + this._name]._x = this._x;
bellHolder["blood2" + this._name]._y = this._y;
}
if ((bellHolder["bar2" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin2" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin2" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin2" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin2" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar2" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime2 = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 8)) {
if (bellTotal7 > 5) {
bellLimit7 = 90;
}
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime5++;
if ((bellTime5 >= bellLimit5) && (enemyCount5 < 5)) {
bellTotal5++;
bellHolder.attachMovie("enemy_mc5", "bell_e" + bellTotal5, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5]._y = Math.floor(Math.random() * 101) + 0;
totalEnemies = totalEnemies + 1;
enemyCount5 = enemyCount5 + 1;
bellHolder["bell_e" + bellTotal5].yspeed = fastSpeed;
bellHolder["bell_e" + bellTotal5].xspeed = 1;
bellHolder["bell_e" + bellTotal5].damage = 1;
bellHolder["bell_e" + bellTotal5].attackTime = 0;
bellHolder["bell_e" + bellTotal5].yorigspeed = bellHolder["bell_e" + bellTotal5].yspeed;
bellHolder["bell_e" + bellTotal5]._x = bellTop;
bellHolder["bell_e" + bellTotal5].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_e" + bellTotal5].baron) {
bellHolder.attachMovie("healthbar", "bar5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_e" + bellTotal5].baron = true;
bellHolder["bar5" + this._name].healthno = eagleHealth;
bellHolder["bar5" + this._name].healthorigno = bellHolder["bar5" + this._name].healthno;
}
bellHolder["bar5" + this._name]._x = this._x;
bellHolder["bar5" + this._name]._y = this._y - 20;
bellHolder["bar5" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.xspeed = 0.1;
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood5" + this._name].removeMovieClip();
if ((!bellHolder["bar5" + this._name].healthno) == 0) {
bellHolder["bar5" + this._name].healthno = bellHolder["bar5" + this._name].healthno - sisDamage;
bellHolder["bar5" + this._name].bar_mc._x = bellHolder["bar5" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar5" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood5" + this._name]._x = this._x;
bellHolder["blood5" + this._name]._y = this._y;
}
if ((bellHolder["bar5" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin5" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin5" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin5" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin5" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar5" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime5 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 5)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc12", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = walkSpeed;
bellHolder["bell_f" + bellTotal6].damage = 7;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = gorillaHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 50;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 5)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc9", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 5;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = lionHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
bellTime8++;
if ((bellTime8 >= bellLimit8) && (enemyCount8 < 3)) {
bellTotal8++;
bellHolder.attachMovie("enemy_mc8", "bell_h" + bellTotal8, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount8 = enemyCount8 + 1;
bellHolder["bell_h" + bellTotal8].yspeed = walkSpeed;
bellHolder["bell_h" + bellTotal8].firingSpeed = 0;
bellHolder["bell_h" + bellTotal8].damage = 0;
bellHolder["bell_h" + bellTotal8].attackTime = 0;
bellHolder["bell_h" + bellTotal8].yorigspeed = bellHolder["bell_h" + bellTotal8].yspeed;
bellHolder["bell_h" + bellTotal8]._x = bellTop;
bellHolder["bell_h" + bellTotal8].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_h" + bellTotal8].baron) {
bellHolder.attachMovie("healthbar", "bar8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8].baron = true;
bellHolder["bar8" + this._name].healthno = hippoHealth;
bellHolder["bar8" + this._name].healthorigno = bellHolder["bar8" + this._name].healthno;
}
bellHolder["bar8" + this._name]._x = this._x;
bellHolder["bar8" + this._name]._y = this._y - 30;
bellHolder["bar8" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall4)) {
this.yspeed = 0;
if ((this.firingSpeed > (hippoTime - 20)) && (bellHolder["bar8" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > hippoTime) {
bellHolder.attachMovie("bullets2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 1;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 3;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood8" + this._name].removeMovieClip();
if ((!bellHolder["bar8" + this._name].healthno) == 0) {
bellHolder["bar8" + this._name].healthno = bellHolder["bar8" + this._name].healthno - sisDamage;
bellHolder["bar8" + this._name].bar_mc._x = bellHolder["bar8" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar8" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood8" + this._name]._x = this._x;
bellHolder["blood8" + this._name]._y = this._y;
}
if ((bellHolder["bar8" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin8" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin8" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin8" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar8" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime8 = 0;
}
bellTime3++;
if ((bellTime3 >= bellLimit3) && (enemyCount3 < 3)) {
bellTotal3++;
bellHolder.attachMovie("enemy_mc3", "bell_c" + bellTotal3, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount3 = enemyCount3 + 1;
bellHolder["bell_c" + bellTotal3].yspeed = joggingSpeed;
bellHolder["bell_c" + bellTotal3].firingSpeed = 0;
bellHolder["bell_c" + bellTotal3].damage = 0;
bellHolder["bell_c" + bellTotal3].attackTime = 0;
bellHolder["bell_c" + bellTotal3].yorigspeed = bellHolder["bell_c" + bellTotal3].yspeed;
bellHolder["bell_c" + bellTotal3]._x = bellTop;
bellHolder["bell_c" + bellTotal3].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_c" + bellTotal3].baron) {
bellHolder.attachMovie("healthbar", "bar3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_c" + bellTotal3].baron = true;
bellHolder["bar3" + this._name].healthno = elephantHealth;
bellHolder["bar3" + this._name].healthorigno = bellHolder["bar3" + this._name].healthno;
}
bellHolder["bar3" + this._name]._x = this._x;
bellHolder["bar3" + this._name]._y = this._y - 30;
bellHolder["bar3" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall2)) {
this.yspeed = 0;
if ((this.firingSpeed > (elephantTime - 10)) && (bellHolder["bar3" + this._name].healthno > 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > elephantTime) {
bellHolder.attachMovie("bullet_mc2", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (!gpause) {
this._x = this._x - 5;
}
if (this.hitTest(wall)) {
this.removeMovieClip();
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((1 / towerLifeOrig) * 30);
towerLife = towerLife - 1;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood3" + this._name].removeMovieClip();
if ((!bellHolder["bar3" + this._name].healthno) == 0) {
bellHolder["bar3" + this._name].healthno = bellHolder["bar3" + this._name].healthno - sisDamage;
bellHolder["bar3" + this._name].bar_mc._x = bellHolder["bar3" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar3" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood3" + this._name]._x = this._x;
bellHolder["blood3" + this._name]._y = this._y;
}
if ((bellHolder["bar3" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin3" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin3" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin3" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin3" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar3" + this._name].removeMovieClip();
this.gotoAndStop(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime3 = 0;
}
bellTime10++;
if ((bellTime10 >= bellLimit10) && (enemyCount10 < 20)) {
bellTotal10++;
bellHolder.attachMovie("enemy_mc10", "bell_j" + bellTotal10, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10]._x = Math.floor(Math.random() * 441) + 200;
totalEnemies = totalEnemies + 1;
enemyCount10 = enemyCount10 + 1;
bellHolder["bell_j" + bellTotal10].xspeed = quickSpeed;
bellHolder["bell_j" + bellTotal10].yspeed = walkSpeed;
bellHolder["bell_j" + bellTotal10].damage = 3;
bellHolder["bell_j" + bellTotal10].fallTime = 0;
bellHolder["bell_j" + bellTotal10].attackTime = 0;
bellHolder["bell_j" + bellTotal10].randFall = Math.floor(Math.random() * 12) + 30;
bellHolder["bell_j" + bellTotal10].yorigspeed = bellHolder["bell_j" + bellTotal10].yspeed;
bellHolder["bell_j" + bellTotal10]._y = bellTop2;
bellHolder["bell_j" + bellTotal10].onEnterFrame = function () {
if (!gpause) {
this.fallTime++;
if (!bellHolder["bell_j" + bellTotal10].baron) {
bellHolder.attachMovie("healthbar", "bar10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10].baron = true;
bellHolder["bar10" + this._name].healthno = snakeHealth;
bellHolder["bar10" + this._name].healthorigno = bellHolder["bar10" + this._name].healthno;
}
bellHolder["bar10" + this._name]._x = this._x;
bellHolder["bar10" + this._name]._y = this._y;
bellHolder["bar10" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.fallTime < this.randFall) {
this._y = this._y + this.xspeed;
} else {
this._x = this._x - this.yspeed;
}
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar10" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood10" + this._name].removeMovieClip();
if ((!bellHolder["bar10" + this._name].healthno) == 0) {
bellHolder["bar10" + this._name].healthno = bellHolder["bar10" + this._name].healthno - sisDamage;
bellHolder["bar10" + this._name].bar_mc._x = bellHolder["bar10" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar10" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood10" + this._name]._x = this._x;
bellHolder["blood10" + this._name]._y = this._y;
}
if ((bellHolder["bar10" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin10" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin10" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin10" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar10" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime10 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 22;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 60;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var enemyCount13 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 250;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 90;
var bellTotal2 = 0;
var bellTime3 = 720;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 400;
var bellLimit4 = 560;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = -200;
var bellLimit6 = 250;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 70;
var bellTotal7 = 0;
var bellTime8 = -500;
var bellLimit8 = 200;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 70;
var bellTotal10 = 0;
var bellTime13 = 120;
var bellLimit13 = 500;
var bellTotal13 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 26
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit13(_local1);
checkWallHit4(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit13(_local1);
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit13(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_z" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood13bell_z" + k].removeMovieClip();
if ((!bellHolder["bar13bell_z" + k].healthno) == 0) {
bellHolder["bell_z" + k].yspeed = bellHolder["bell_z" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["blood13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["blood13bell_z" + k]._y = bellHolder["bell_z" + k]._y - 20;
}
bellHolder["bell_z" + k]._x = bellHolder["bell_z" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar13bell_z" + k].bar_mc._x = bellHolder["bar13bell_z" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar13bell_z" + k].healthorigno) * 30);
bellHolder["bar13bell_z" + k].healthno = bellHolder["bar13bell_z" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar13bell_z" + k].healthno <= 0) && (!bellHolder["bell_z" + k].notdead)) {
bellHolder["bell_z" + k].notdead = true;
bellHolder.attachMovie("coin", "coin13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["coin13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["coin13bell_z" + k]._y = bellHolder["bell_z" + k]._y + 20;
bellHolder["coin13bell_z" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_z" + k].yspeed = -2;
bellHolder["bar13bell_z" + k].removeMovieClip();
bellHolder["bell_z" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < 99) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yspeed * -1.5;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].onEnterFrame = function () {
if (gameOver) {
this.removeMovieClip();
}
};
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
bellHolder["bell_d" + m].hitonce = false;
if (!bellHolder["bell_d" + m].hitonce) {
bellHolder.attachMovie("coin3", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["bell_d" + m].hitonce = true;
}
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
}
}
m++;
}
}
function makeLvl() {
bellTime13++;
if ((bellTime13 >= bellLimit13) && (enemyCount13 < 10)) {
bellTotal13++;
bellHolder.attachMovie("enemy_mc13b", "bell_z" + bellTotal13, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13]._y = Math.floor(Math.random() * 71) + 300;
bellHolder["bell_z" + bellTotal13].landing = bellHolder["bell_z" + bellTotal13]._y;
bellHolder["bell_z" + bellTotal13].width = bellHolder["bell_z" + bellTotal13].width / 2;
bellHolder["bell_z" + bellTotal13].height = bellHolder["bell_z" + bellTotal13].height / 2;
totalEnemies = totalEnemies + 1;
enemyCount13 = enemyCount13 + 1;
bellHolder["bell_z" + bellTotal13].yspeed = joggingSpeed;
bellHolder["bell_z" + bellTotal13].jumpSpeedLimit = 20;
bellHolder["bell_z" + bellTotal13].jumpSpeed = 20;
bellHolder["bell_z" + bellTotal13].damage = 1;
bellHolder["bell_z" + bellTotal13].attackTime = 0;
bellHolder["bell_z" + bellTotal13].yorigspeed = bellHolder["bell_z" + bellTotal13].yspeed;
bellHolder["bell_z" + bellTotal13]._x = bellTop;
bellHolder["bell_z" + bellTotal13].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_z" + bellTotal13].baron) {
bellHolder.attachMovie("healthbar", "bar13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_z" + bellTotal13].baron = true;
bellHolder["bar13" + this._name].healthno = kangarooHealth2;
bellHolder["bar13" + this._name].healthorigno = bellHolder["bar13" + this._name].healthno;
}
bellHolder["bar13" + this._name]._x = this._x;
bellHolder["bar13" + this._name]._y = this._y - 60;
bellHolder["bar13" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.jumpSpeed < 0) {
this.jumpSpeed = this.jumpSpeed * (1 - (this.jumpSpeedLimit / 330));
if (this.jumpSpeed > ((-this.jumpSpeedLimit) * 0.2)) {
this.jumpSpeed = this.jumpSpeed * -1;
}
}
if ((this.jumpSpeed > 0) && (this.jumpSpeed <= this.jumpSpeedLimit)) {
this.jumpSpeed = this.jumpSpeed * (1 + (this.jumpSpeedLimit / 330));
}
this._y = this._y + this.jumpSpeed;
if (this._y > this.landing) {
if (this.jumpSpeed > 0) {
this.jumpSpeed = this.jumpSpeedLimit * -1;
this._y = this.landing;
}
}
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar13" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood13" + this._name].removeMovieClip();
if ((!bellHolder["bar13" + this._name].healthno) == 0) {
bellHolder["bar13" + this._name].healthno = bellHolder["bar13" + this._name].healthno - sisDamage;
bellHolder["bar13" + this._name].bar_mc._x = bellHolder["bar13" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar13" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood13" + this._name]._x = this._x;
bellHolder["blood13" + this._name]._y = this._y;
}
if ((bellHolder["bar13" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin13" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin13" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin13" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin13" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar13" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime13 = 0;
}
bellTime4++;
if (bellTime4 >= bellLimit4) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc4b", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 5;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth2;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.yspeed = this.yspeed - (quickSpeed * 1.2);
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
crashsound.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
}
if (this.hitTest(wall3)) {
bellHolder["bar4" + this._name].removeMovieClip();
totalKillsCount = totalKillsCount + 1;
this.removeMovieClip();
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
this.yspeed = this.yspeed * -1.5;
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder.attachMovie("coin3", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = this._x;
bellHolder["coin4" + this._name]._y = this._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 23;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 60;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var enemyCount13 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 250;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 90;
var bellTotal2 = 0;
var bellTime3 = 720;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 0;
var bellLimit4 = 40;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = -200;
var bellLimit6 = 250;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 70;
var bellTotal7 = 0;
var bellTime8 = -500;
var bellLimit8 = 200;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 70;
var bellTotal10 = 0;
var bellTime13 = 120;
var bellLimit13 = 150;
var bellTotal13 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 27
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit13(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_z" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood13bell_z" + k].removeMovieClip();
if ((!bellHolder["bar13bell_z" + k].healthno) == 0) {
bellHolder["bell_z" + k].yspeed = bellHolder["bell_z" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["blood13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["blood13bell_z" + k]._y = bellHolder["bell_z" + k]._y - 20;
}
bellHolder["bell_z" + k]._x = bellHolder["bell_z" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar13bell_z" + k].bar_mc._x = bellHolder["bar13bell_z" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar13bell_z" + k].healthorigno) * 30);
bellHolder["bar13bell_z" + k].healthno = bellHolder["bar13bell_z" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar13bell_z" + k].healthno <= 0) && (!bellHolder["bell_z" + k].notdead)) {
bellHolder["bell_z" + k].notdead = true;
bellHolder.attachMovie("coin", "coin13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["coin13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["coin13bell_z" + k]._y = bellHolder["bell_z" + k]._y + 20;
bellHolder["coin13bell_z" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_z" + k].yspeed = -1;
bellHolder["bar13bell_z" + k].removeMovieClip();
bellHolder["bell_z" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y - 30;
}
bellHolder["bell_h" + p]._x = bellHolder["bell_h" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 30);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 400;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < totalEnemiesGoalRatio) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
bellHolder["bell_d" + m]._x = bellHolder["bell_d" + m]._x + 3;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
bellHolder.attachMovie("coin", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 300;
bellHolder["bell_d" + m].yspeed = -1;
bellHolder["bar4bell_d" + m].removeMovieClip();
bellHolder["bell_d" + m].gotoAndStop(2);
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 8)) {
if (bellTotal7 > 5) {
bellLimit7 = 90;
}
bellTotal7++;
bellHolder.attachMovie("enemy_mc7b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = walkSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = bearHealth;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 80;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 5)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc12", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = walkSpeed;
bellHolder["bell_f" + bellTotal6].damage = 7;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = gorillaHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 50;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (enemyCount4 < 5)) {
bellTotal4++;
bellHolder.attachMovie("enemy_mc9", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 5;
bellHolder["bell_d" + bellTotal4].attackTime = 0;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = lionHealth;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood4" + this._name].removeMovieClip();
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 24;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 38;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var enemyCount13 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = 0;
var bellLimit = 1090;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 90;
var bellTotal2 = 0;
var bellTime3 = 320;
var bellLimit3 = 360;
var bellTotal3 = 0;
var bellTime4 = 320;
var bellLimit4 = 380;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = 400;
var bellLimit6 = 450;
var bellTotal6 = 0;
var bellTime7 = 390;
var bellLimit7 = 480;
var bellTotal7 = 0;
var bellTime8 = 0;
var bellLimit8 = 200;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 50;
var bellTotal10 = 0;
var bellTime13 = 120;
var bellLimit13 = 500;
var bellTotal13 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 28
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
_root.flamesound.start(0, 1);
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
flameLifeCount++;
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
if (playerWeapon.flamethroweron) {
if (flameLifeCount >= 17) {
checkWallHit13(_local1);
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
flameLifeCount = 0;
}
} else if (!playerWeapon.flamethroweron) {
checkWallHit13(_local1);
checkWallHit10(_local1);
checkWallHit8(_local1);
checkWallHit7(_local1);
checkWallHit6(_local1);
checkWallHit5(_local1);
checkWallHit4(_local1);
checkWallHit3(_local1);
checkWallHit2(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
gameoverHit(_local1);
}
_local2++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit13(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_z" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood13bell_z" + k].removeMovieClip();
if ((!bellHolder["bar13bell_z" + k].healthno) == 0) {
bellHolder["bell_z" + k].yspeed = bellHolder["bell_z" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["blood13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["blood13bell_z" + k]._y = bellHolder["bell_z" + k]._y - 20;
}
bellHolder["bell_z" + k]._x = bellHolder["bell_z" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar13bell_z" + k].bar_mc._x = bellHolder["bar13bell_z" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar13bell_z" + k].healthorigno) * 30);
bellHolder["bar13bell_z" + k].healthno = bellHolder["bar13bell_z" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar13bell_z" + k].healthno <= 0) && (!bellHolder["bell_z" + k].notdead)) {
bellHolder["bell_z" + k].notdead = true;
bellHolder.attachMovie("coin", "coin13bell_z" + k, bellHolder.getNextHighestDepth());
bellHolder["coin13bell_z" + k]._x = bellHolder["bell_z" + k]._x;
bellHolder["coin13bell_z" + k]._y = bellHolder["bell_z" + k]._y + 20;
bellHolder["coin13bell_z" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount13 = enemyCount13 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_z" + k].yspeed = -1;
bellHolder["bar13bell_z" + k].removeMovieClip();
bellHolder["bell_z" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["bloodbell_a" + j].removeMovieClip();
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y - 60;
}
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 0.1;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 10000;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndStop(2);
}
}
j++;
}
}
function checkWallHit2(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_b" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood2bell_b" + k].removeMovieClip();
if ((!bellHolder["bar2bell_b" + k].healthno) == 0) {
bellHolder["bell_b" + k].yspeed = bellHolder["bell_b" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["blood2bell_b" + k]._y = bellHolder["bell_b" + k]._y;
}
bellHolder["bell_b" + k]._x = bellHolder["bell_b" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar2bell_b" + k].bar_mc._x = bellHolder["bar2bell_b" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar2bell_b" + k].healthorigno) * 30);
bellHolder["bar2bell_b" + k].healthno = bellHolder["bar2bell_b" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar2bell_b" + k].healthno <= 0) && (!bellHolder["bell_b" + k].notdead)) {
bellHolder["bell_b" + k].notdead = true;
bellHolder.attachMovie("coin", "coin2bell_b" + k, bellHolder.getNextHighestDepth());
bellHolder["coin2bell_b" + k]._x = bellHolder["bell_b" + k]._x;
bellHolder["coin2bell_b" + k]._y = bellHolder["bell_b" + k]._y + 20;
bellHolder["coin2bell_b" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_b" + k].yspeed = -1;
bellHolder["bar2bell_b" + k].removeMovieClip();
bellHolder["bell_b" + k].gotoAndStop(2);
}
}
k++;
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood7bell_g" + p].removeMovieClip();
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood7bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
}
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndStop(2);
}
}
p++;
}
}
function checkWallHit8(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_h" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood8bell_h" + p].removeMovieClip();
if ((!bellHolder["bar8bell_h" + p].healthno) == 0) {
bellHolder["bell_h" + p].yspeed = bellHolder["bell_h" + p].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["blood8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["blood8bell_h" + p]._y = bellHolder["bell_h" + p]._y - 30;
}
destroyBullet(_bullet);
bellHolder["bar8bell_h" + p].bar_mc._x = bellHolder["bar8bell_h" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar8bell_h" + p].healthorigno) * 100);
bellHolder["bar8bell_h" + p].healthno = bellHolder["bar8bell_h" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar8bell_h" + p].healthno <= 0) && (!bellHolder["bell_h" + p].notdead)) {
bellHolder["bell_h" + p].notdead = true;
bellHolder.attachMovie("coin", "coin8bell_h" + p, bellHolder.getNextHighestDepth());
bellHolder["coin8bell_h" + p]._x = bellHolder["bell_h" + p]._x;
bellHolder["coin8bell_h" + p]._y = bellHolder["bell_h" + p]._y + 20;
bellHolder["coin8bell_h" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + 100000;
score = score + 100000;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 8);
this._y = this._y - ((this._y - yMouse1) / 8);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
gpause = true;
score = score + 50000;
bellHolder["bell_h" + p].yspeed = -1;
bellHolder["bar8bell_h" + p].removeMovieClip();
bellHolder["bell_h" + p].gotoAndStop(3);
massKill();
}
}
p++;
}
}
function checkWallHit5(_bullet) {
n = 0;
while (n < totalEnemiesGoalRatio) {
if (bellHolder["bell_e" + n].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood5bell_e" + n].removeMovieClip();
if ((!bellHolder["bar5bell_e" + n].healthno) == 0) {
bellHolder["bell_e" + n].yspeed = bellHolder["bell_e" + n].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["blood5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["blood5bell_e" + n]._y = bellHolder["bell_e" + n]._y;
bellHolder["bell_e" + n]._x = bellHolder["bell_e" + n]._x + 3;
destroyBullet(_bullet);
bellHolder["bar5bell_e" + n].bar_mc._x = bellHolder["bar5bell_e" + n].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar5bell_e" + n].healthorigno) * 30);
bellHolder["bar5bell_e" + n].healthno = bellHolder["bar5bell_e" + n].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar5bell_e" + n].healthno <= 0) && (!bellHolder["bell_e" + n].notdead)) {
bellHolder["bell_e" + n].notdead = true;
bellHolder.attachMovie("coin", "coin5bell_e" + n, bellHolder.getNextHighestDepth());
bellHolder["coin5bell_e" + n]._x = bellHolder["bell_e" + n]._x;
bellHolder["coin5bell_e" + n]._y = bellHolder["bell_e" + n]._y + 20;
bellHolder["coin5bell_e" + n].dropCoinTimer = 0;
bellHolder["coin5bell_e" + n].onEnterFrame = function () {
if (!gpause) {
this.dropCoinTimer++;
if (this.dropCoinTimer <= 20) {
this._y = this._y + 5;
}
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount5 = enemyCount5 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_e" + n].yspeed = -1;
bellHolder["bar5bell_e" + n].removeMovieClip();
bellHolder["bell_e" + n].gotoAndStop(2);
}
}
n++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood6bell_f" + o].removeMovieClip();
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
}
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndStop(2);
}
}
o++;
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < 99) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood4bell_d" + m].removeMovieClip();
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
}
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yspeed * -1.5;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].onEnterFrame = function () {
if (gameOver) {
this.removeMovieClip();
}
};
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
bellHolder["bell_d" + m].hitonce = false;
if (!bellHolder["bell_d" + m].hitonce) {
bellHolder.attachMovie("coin3", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["bell_d" + m].hitonce = true;
}
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
}
}
m++;
}
}
function checkWallHit3(_bullet) {
l = 0;
while (l < totalEnemiesGoalRatio) {
if (bellHolder["bell_c" + l].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood3bell_c" + l].removeMovieClip();
if ((!bellHolder["bar3bell_c" + l].healthno) == 0) {
bellHolder["bell_c" + l].yspeed = bellHolder["bell_c" + l].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["blood3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["blood3bell_c" + l]._y = bellHolder["bell_c" + l]._y;
}
bellHolder["bell_c" + l]._x = bellHolder["bell_c" + l]._x + 3;
destroyBullet(_bullet);
bellHolder["bar3bell_c" + l].bar_mc._x = bellHolder["bar3bell_c" + l].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar3bell_c" + l].healthorigno) * 30);
bellHolder["bar3bell_c" + l].healthno = bellHolder["bar3bell_c" + l].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar3bell_c" + l].healthno <= 0) && (!bellHolder["bell_c" + l].notdead)) {
bellHolder["bell_c" + l].notdead = true;
bellHolder.attachMovie("coin", "coin3bell_c" + l, bellHolder.getNextHighestDepth());
bellHolder["coin3bell_c" + l]._x = bellHolder["bell_c" + l]._x;
bellHolder["coin3bell_c" + l]._y = bellHolder["bell_c" + l]._y + 20;
bellHolder["coin3bell_c" + l].onRelease = function () {
this.touchedonce = true;
};
bellHolder["coin3bell_c" + l].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount3 = enemyCount3 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_c" + l].yspeed = -1;
bellHolder["bar3bell_c" + l].removeMovieClip();
bellHolder["bell_c" + l].gotoAndStop(3);
}
}
l++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
bellHolder["blood10bell_j" + k].removeMovieClip();
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
if (!playerWeapon.flamethroweron) {
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
}
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndStop(2);
}
}
k++;
}
}
function makeLvl() {
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 1)) {
bellTotal++;
bellHolder.attachMovie("enemy_mc11", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._y = Math.floor(Math.random() * 151) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].yspeed = slowSpeed - 0.3;
bellHolder["bell_a" + bellTotal].damage = 5;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._x = bellTop;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = rhinoHealth;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 100;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood" + this._name].removeMovieClip();
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + hugeDrop;
score = score + hugeDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 9000;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 8)) {
if (bellTotal7 > 5) {
bellLimit7 = 90;
}
bellTotal7++;
bellHolder.attachMovie("enemy_mc7b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = walkSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = bearHealth;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 80;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood7" + this._name].removeMovieClip();
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 5)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc12", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = walkSpeed;
bellHolder["bell_f" + bellTotal6].damage = 7;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = gorillaHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 50;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
bellHolder["blood6" + this._name].removeMovieClip();
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
bellTime4++;
if ((bellTime4 >= bellLimit4) && (turtleCall)) {
bellTotal4++;
if (enemyCount4 >= 7) {
turtleCall = false;
enemyCount4 = 0;
}
bellHolder.attachMovie("enemy_mc4b", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 5;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth2;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.yspeed = this.yspeed - (quickSpeed * 1.2);
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
crashsound.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
}
if (this.hitTest(wall3)) {
bellHolder["bar4" + this._name].removeMovieClip();
totalKillsCount = totalKillsCount + 1;
this.removeMovieClip();
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
this.yspeed = this.yspeed * -1.5;
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder.attachMovie("coin3", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = this._x;
bellHolder["coin4" + this._name]._y = this._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndStop(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
bellTime8++;
if ((bellTime8 >= bellLimit8) && (enemyCount8 < 1)) {
bellTotal8++;
bellHolder.attachMovie("enemy_mc15", "bell_h" + bellTotal8, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8]._y = 250;
totalEnemies = totalEnemies + 1;
timerSnake = 0;
turtleCall = false;
bossCall = false;
enemyCount8 = enemyCount8 + 1;
bellHolder["bell_h" + bellTotal8].yspeed = walkSpeed;
bellHolder["bell_h" + bellTotal8].firingSpeed = 400;
bellHolder["bell_h" + bellTotal8].firingSpeed2 = 0;
bellHolder["bell_h" + bellTotal8].damage = 0;
introOnce = false;
bellHolder["bell_h" + bellTotal8].attackTime = 0;
bellHolder["bell_h" + bellTotal8].yorigspeed = bellHolder["bell_h" + bellTotal8].yspeed;
bellHolder["bell_h" + bellTotal8]._x = bellTop;
bellHolder["bell_h" + bellTotal8].onEnterFrame = function () {
if (!gpause) {
bellHolder["bell_h" + bellTotal8].swapDepths(bellHolder.getNextHighestDepth());
if (!bellHolder["bell_h" + bellTotal8].baron) {
bellHolder.attachMovie("bosshealthbar", "bar8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_h" + bellTotal8].baron = true;
bellHolder["bar8" + this._name].healthno = bossHealth;
bellHolder["bar8" + this._name].healthorigno = bellHolder["bar8" + this._name].healthno;
}
bellHolder["bar8" + this._name]._x = this._x;
bellHolder["bar8" + this._name]._y = this._y - 140;
bellHolder["bar8" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall5)) {
this.yspeed = 0;
if (this.firingSpeed > (bossTime - 25)) {
this.gotoAndStop(2);
} else if (this.firingSpeed2 > (bossTime2 - 35)) {
this.gotoAndStop(5);
} else if (!introOnce) {
this.gotoAndStop(6);
} else {
this.gotoAndStop(4);
}
this.firingSpeed2 = this.firingSpeed2 + 1;
this.firingSpeed = this.firingSpeed + 1;
if (this.firingSpeed > bossTime) {
bellHolder.attachMovie("earthquake", "enembullet" + this._name, bellHolder.getNextHighestDepth());
this.firingSpeed = 0;
bellHolder["enembullet" + this._name]._x = this._x - 30;
bellHolder["enembullet" + this._name]._y = this._y;
} else if (this.firingSpeed2 > (bossTime2 - 25)) {
this.gotoAndStop(5);
turtleCall = true;
}
if (this.firingSpeed2 == bossTime2) {
this.firingSpeed2 = 0;
}
}
bellHolder["enembullet" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
if (this.hitTest(wall)) {
this.removeMovieClip();
bossCall = true;
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
_root.crashsound.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((10 / towerLifeOrig) * 30);
towerLife = towerLife - 10;
}
};
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar8" + this._name].healthno) == 0) {
bellHolder["bar8" + this._name].healthno = bellHolder["bar8" + this._name].healthno - sisDamage;
bellHolder["bar8" + this._name].bar_mc._x = bellHolder["bar8" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar8" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood8" + this._name]._x = this._x;
bellHolder["blood8" + this._name]._y = this._y;
}
if ((bellHolder["bar8" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin8" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin8" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin8" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin8" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount8 = enemyCount8 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -3;
bellHolder["bar8" + this._name].removeMovieClip();
this.gotoAndPlay(3);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime8 = 0;
}
bellTime10++;
if (((bellTime10 >= bellLimit10) && (enemyCount10 < 15)) && (bossCall)) {
bellTotal10++;
if (enemyCount10 >= 14) {
bossCall = false;
}
bellHolder.attachMovie("enemy_mc10", "bell_j" + bellTotal10, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10]._x = Math.floor(Math.random() * 441) + 200;
totalEnemies = totalEnemies + 1;
enemyCount10 = enemyCount10 + 1;
bellHolder["bell_j" + bellTotal10].xspeed = quickSpeed;
bellHolder["bell_j" + bellTotal10].yspeed = walkSpeed;
bellHolder["bell_j" + bellTotal10].damage = 3;
bellHolder["bell_j" + bellTotal10].fallTime = 0;
bellHolder["bell_j" + bellTotal10].attackTime = 0;
bellHolder["bell_j" + bellTotal10].randFall = Math.floor(Math.random() * 12) + 30;
bellHolder["bell_j" + bellTotal10].yorigspeed = bellHolder["bell_j" + bellTotal10].yspeed;
bellHolder["bell_j" + bellTotal10]._y = bellTop2;
bellHolder["bell_j" + bellTotal10].onEnterFrame = function () {
if (!gpause) {
this.fallTime++;
if (!bellHolder["bell_j" + bellTotal10].baron) {
bellHolder.attachMovie("healthbar", "bar10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10].baron = true;
bellHolder["bar10" + this._name].healthno = snakeHealth;
bellHolder["bar10" + this._name].healthorigno = bellHolder["bar10" + this._name].healthno;
}
bellHolder["bar10" + this._name]._x = this._x;
bellHolder["bar10" + this._name]._y = this._y;
bellHolder["bar10" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
if (this.fallTime < this.randFall) {
this._y = this._y + this.xspeed;
} else {
this._x = this._x - this.yspeed;
}
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
if (bellHolder["bar10" + this._name].healthno > 0) {
this.gotoAndStop(3);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar10" + this._name].healthno) == 0) {
bellHolder["bar10" + this._name].healthno = bellHolder["bar10" + this._name].healthno - sisDamage;
bellHolder["bar10" + this._name].bar_mc._x = bellHolder["bar10" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar10" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood10" + this._name]._x = this._x;
bellHolder["blood10" + this._name]._y = this._y;
}
if ((bellHolder["bar10" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin10" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin10" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin10" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -3;
bellHolder["bar10" + this._name].removeMovieClip();
this.gotoAndPlay(10);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime10 = 0;
}
}
stop();
stopAllSounds();
finalwave = true;
setoncebar = false;
_root.swampsound.start(0, 999);
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var turtleCall = false;
var bossCall = false;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 25;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 100;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var enemyCount13 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTime = -250;
var bellLimit = 1500;
var bellTotal = 0;
var bellTime2 = -1000;
var bellLimit2 = 90;
var bellTotal2 = 0;
var bellTime3 = -1000;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 0;
var bellLimit4 = 10;
var bellTotal4 = 0;
var bellTime5 = -1000;
var bellLimit5 = 750;
var bellTotal5 = 0;
var bellTime6 = -250;
var bellLimit6 = 1500;
var bellTotal6 = 0;
var bellTime7 = -250;
var bellLimit7 = 1500;
var bellTotal7 = 0;
var bellTime8 = 8980;
var bellLimit8 = 9000;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 10;
var bellTotal10 = 0;
var bellTime13 = -1000;
var bellLimit13 = 700;
var bellTotal13 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (flamethrowerselected && (flamethrowerbought)) {
loadWeapon("Flamethrower");
} else if (pulsegunselected && (pulsegunbought)) {
loadWeapon("Pulse Gun");
} else if (sniperselected && (sniperbought)) {
loadWeapon("Sniper");
} else if (gatlinggunselected && (gatlinggunbought)) {
loadWeapon("Gatling Gun");
} else if (shotgunselected && (shotgunbought)) {
loadWeapon("Shotgun");
} else if (machinegunselected && (machinegunbought)) {
loadWeapon("Machine Gun");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
Frame 33
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
SpitFire();
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function createBullet() {
var _local3 = 0;
while (_local3 < playerWeapon.bulletNumber) {
var _local2 = _root.attachMovie("bullet", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
if (playerWeapon.flamethroweron) {
_local2.gotoAndStop(2);
}
if (playerWeapon.pulsegunon) {
_local2._x = _xmouse;
_local2._y = _ymouse;
_local2.cacheAsBitmap = true;
} else {
_local2._x = player_mc._x + (playerWeapon.barrelLength * Math.cos(player_mc._rotation * radians));
_local2._y = player_mc._y + (playerWeapon.barrelLength * Math.sin(player_mc._rotation * radians));
}
var _local5 = random(playerWeapon.bulletOffset) - (playerWeapon.bulletOffset / 2);
var _local4 = (player_mc._rotation + _local5) * radians;
_local2.xSpeed = Math.cos(_local4) * playerWeapon.bulletSpeed;
_local2.ySpeed = Math.sin(_local4) * playerWeapon.bulletSpeed;
if (playerWeapon.pulsegunon) {
_local2.lifeTimer = setInterval(destroyBullet, playerWeapon.bulletMaxAge, _local2);
}
bulletArray.push(_local2);
_local3++;
}
startReloading();
}
function startReloading() {
playerWeapon.reloadComplete = false;
playerWeapon.reloadTimer = setInterval(gunReloaded, playerWeapon.reloadSpeed);
screenTimer = setInterval(this, "clearScreen", clearSpeed);
}
function gunReloaded() {
clearInterval(playerWeapon.reloadTimer);
playerWeapon.reloadComplete = true;
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
checkWallHit4(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
_local2++;
}
}
function destroyBullet(_bullet) {
var _local1 = 0;
while (_local1 < bulletArray.length) {
var _local2 = bulletArray[_local1];
if (_local2 == _bullet) {
bulletArray.splice(_local1, 1);
if (playerWeapon.pulsegunon) {
clearInterval(_local2.lifeTimer);
}
removeMovieClip(_local2);
}
_local1++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit4(_bullet) {
m = 0;
while (m < 99) {
if (bellHolder["bell_d" + m].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar4bell_d" + m].healthno) == 0) {
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["blood4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["blood4bell_d" + m]._y = bellHolder["bell_d" + m]._y;
bellHolder["bell_d" + m].yspeed = bellHolder["bell_d" + m].yspeed * -1.5;
destroyBullet(_bullet);
bellHolder["bar4bell_d" + m].bar_mc._x = bellHolder["bar4bell_d" + m].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar4bell_d" + m].healthorigno) * 30);
bellHolder["bar4bell_d" + m].healthno = bellHolder["bar4bell_d" + m].healthno - playerWeapon.bulletDamage;
bellHolder.attachMovie("coin3", "coin4bell_d" + m, bellHolder.getNextHighestDepth());
bellHolder["coin4bell_d" + m]._x = bellHolder["bell_d" + m]._x;
bellHolder["coin4bell_d" + m]._y = bellHolder["bell_d" + m]._y + 20;
bellHolder["coin4bell_d" + m].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
}
if ((bellHolder["bar4bell_d" + m].healthno <= 0) && (!bellHolder["bell_d" + m].notdead)) {
bellHolder["bell_d" + m].notdead = true;
}
}
m++;
}
}
function makeLvl() {
bellTime4++;
if (bellTime4 >= bellLimit4) {
bellTotal4++;
bellLimit4 = bellLimit4 - 0.5;
bellHolder.attachMovie("enemy_mc4b", "bell_d" + bellTotal4, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount4 = enemyCount4 + 1;
bellHolder["bell_d" + bellTotal4].yspeed = fastSpeed;
bellHolder["bell_d" + bellTotal4].damage = 5;
bellHolder["bell_d" + bellTotal4].yorigspeed = bellHolder["bell_d" + bellTotal4].yspeed;
bellHolder["bell_d" + bellTotal4]._x = bellTop;
bellHolder["bell_d" + bellTotal4].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_d" + bellTotal4].baron) {
bellHolder.attachMovie("healthbar", "bar4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_d" + bellTotal4].baron = true;
bellHolder["bar4" + this._name].healthno = turtleHealth2;
bellHolder["bar4" + this._name].healthorigno = bellHolder["bar4" + this._name].healthno;
}
bellHolder["bar4" + this._name]._x = this._x + 6;
bellHolder["bar4" + this._name]._y = this._y - 25;
bellHolder["bar4" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
this.yspeed = this.yspeed - (quickSpeed * 1.2);
if (bellHolder["bar4" + this._name].healthno > 0) {
this.gotoAndStop(17);
}
crashsound.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
}
if (this.hitTest(wall3)) {
bellHolder["bar4" + this._name].removeMovieClip();
totalKillsCount = totalKillsCount + 1;
this.removeMovieClip();
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
this.yspeed = this.yspeed * -1.5;
if ((!bellHolder["bar4" + this._name].healthno) == 0) {
bellHolder.attachMovie("coin3", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = this._x;
bellHolder["coin4" + this._name]._y = this._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + mediumDrop;
score = score + mediumDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
bellHolder["bar4" + this._name].healthno = bellHolder["bar4" + this._name].healthno - sisDamage;
bellHolder["bar4" + this._name].bar_mc._x = bellHolder["bar4" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar4" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood4" + this._name]._x = this._x;
bellHolder["blood4" + this._name]._y = this._y;
}
if ((bellHolder["bar4" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin4" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin4" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin4" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin4" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount4 = enemyCount4 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar4" + this._name].removeMovieClip();
this.gotoAndPlay(2);
}
}
if (this._x <= 0) {
bellHolder["bar4" + this._name].removeMovieClip();
this.removeMovieClip();
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime4 = 0;
}
}
function rotatePlayer() {
if (_xmouse >= (player_mc._x + 50)) {
player_mc._rotation = Math.atan2(_ymouse - player_mc._y, _xmouse - player_mc._x) * radians2;
}
}
function shakeScreen() {
player_mc._x = player_mc._x + shakeQuan;
bellHolder._x = bellHolder._x + shakeQuan;
effectHolder_mc._x = effectHolder_mc._x + shakeQuan;
player_mc._y = player_mc._y + (shakeQuan * 2);
bellHolder._y = bellHolder._y + (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y + (shakeQuan * 2);
}
stop();
if (restart) {
continueGame();
}
crates = 3;
towerLife = 1;
towerLifeOrig = 1;
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = "Turtle Bounce";
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 999;
var totalEnemiesGoalRatio = 999;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTop = 700;
var bellTime = 189;
var bellLimit = 190;
var bellTotal = 0;
var bellTime2 = 40;
var bellLimit2 = 50;
var bellTotal2 = 0;
var bellTime3 = 150;
var bellLimit3 = 160;
var bellTotal3 = 0;
var bellTime4 = 0;
var bellLimit4 = 35;
var bellTotal4 = 0;
var bellTime5 = 120;
var bellLimit5 = 170;
var bellTotal5 = 0;
var bellTime6 = 50;
var bellLimit6 = 60;
var bellTotal6 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (machinegunbought) {
loadWeapon("Machine Gun");
} else if (shotgunbought) {
loadWeapon("Shotgun");
} else if (gatlinggunbought) {
loadWeapon("Gatling Gun");
} else if (sniperbought) {
loadWeapon("Sniper");
} else if (pulsegunbought) {
loadWeapon("Pulse Gun");
} else if (playerWeapon.flamethroweron && (flamethrowerbought)) {
loadWeapon("Flame Thrower");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
function showNotYet() {
notYet_mc.gotoAndStop(2);
}
function continueGame() {
_root.gameOver = false;
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
_root.gamewononce = false;
_root.nextFrame();
_root.playerWeapon.bulletAmmo = _root.playerWeapon.bulletClip;
_root.clip_mc.bar_mc._x = -15;
_root.reloadingNow = false;
_root.changeWeapon = false;
_root.reloadsound.start(0, 1);
_root.bulletAmmoCounter = 0;
_root.upgradesound.stop("upgradesound");
_root.bgsound.start(0, 999);
wall.gotoAndStop(1);
crate1.gotoAndStop(1);
crate2.gotoAndStop(1);
crate3.gotoAndStop(1);
ally_crate1.gotoAndStop(1);
ally_crate2.gotoAndStop(1);
ally_crate3.gotoAndStop(1);
crate1._y = crate1_origy;
crate2._y = crate2_origy;
crate3._y = crate3_origy;
ally_crate1._y = ally_crate1_origy;
ally_crate2._y = ally_crate2_origy;
ally_crate3._y = ally_crate3_origy;
player_mc._y = player_mc_origy;
player_anim._y = player_anim_origy;
head_mc._y = head_mc_origy;
crates = 3;
restart = false;
score = score * 0.75;
score = Math.round(score);
towerLife = towerLifeOrig;
gameOver_mc.removeMovieClip();
i = 0;
while (i < 999) {
_root.bellHolder["bell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 999) {
_root.bellHolder["bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 999) {
_root.bellHolder["bell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 999) {
_root.bellHolder["bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 999) {
_root.bellHolder["bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 999) {
_root.bellHolder["bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 999) {
_root.bellHolder["bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 999) {
_root.bellHolder["bell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 999) {
_root.bellHolder["bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 99) {
_root.bellHolder["bell_j" + p].removeMovieClip();
p++;
}
}
var pressed23 = false;
var prev1 = "UNPAUSED";
_quality = "MEDIUM";
prev = "HIGH";
_root.shooter._visible = true;
var bgsound = new Sound();
bgsound.attachSound("bgsound");
_root.bgsound.start(0, 99);
var upgradesound = new Sound();
upgradesound.attachSound("upgradesound");
var forestsound = new Sound();
forestsound.attachSound("forestsound");
forestsound.start(0, 999);
var zombiesound = new Sound();
zombiesound.attachSound("zombiesound");
_root.zombiesound.start(0, 1);
soundPlay = new Sound();
max = 3;
min = 1;
rndClip = Math.round(Math.random() * (max - min)) + min;
soundPlay.attachSound(rndClip);
var gpause = false;
_root.onEnterFrame = function () {
weaponbar.weaponbar.macRem.text = "Enemies left: " + ((totalEnemiesGoal - totalKillsCount) + 1);
if (_root.momAllyBought && (!momPlaced)) {
momIcon.gotoAndStop(1);
} else {
momIcon.gotoAndStop(2);
}
if (_root.dadAllyBought && (!dadPlaced)) {
dadIcon.gotoAndStop(1);
} else {
dadIcon.gotoAndStop(2);
}
if (_root.sisAllyBought && (!sisPlaced)) {
sisIcon.gotoAndStop(1);
} else {
sisIcon.gotoAndStop(2);
}
if ((momCrate1on || (momCrate2on)) || (momCrate3on)) {
momAllyOn = true;
} else {
momAllyOn = false;
}
if ((dadCrate1on || (dadCrate2on)) || (dadCrate3on)) {
dadAllyOn = true;
} else {
dadAllyOn = false;
}
if ((sisCrate1on || (sisCrate2on)) || (sisCrate3on)) {
sisAllyOn = true;
} else {
sisAllyOn = false;
}
weaponbar.weaponbar.scoreTxt.text = "Score: " + _root.score;
if (Key.isDown(80)) {
if (pressed23 == false) {
if (prev1 == "PAUSED") {
_root.gpause = false;
prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if (prev1 == "UNPAUSED") {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
prev1 = "PAUSED";
}
}
pressed23 = true;
} else {
pressed23 = false;
}
if (!gpause) {
ally_crate1.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate1._x + 75;
sisbullet._y = ally_crate1._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate2.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate2._x + 75;
sisbullet._y = ally_crate2._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate3.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate3._x + 75;
sisbullet._y = ally_crate3._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
if ((dadAllyOn && (towerLife < towerLifeOrig)) && (!winonce)) {
dadTimer++;
if (dadTimer > 77) {
towerLife = towerLife + 1;
life_mc.bar_mc._x = life_mc.bar_mc._x - ((1 / towerLifeOrig) * 30);
dadTimer = 0;
}
}
macLife.text = (towerLife + " / ") + towerLifeOrig;
if ((totalEnemies <= totalEnemiesGoal) && (!gameOver)) {
makeLvl();
}
if (totalKillsCount >= (totalEnemiesGoal + 1)) {
if (!winonce) {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
mouseClicked = false;
_root.attachMovie("wavecomplete", "wavecomplete", bellHolder.getNextHighestDepth());
wavecomplete._x = -640;
wavecomplete._y = 0;
winonce = true;
_root.notYet_mc.gotoAndStop(1);
}
}
if (mouseClicked && (!playerWeapon.pulsegunon)) {
fireWeapon();
}
if (playerWeapon.gatlingunon && (weaponFired)) {
shakeTime++;
if (shakeTime > 1) {
shakeQuan = 1;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
shakeTime = 0;
}
}
if (playerWeapon.machinegunon && (weaponFired)) {
shakeTime++;
if (shakeTime > 1) {
shakeQuan = 1;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
shakeTime = 0;
}
}
if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
}
rotatePlayer();
updateBullets();
macStats1.text = "$" + _root.playerWeapon.stats1Cost;
macStats2.text = "$" + _root.playerWeapon.stats2Cost;
if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macStats3.text = "Max";
} else {
macStats3.text = "$" + _root.playerWeapon.stats3Cost;
}
macName.text = _root.playerWeapon.itemName;
macHand.text = "Handling: " + playerWeapon.bulletOffset;
macDam.text = "Damage: " + playerWeapon.bulletDamage;
macRel.text = "Reload: " + playerWeapon.reloadSpeed;
if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macAmmo.text = "\u221E/\u221E";
} else {
macAmmo.text = (playerWeapon.bulletAmmo + "/") + playerWeapon.bulletClip;
}
CoinTxt.text = "$" + coins;
effectHolder_mc.laser_mc.clear();
if (playerWeapon.bulletAmmo <= 0) {
bulletAmmoCounter++;
clip_mc.bar_mc._x = clip_mc.bar_mc._x + 0.3;
}
if (bulletAmmoCounter >= 100) {
playerWeapon.bulletAmmo = playerWeapon.bulletClip;
var _local3 = new Array();
clip_mc.bar_mc._x = -15;
reloadingNow = false;
changeWeapon = false;
_root.reloadsound.start(0, 1);
bulletAmmoCounter = 0;
}
if (towerLife < 0) {
towerLife = 0;
}
if (towerLife == 0) {
if (crates == 3) {
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate1.gotoAndStop(3);
if (momCrate1on) {
momCrate1on = false;
momAllyBought = false;
}
if (dadCrate1on) {
dadCrate1on = false;
dadAllyBought = false;
}
if (sisCrate1on) {
sisCrate1on = false;
sisAllyBought = false;
}
ally_crate1.gotoAndStop(1);
crate2.gotoAndStop(2);
crate2.bounce_mc.gotoAndPlay(2);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 2;
_root.crashsound.start(0, 1);
} else if (crates == 2) {
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate2.gotoAndStop(3);
if (momCrate2on) {
momCrate2on = false;
momAllyBought = false;
}
if (dadCrate2on) {
dadCrate2on = false;
dadAllyBought = false;
}
if (sisCrate2on) {
sisCrate2on = false;
sisAllyBought = false;
}
ally_crate2.gotoAndStop(1);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 1;
_root.crashsound.start(0, 1);
} else if (crates == 1) {
crate3.gotoAndStop(3);
ally_crate3.gotoAndStop(1);
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
_root.restart = true;
_root.attachMovie("gameOver_mc", "gameOver_mc", bellHolder.getNextHighestDepth());
gameOver_mc._x = -7;
gameOver_mc._y = 0;
Mouse.show();
wall.gotoAndStop(2);
crates = 0;
_root.crashsound.start(0, 1);
if (momCrate3on) {
momCrate3on = false;
momAllyBought = false;
}
if (dadCrate3on) {
dadCrate3on = false;
dadAllyBought = false;
}
if (sisCrate3on) {
sisCrate3on = false;
sisAllyBought = false;
}
}
}
if (Key.isDown(49)) {
loadWeapon("Pistol");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 100;
}
}
if (Key.isDown(51)) {
if (shotgunbought) {
loadWeapon("Shotgun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(50)) {
if (machinegunbought) {
loadWeapon("Machine Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(52)) {
if (gatlinggunbought) {
loadWeapon("Gatling Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(53)) {
if (sniperbought) {
loadWeapon("Sniper");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(54)) {
if (pulsegunbought) {
loadWeapon("Pulse Gun");
weaponFired = false;
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 100;
} else {
showNotYet();
}
}
if (Key.isDown(55)) {
if (flamethrowerbought) {
loadWeapon("Flamethrower");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
}
};
upg_btn1.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats1Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats1Cost;
_root.playerWeapon.stats1Cost = _root.playerWeapon.stats1Cost * 2;
_root.playerWeapon.bulletDamage = _root.playerWeapon.bulletDamage + 0.5;
macInfo.text = "";
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn2.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats2Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats2Cost;
_root.playerWeapon.stats2Cost = _root.playerWeapon.stats2Cost * 2;
if (_root.playerWeapon.pulsegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 200;
} else if (_root.playerWeapon.machinegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.gatlingunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 50;
macInfo.text = "";
}
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn3.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats3Cost) {
macInfo.text = "";
_root.coins = _root.coins - _root.playerWeapon.stats3Cost;
_root.playerWeapon.stats3Cost = _root.playerWeapon.stats3Cost * 2;
if (_root.playerWeapon.shotgunon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 9;
} else if (_root.playerWeapon.sniperon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 6;
} else {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 10;
}
} else if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macInfo.text = "Maxed out!";
_root.errorsound.start(0, 1);
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
var fleshsound = new Sound();
fleshsound.attachSound("fleshsound");
var hoversound = new Sound();
hoversound.attachSound("hoversound");
var errorsound = new Sound();
errorsound.attachSound("errorsound");
var registersound = new Sound();
registersound.attachSound("registersound");
var gunsound = new Sound();
gunsound.attachSound("gunsound");
var machgunsound = new Sound();
machgunsound.attachSound("machgunsound");
var crashsound = new Sound();
crashsound.attachSound("crashsound");
var elecsound = new Sound();
elecsound.attachSound("elecsound");
var snipersound = new Sound();
snipersound.attachSound("snipersound");
var reloadsound = new Sound();
reloadsound.attachSound("reloadsound");
var gatlingsound = new Sound();
gatlingsound.attachSound("gatlingsound");
var coinsound = new Sound();
coinsound.attachSound("coinsound");
function addSparkles(_targetX, _targetY, _sparkNumber, _distance, _sparkSize) {
var _local6 = 0;
while (_local6 < _sparkNumber) {
var _local4 = _root.attachMovie("spark", "spark_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local3 = _root.attachMovie("spark2", "spark2_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = (_targetX + random(_distance)) - (_distance / 2);
_local4._y = (_targetY + random(_distance)) - (_distance / 2);
_local3._x = (_targetX + random(_distance)) - (_distance / 2);
_local3._y = (_targetY + random(_distance)) - (_distance / 2);
var _local5 = random(_sparkSize) + (_sparkSize / 4);
_local4._xscale = _local5;
_local4._yscale = _local5;
_local5 = random(_sparkSize) + (_sparkSize / 4);
_local3._xscale = _local5;
_local3._yscale = _local5;
_local3._rotation = random(359);
_local4._alpha = lightningAlpha;
_local3._alpha = lightningAlpha;
_local6++;
}
}
var lightningOffset = 15;
var lightningFrequency = 15;
var lightningWidth = 1;
var lightningColor = "0x5C98EF";
var lightningAlpha = 75;
var lightningBranches = 3;
var sparkNumber = 7;
var sparkDistance = 23;
var sparkSize = 100;
var reloadSpeed = 250;
var clearSpeed = 100;
var glow = (new flash.filters.GlowFilter());
glow.color = 16711680 /* 0xFF0000 */;
glow.alpha = 1;
glow.blurX = 7;
glow.blurY = 7;
glow.quality = 2;
effectHolder_mc.laser_mc.filters = new Array(glow);
var glow_color = lightningColor;
var glow_alpha = 0.6;
var glow_blurX = 5;
var glow_blurY = 5;
var glow_strength = 2;
var glow_quality = 3;
var effectHolder = effectHolder_mc;
var filter_glow = (new flash.filters.GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality));
effectHolder.filters = [filter_glow];
Instance of Symbol 1733 MovieClip "momIcon" in Frame 33
onClipEvent (load) {
this.tabEnabled = false;
xMouse1 = this._x;
yMouse1 = this._y;
}
onClipEvent (enterFrame) {
if (!dragged) {
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
on (press) {
dragged = true;
if (!root.winonce) {
this.startDrag();
}
}
on (release) {
this.stopDrag();
dragged = false;
if (this.hitTest(_root.crate1.crate_mc)) {
_root.ally_crate1.gotoAndStop(2);
_root.momCrate1on = true;
_root.momPlaced = true;
this.gotoAndStop(2);
}
if (this.hitTest(_root.crate2.crate_mc)) {
_root.ally_crate2.gotoAndStop(2);
_root.momCrate2on = true;
_root.momPlaced = true;
this.gotoAndStop(2);
}
if (this.hitTest(_root.crate3.crate_mc)) {
_root.ally_crate3.gotoAndStop(2);
_root.momCrate3on = true;
_root.momPlaced = true;
this.gotoAndStop(2);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1735 MovieClip "dadIcon" in Frame 33
onClipEvent (load) {
this.tabEnabled = false;
xMouse1 = this._x;
yMouse1 = this._y;
}
onClipEvent (enterFrame) {
if (!dragged) {
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
on (press) {
dragged = true;
if (!root.winonce) {
this.startDrag();
}
}
on (release) {
this.stopDrag();
dragged = false;
if (this.hitTest(_root.crate1.crate_mc)) {
_root.ally_crate1.gotoAndStop(3);
_root.dadCrate1on = true;
_root.dadPlaced = true;
this.gotoAndStop(2);
}
if (this.hitTest(_root.crate2.crate_mc)) {
_root.ally_crate2.gotoAndStop(3);
_root.dadCrate2on = true;
_root.dadPlaced = true;
this.gotoAndStop(2);
}
if (this.hitTest(_root.crate13.crate_mc)) {
_root.ally_crate3.gotoAndStop(3);
_root.dadCrate3on = true;
_root.dadPlaced = true;
this.gotoAndStop(2);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1737 MovieClip "sisIcon" in Frame 33
onClipEvent (load) {
this.tabEnabled = false;
xMouse1 = this._x;
yMouse1 = this._y;
}
onClipEvent (enterFrame) {
if (!dragged) {
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
on (press) {
dragged = true;
if (!root.winonce) {
this.startDrag();
}
}
on (release) {
this.stopDrag();
dragged = false;
if (this.hitTest(_root.crate1.crate_mc)) {
_root.ally_crate1.gotoAndStop(4);
_root.sisCrate1on = true;
_root.sisPlaced = true;
this.gotoAndStop(2);
}
if (this.hitTest(_root.crate2.crate_mc)) {
_root.ally_crate2.gotoAndStop(4);
_root.sisCrate2on = true;
_root.sisPlaced = true;
this.gotoAndStop(2);
}
if (this.hitTest(_root.crate3.crate_mc)) {
_root.ally_crate3.gotoAndStop(4);
_root.sisCrate3on = true;
_root.sisPlaced = true;
this.gotoAndStop(2);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1465 MovieClip "upg_btn1" in Frame 33
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn2" in Frame 33
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn3" in Frame 33
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1751 MovieClip in Frame 33
on (rollOver) {
Mouse.show();
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
on (release) {
if ((!restart) || (!winonce)) {
if (_root.prev1 == "PAUSED") {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if ((_root.prev1 = "UNPAUSED")) {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
_root.prev1 = "PAUSED";
}
}
}
Instance of Symbol 1754 MovieClip "Btn_Mute" in Frame 33
onClipEvent (load) {
this.tabEnabled = false;
}
on (release) {
if (_root.bgsound.getVolume() != 0) {
this.gotoAndStop(2);
_root.oldVolume = _root.bgsound.getVolume();
_root.slider.slidebar.onEnterFrame = null;
_root.bgsound.setVolume(0);
} else {
this.gotoAndStop(1);
_root.slider.slidebar.onEnterFrame = _root.adjustVolume;
_root.bgsound.setVolume(_root.oldVolume);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Frame 34
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
SpitFire();
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function createBullet() {
var _local3 = 0;
while (_local3 < playerWeapon.bulletNumber) {
var _local2 = _root.attachMovie("bullet", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
if (playerWeapon.flamethroweron) {
_local2.gotoAndStop(2);
}
if (playerWeapon.pulsegunon) {
_local2._x = _xmouse;
_local2._y = _ymouse;
_local2.cacheAsBitmap = true;
} else {
_local2._x = player_mc._x + (playerWeapon.barrelLength * Math.cos(player_mc._rotation * radians));
_local2._y = player_mc._y + (playerWeapon.barrelLength * Math.sin(player_mc._rotation * radians));
}
var _local5 = random(playerWeapon.bulletOffset) - (playerWeapon.bulletOffset / 2);
var _local4 = (player_mc._rotation + _local5) * radians;
_local2.xSpeed = Math.cos(_local4) * playerWeapon.bulletSpeed;
_local2.ySpeed = Math.sin(_local4) * playerWeapon.bulletSpeed;
if (playerWeapon.pulsegunon) {
_local2.lifeTimer = setInterval(destroyBullet, playerWeapon.bulletMaxAge, _local2);
}
bulletArray.push(_local2);
_local3++;
}
startReloading();
}
function startReloading() {
playerWeapon.reloadComplete = false;
playerWeapon.reloadTimer = setInterval(gunReloaded, playerWeapon.reloadSpeed);
screenTimer = setInterval(this, "clearScreen", clearSpeed);
}
function gunReloaded() {
clearInterval(playerWeapon.reloadTimer);
playerWeapon.reloadComplete = true;
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
checkStageHit(_local1);
_local2++;
}
}
function destroyBullet(_bullet) {
var _local1 = 0;
while (_local1 < bulletArray.length) {
var _local2 = bulletArray[_local1];
if (_local2 == _bullet) {
bulletArray.splice(_local1, 1);
if (playerWeapon.pulsegunon) {
clearInterval(_local2.lifeTimer);
}
removeMovieClip(_local2);
}
_local1++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit7(_bullet) {
p = 0;
while (p < totalEnemiesGoalRatio) {
if (bellHolder["bell_g" + p].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar7bell_g" + p].healthno) == 0) {
bellHolder["bell_g" + p].yspeed = bellHolder["bell_g" + p].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood2bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["blood2bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["blood2bell_g" + p]._y = bellHolder["bell_g" + p]._y - 30;
bellHolder["bell_g" + p]._x = bellHolder["bell_g" + p]._x + 3;
destroyBullet(_bullet);
bellHolder["bar7bell_g" + p].bar_mc._x = bellHolder["bar7bell_g" + p].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar7bell_g" + p].healthorigno) * 30);
bellHolder["bar7bell_g" + p].healthno = bellHolder["bar7bell_g" + p].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar7bell_g" + p].healthno <= 0) && (!bellHolder["bell_g" + p].notdead)) {
bellHolder["bell_g" + p].notdead = true;
bellHolder.attachMovie("coin", "coin7bell_g" + p, bellHolder.getNextHighestDepth());
bellHolder["coin7bell_g" + p]._x = bellHolder["bell_g" + p]._x;
bellHolder["coin7bell_g" + p]._y = bellHolder["bell_g" + p]._y + 20;
bellHolder["coin7bell_g" + p].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount2 = enemyCount2 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_g" + p].yspeed = -1;
bellHolder["bar7bell_g" + p].removeMovieClip();
bellHolder["bell_g" + p].gotoAndPlay(2);
}
}
p++;
}
}
function checkWallHit6(_bullet) {
o = 0;
while (o < totalEnemiesGoalRatio) {
if (bellHolder["bell_f" + o].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar6bell_f" + o].healthno) == 0) {
bellHolder["bell_f" + o].yspeed = bellHolder["bell_f" + o].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["blood6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["blood6bell_f" + o]._y = bellHolder["bell_f" + o]._y;
bellHolder["bell_f" + o]._x = bellHolder["bell_f" + o]._x + 3;
destroyBullet(_bullet);
bellHolder["bar6bell_f" + o].bar_mc._x = bellHolder["bar6bell_f" + o].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar6bell_f" + o].healthorigno) * 30);
bellHolder["bar6bell_f" + o].healthno = bellHolder["bar6bell_f" + o].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar6bell_f" + o].healthno <= 0) && (!bellHolder["bell_f" + o].notdead)) {
bellHolder["bell_f" + o].notdead = true;
bellHolder.attachMovie("coin", "coin6bell_f" + o, bellHolder.getNextHighestDepth());
bellHolder["coin6bell_f" + o]._x = bellHolder["bell_f" + o]._x;
bellHolder["coin6bell_f" + o]._y = bellHolder["bell_f" + o]._y + 20;
bellHolder["coin6bell_f" + o].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 50;
bellHolder["bell_f" + o].yspeed = -1;
bellHolder["bar6bell_f" + o].removeMovieClip();
bellHolder["bell_f" + o].gotoAndPlay(2);
}
}
o++;
}
}
function makeLvl() {
bellTime7++;
if ((bellTime7 >= bellLimit7) && (enemyCount7 < 10)) {
bellTotal7++;
bellHolder.attachMovie("enemy_mc6b", "bell_g" + bellTotal7, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount7 = enemyCount7 + 1;
bellHolder["bell_g" + bellTotal7].yspeed = fastSpeed;
bellHolder["bell_g" + bellTotal7].damage = 1;
bellHolder["bell_g" + bellTotal7].attackTime = 0;
bellHolder["bell_g" + bellTotal7].yorigspeed = bellHolder["bell_g" + bellTotal7].yspeed;
bellHolder["bell_g" + bellTotal7]._x = bellTop;
bellHolder["bell_g" + bellTotal7].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_g" + bellTotal7].baron) {
bellHolder.attachMovie("healthbar", "bar7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_g" + bellTotal7].baron = true;
bellHolder["bar7" + this._name].healthno = rabbitHealth2;
bellHolder["bar7" + this._name].healthorigno = bellHolder["bar7" + this._name].healthno;
}
bellHolder["bar7" + this._name]._x = this._x;
bellHolder["bar7" + this._name]._y = this._y - 20;
bellHolder["bar7" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar7" + this._name].healthno) == 0) {
bellHolder["bar7" + this._name].healthno = bellHolder["bar7" + this._name].healthno - sisDamage;
bellHolder["bar7" + this._name].bar_mc._x = bellHolder["bar7" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar7" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood7" + this._name]._x = this._x;
bellHolder["blood7" + this._name]._y = this._y;
}
if ((bellHolder["bar7" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin7" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin7" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin7" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin7" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount7 = enemyCount7 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar7" + this._name].removeMovieClip();
this.gotoAndPlay(2);
}
}
if (this._x <= 0) {
bellHolder["bar7" + this._name].removeMovieClip();
this.removeMovieClip();
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime7 = 0;
}
bellTime6++;
if ((bellTime6 >= bellLimit6) && (enemyCount6 < 6)) {
bellTotal6++;
bellHolder.attachMovie("enemy_mc6", "bell_f" + bellTotal6, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6]._y = Math.floor(Math.random() * 151) + 200;
totalEnemies = totalEnemies + 1;
enemyCount6 = enemyCount6 + 1;
bellHolder["bell_f" + bellTotal6].yspeed = normalSpeed;
bellHolder["bell_f" + bellTotal6].damage = 1;
bellHolder["bell_f" + bellTotal6].attackTime = 0;
bellHolder["bell_f" + bellTotal6].yorigspeed = bellHolder["bell_f" + bellTotal6].yspeed;
bellHolder["bell_f" + bellTotal6]._x = bellTop;
bellHolder["bell_f" + bellTotal6].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_f" + bellTotal6].baron) {
bellHolder.attachMovie("healthbar", "bar6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_f" + bellTotal6].baron = true;
bellHolder["bar6" + this._name].healthno = rabbitHealth;
bellHolder["bar6" + this._name].healthorigno = bellHolder["bar6" + this._name].healthno;
}
bellHolder["bar6" + this._name]._x = this._x;
bellHolder["bar6" + this._name]._y = this._y - 20;
bellHolder["bar6" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._x = this._x - this.yspeed;
if (this.hitTest(wall)) {
this.attackTime++;
this._x = this._x + (this.yspeed * 8);
if (this.attackTime > 10) {
if (crates == 3) {
crate1.crate_mc.gotoAndPlay(2);
} else if (crates == 2) {
crate2.crate_mc.gotoAndPlay(2);
} else if (crates == 1) {
crate3.crate_mc.gotoAndPlay(2);
}
soundPlay.start(0, 1);
life_mc.bar_mc._x = life_mc.bar_mc._x + ((this.damage / towerLifeOrig) * 30);
towerLife = towerLife - this.damage;
this.attackTime = 0;
}
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar6" + this._name].healthno) == 0) {
bellHolder["bar6" + this._name].healthno = bellHolder["bar6" + this._name].healthno - sisDamage;
bellHolder["bar6" + this._name].bar_mc._x = bellHolder["bar6" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar6" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood6" + this._name]._x = this._x;
bellHolder["blood6" + this._name]._y = this._y;
}
if ((bellHolder["bar6" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin6" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin6" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin6" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin6" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount6 = enemyCount6 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar6" + this._name].removeMovieClip();
this.gotoAndPlay(2);
}
}
if (this._x <= 0) {
bellHolder["bar6" + this._name].removeMovieClip();
this.removeMovieClip();
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime6 = 0;
}
}
function rotatePlayer() {
if (_xmouse >= (player_mc._x + 50)) {
player_mc._rotation = Math.atan2(_ymouse - player_mc._y, _xmouse - player_mc._x) * radians2;
}
}
function shakeScreen() {
player_mc._x = player_mc._x + shakeQuan;
bellHolder._x = bellHolder._x + shakeQuan;
effectHolder_mc._x = effectHolder_mc._x + shakeQuan;
player_mc._y = player_mc._y + (shakeQuan * 2);
bellHolder._y = bellHolder._y + (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y + (shakeQuan * 2);
}
stop();
if (restart) {
continueGame();
}
crates = 3;
towerLife = 10;
towerLifeOrig = 10;
flamethrowerbought = true;
loadWeapon("Flame Thrower");
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 12;
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 70;
var totalEnemiesGoalRatio = totalEnemiesGoal;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTop = 700;
var bellTime = 389;
var bellLimit = 390;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 150;
var bellTotal2 = 0;
var bellTime3 = 750;
var bellLimit3 = 760;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 900;
var bellLimit5 = 950;
var bellTotal5 = 0;
var bellTime6 = 60;
var bellLimit6 = 80;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 70;
var bellTotal7 = 0;
var bellTime8 = 199;
var bellLimit8 = 200;
var bellTotal8 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (playerWeapon.flamethroweron && (flamethrowerbought)) {
loadWeapon("Flame Thrower");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
function showNotYet() {
notYet_mc.gotoAndStop(2);
}
function continueGame() {
_root.gameOver = false;
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
_root.gamewononce = false;
_root.nextFrame();
_root.playerWeapon.bulletAmmo = _root.playerWeapon.bulletClip;
_root.clip_mc.bar_mc._x = -15;
_root.reloadingNow = false;
_root.changeWeapon = false;
_root.reloadsound.start(0, 1);
_root.bulletAmmoCounter = 0;
_root.upgradesound.stop("upgradesound");
_root.bgsound.start(0, 999);
wall.gotoAndStop(1);
crate1.gotoAndStop(1);
crate2.gotoAndStop(1);
crate3.gotoAndStop(1);
ally_crate1.gotoAndStop(1);
ally_crate2.gotoAndStop(1);
ally_crate3.gotoAndStop(1);
crate1._y = crate1_origy;
crate2._y = crate2_origy;
crate3._y = crate3_origy;
ally_crate1._y = ally_crate1_origy;
ally_crate2._y = ally_crate2_origy;
ally_crate3._y = ally_crate3_origy;
player_mc._y = player_mc_origy;
player_anim._y = player_anim_origy;
head_mc._y = head_mc_origy;
crates = 3;
restart = false;
score = score * 0.75;
score = Math.round(score);
towerLife = towerLifeOrig;
gameOver_mc.removeMovieClip();
i = 0;
while (i < 999) {
_root.bellHolder["bell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 999) {
_root.bellHolder["bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 999) {
_root.bellHolder["bell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 999) {
_root.bellHolder["bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 999) {
_root.bellHolder["bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 999) {
_root.bellHolder["bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 999) {
_root.bellHolder["bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 999) {
_root.bellHolder["bell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 999) {
_root.bellHolder["bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 99) {
_root.bellHolder["bell_j" + p].removeMovieClip();
p++;
}
}
var pressed23 = false;
var prev1 = "UNPAUSED";
_quality = "MEDIUM";
prev = "HIGH";
_root.shooter._visible = true;
var bgsound = new Sound();
bgsound.attachSound("bgsound");
_root.bgsound.start(0, 99);
var upgradesound = new Sound();
upgradesound.attachSound("upgradesound");
var forestsound = new Sound();
forestsound.attachSound("forestsound");
forestsound.start(0, 999);
var zombiesound = new Sound();
zombiesound.attachSound("zombiesound");
_root.zombiesound.start(0, 1);
soundPlay = new Sound();
max = 3;
min = 1;
rndClip = Math.round(Math.random() * (max - min)) + min;
soundPlay.attachSound(rndClip);
var gpause = false;
_root.onEnterFrame = function () {
weaponbar.weaponbar.macRem.text = "Enemies left: " + ((totalEnemiesGoal - totalKillsCount) + 1);
if (_root.momAllyBought && (!momPlaced)) {
momIcon.gotoAndStop(1);
} else {
momIcon.gotoAndStop(2);
}
if (_root.dadAllyBought && (!dadPlaced)) {
dadIcon.gotoAndStop(1);
} else {
dadIcon.gotoAndStop(2);
}
if (_root.sisAllyBought && (!sisPlaced)) {
sisIcon.gotoAndStop(1);
} else {
sisIcon.gotoAndStop(2);
}
if ((momCrate1on || (momCrate2on)) || (momCrate3on)) {
momAllyOn = true;
} else {
momAllyOn = false;
}
if ((dadCrate1on || (dadCrate2on)) || (dadCrate3on)) {
dadAllyOn = true;
} else {
dadAllyOn = false;
}
if ((sisCrate1on || (sisCrate2on)) || (sisCrate3on)) {
sisAllyOn = true;
} else {
sisAllyOn = false;
}
weaponbar.weaponbar.scoreTxt.text = "Score: " + _root.score;
if (Key.isDown(80)) {
if (pressed23 == false) {
if (prev1 == "PAUSED") {
_root.gpause = false;
prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if (prev1 == "UNPAUSED") {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
prev1 = "PAUSED";
}
}
pressed23 = true;
} else {
pressed23 = false;
}
if (!gpause) {
ally_crate1.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate1._x + 75;
sisbullet._y = ally_crate1._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate2.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate2._x + 75;
sisbullet._y = ally_crate2._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate3.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate3._x + 75;
sisbullet._y = ally_crate3._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
if ((dadAllyOn && (towerLife < towerLifeOrig)) && (!winonce)) {
dadTimer++;
if (dadTimer > 77) {
towerLife = towerLife + 1;
life_mc.bar_mc._x = life_mc.bar_mc._x - ((1 / towerLifeOrig) * 30);
dadTimer = 0;
}
}
macLife.text = (towerLife + " / ") + towerLifeOrig;
if ((totalEnemies <= totalEnemiesGoal) && (!gameOver)) {
makeLvl();
}
if (totalKillsCount >= (totalEnemiesGoal + 1)) {
if (!winonce) {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
mouseClicked = false;
_root.attachMovie("wavecomplete", "wavecomplete", bellHolder.getNextHighestDepth());
wavecomplete._x = -640;
wavecomplete._y = 0;
winonce = true;
_root.notYet_mc.gotoAndStop(1);
}
}
if (mouseClicked && (!playerWeapon.pulsegunon)) {
fireWeapon();
}
if (playerWeapon.gatlingunon && (weaponFired)) {
shakeTime++;
if (shakeTime > 1) {
shakeQuan = 1;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
shakeTime = 0;
}
}
if (playerWeapon.machinegunon && (weaponFired)) {
shakeTime++;
if (shakeTime > 1) {
shakeQuan = 1;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
shakeTime = 0;
}
}
if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
}
rotatePlayer();
updateBullets();
macStats1.text = "$" + _root.playerWeapon.stats1Cost;
macStats2.text = "$" + _root.playerWeapon.stats2Cost;
if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macStats3.text = "Max";
} else {
macStats3.text = "$" + _root.playerWeapon.stats3Cost;
}
macName.text = _root.playerWeapon.itemName;
macHand.text = "Handling: " + playerWeapon.bulletOffset;
macDam.text = "Damage: " + playerWeapon.bulletDamage;
macRel.text = "Reload: " + playerWeapon.reloadSpeed;
if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macAmmo.text = "\u221E/\u221E";
} else {
macAmmo.text = (playerWeapon.bulletAmmo + "/") + playerWeapon.bulletClip;
}
CoinTxt.text = "$" + coins;
effectHolder_mc.laser_mc.clear();
if (playerWeapon.bulletAmmo <= 0) {
bulletAmmoCounter++;
clip_mc.bar_mc._x = clip_mc.bar_mc._x + 0.3;
}
if (bulletAmmoCounter >= 100) {
playerWeapon.bulletAmmo = playerWeapon.bulletClip;
var _local3 = new Array();
clip_mc.bar_mc._x = -15;
reloadingNow = false;
changeWeapon = false;
_root.reloadsound.start(0, 1);
bulletAmmoCounter = 0;
}
if (towerLife < 0) {
towerLife = 0;
}
if (towerLife == 0) {
if (crates == 3) {
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate1.gotoAndStop(3);
if (momCrate1on) {
momCrate1on = false;
momAllyBought = false;
}
if (dadCrate1on) {
dadCrate1on = false;
dadAllyBought = false;
}
if (sisCrate1on) {
sisCrate1on = false;
sisAllyBought = false;
}
ally_crate1.gotoAndStop(1);
crate2.gotoAndStop(2);
crate2.bounce_mc.gotoAndPlay(2);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 2;
_root.crashsound.start(0, 1);
} else if (crates == 2) {
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate2.gotoAndStop(3);
if (momCrate2on) {
momCrate2on = false;
momAllyBought = false;
}
if (dadCrate2on) {
dadCrate2on = false;
dadAllyBought = false;
}
if (sisCrate2on) {
sisCrate2on = false;
sisAllyBought = false;
}
ally_crate2.gotoAndStop(1);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 1;
_root.crashsound.start(0, 1);
} else if (crates == 1) {
crate3.gotoAndStop(3);
ally_crate3.gotoAndStop(1);
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
_root.restart = true;
_root.attachMovie("gameOver_mc", "gameOver_mc", bellHolder.getNextHighestDepth());
gameOver_mc._x = -7;
gameOver_mc._y = 0;
Mouse.show();
wall.gotoAndStop(2);
crates = 0;
_root.crashsound.start(0, 1);
if (momCrate3on) {
momCrate3on = false;
momAllyBought = false;
}
if (dadCrate3on) {
dadCrate3on = false;
dadAllyBought = false;
}
if (sisCrate3on) {
sisCrate3on = false;
sisAllyBought = false;
}
}
}
if (Key.isDown(49)) {
loadWeapon("Pistol");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 100;
}
}
if (Key.isDown(51)) {
if (shotgunbought) {
loadWeapon("Shotgun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(50)) {
if (machinegunbought) {
loadWeapon("Machine Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(52)) {
if (gatlinggunbought) {
loadWeapon("Gatling Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(53)) {
if (sniperbought) {
loadWeapon("Sniper");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(54)) {
if (pulsegunbought) {
loadWeapon("Pulse Gun");
weaponFired = false;
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 100;
} else {
showNotYet();
}
}
if (Key.isDown(55)) {
if (flamethrowerbought) {
loadWeapon("Flamethrower");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
}
};
upg_btn1.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats1Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats1Cost;
_root.playerWeapon.stats1Cost = _root.playerWeapon.stats1Cost * 2;
_root.playerWeapon.bulletDamage = _root.playerWeapon.bulletDamage + 0.5;
macInfo.text = "";
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn2.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats2Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats2Cost;
_root.playerWeapon.stats2Cost = _root.playerWeapon.stats2Cost * 2;
if (_root.playerWeapon.pulsegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 200;
} else if (_root.playerWeapon.machinegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.gatlingunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 50;
macInfo.text = "";
}
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn3.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats3Cost) {
macInfo.text = "";
_root.coins = _root.coins - _root.playerWeapon.stats3Cost;
_root.playerWeapon.stats3Cost = _root.playerWeapon.stats3Cost * 2;
if (_root.playerWeapon.shotgunon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 9;
} else if (_root.playerWeapon.sniperon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 6;
} else {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 10;
}
} else if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macInfo.text = "Maxed out!";
_root.errorsound.start(0, 1);
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
var fleshsound = new Sound();
fleshsound.attachSound("fleshsound");
var hoversound = new Sound();
hoversound.attachSound("hoversound");
var errorsound = new Sound();
errorsound.attachSound("errorsound");
var registersound = new Sound();
registersound.attachSound("registersound");
var gunsound = new Sound();
gunsound.attachSound("gunsound");
var machgunsound = new Sound();
machgunsound.attachSound("machgunsound");
var crashsound = new Sound();
crashsound.attachSound("crashsound");
var elecsound = new Sound();
elecsound.attachSound("elecsound");
var snipersound = new Sound();
snipersound.attachSound("snipersound");
var reloadsound = new Sound();
reloadsound.attachSound("reloadsound");
var gatlingsound = new Sound();
gatlingsound.attachSound("gatlingsound");
var coinsound = new Sound();
coinsound.attachSound("coinsound");
function addSparkles(_targetX, _targetY, _sparkNumber, _distance, _sparkSize) {
var _local6 = 0;
while (_local6 < _sparkNumber) {
var _local4 = _root.attachMovie("spark", "spark_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local3 = _root.attachMovie("spark2", "spark2_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = (_targetX + random(_distance)) - (_distance / 2);
_local4._y = (_targetY + random(_distance)) - (_distance / 2);
_local3._x = (_targetX + random(_distance)) - (_distance / 2);
_local3._y = (_targetY + random(_distance)) - (_distance / 2);
var _local5 = random(_sparkSize) + (_sparkSize / 4);
_local4._xscale = _local5;
_local4._yscale = _local5;
_local5 = random(_sparkSize) + (_sparkSize / 4);
_local3._xscale = _local5;
_local3._yscale = _local5;
_local3._rotation = random(359);
_local4._alpha = lightningAlpha;
_local3._alpha = lightningAlpha;
_local6++;
}
}
var lightningOffset = 15;
var lightningFrequency = 15;
var lightningWidth = 1;
var lightningColor = "0x5C98EF";
var lightningAlpha = 75;
var lightningBranches = 3;
var sparkNumber = 7;
var sparkDistance = 23;
var sparkSize = 100;
var reloadSpeed = 250;
var clearSpeed = 100;
var glow = (new flash.filters.GlowFilter());
glow.color = 16711680 /* 0xFF0000 */;
glow.alpha = 1;
glow.blurX = 7;
glow.blurY = 7;
glow.quality = 2;
effectHolder_mc.laser_mc.filters = new Array(glow);
var glow_color = lightningColor;
var glow_alpha = 0.6;
var glow_blurX = 5;
var glow_blurY = 5;
var glow_strength = 2;
var glow_quality = 3;
var effectHolder = effectHolder_mc;
var filter_glow = (new flash.filters.GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality));
effectHolder.filters = [filter_glow];
Frame 35
if (restart) {
continueGame();
}
Frame 36
function loadWeapon(_id) {
gunReloaded();
var _local1 = 0;
while (_local1 < weaponDatabase.length) {
var _local2 = weaponDatabase[_local1].itemName;
if (_local2 == _id) {
playerWeapon = weaponDatabase[_local1];
return(undefined);
}
_local1++;
}
}
function fireWeapon(xStart, yStart, xEnd, yEnd) {
if ((playerWeapon.reloadComplete && (playerWeapon.bulletAmmo > 0)) && (!reloadingNow)) {
weaponFired = true;
shooter.gotoAndPlay(2);
if (playerWeapon.sniperon) {
_root.snipersound.start(0, 1);
_root.reloadsound.start(0, 1);
} else if (playerWeapon.machinegunon) {
_root.machgunsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.flamethroweron && (weaponFired)) {
SpitFire();
} else if (playerWeapon.gatlingunon && (weaponFired)) {
_root.gatlingsound.start(0, 1);
shakeQuan = 1;
shakeScreen();
} else if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
shakeScreen();
_root.elecsound.start(0, 1);
} else {
_root.gunsound.start(0, 1);
}
createBullet();
if (playerWeapon.shotgunon) {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 3;
} else {
playerWeapon.bulletAmmo = playerWeapon.bulletAmmo - 1;
}
if (playerWeapon.bulletAmmo <= 0) {
reloadingNow = true;
}
if (playerWeapon.pulsegunon) {
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
effectHolder_mc.laser_mc.lineStyle(5, 6068463, 75);
effectHolder_mc.laser_mc.moveTo(xStart, yStart);
effectHolder_mc.laser_mc.lineTo(xEnd, yEnd);
}
}
}
function clearScreen() {
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
}
function createBullet() {
var _local3 = 0;
while (_local3 < playerWeapon.bulletNumber) {
var _local2 = _root.attachMovie("bullet", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
if (playerWeapon.flamethroweron) {
_local2.gotoAndStop(2);
}
if (playerWeapon.pulsegunon) {
_local2._x = _xmouse;
_local2._y = _ymouse;
_local2.cacheAsBitmap = true;
} else {
_local2._x = player_mc._x + (playerWeapon.barrelLength * Math.cos(player_mc._rotation * radians));
_local2._y = player_mc._y + (playerWeapon.barrelLength * Math.sin(player_mc._rotation * radians));
}
var _local5 = random(playerWeapon.bulletOffset) - (playerWeapon.bulletOffset / 2);
var _local4 = (player_mc._rotation + _local5) * radians;
_local2.xSpeed = Math.cos(_local4) * playerWeapon.bulletSpeed;
_local2.ySpeed = Math.sin(_local4) * playerWeapon.bulletSpeed;
if (playerWeapon.pulsegunon) {
_local2.lifeTimer = setInterval(destroyBullet, playerWeapon.bulletMaxAge, _local2);
}
bulletArray.push(_local2);
_local3++;
}
startReloading();
}
function startReloading() {
playerWeapon.reloadComplete = false;
playerWeapon.reloadTimer = setInterval(gunReloaded, playerWeapon.reloadSpeed);
screenTimer = setInterval(this, "clearScreen", clearSpeed);
}
function gunReloaded() {
clearInterval(playerWeapon.reloadTimer);
playerWeapon.reloadComplete = true;
}
function updateBullets() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local1 = bulletArray[_local2];
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
checkWallHit10(_local1);
checkWallHit(_local1);
checkStageHit2(_local1);
checkStageHit(_local1);
_local2++;
}
}
function destroyBullet(_bullet) {
var _local1 = 0;
while (_local1 < bulletArray.length) {
var _local2 = bulletArray[_local1];
if (_local2 == _bullet) {
bulletArray.splice(_local1, 1);
if (playerWeapon.pulsegunon) {
clearInterval(_local2.lifeTimer);
}
removeMovieClip(_local2);
}
_local1++;
}
}
function checkStageHit(_bullet) {
if (_bullet._x > 640) {
destroyBullet(_bullet);
}
}
function checkStageHit2(_bullet) {
if (_bullet._y > 395) {
destroyBullet(_bullet);
}
}
function checkWallHit(_bullet) {
j = 0;
while (j < totalEnemiesGoalRatio) {
if (bellHolder["bell_a" + j].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
if ((!bellHolder["barbell_a" + j].healthno) == 0) {
bellHolder["bell_a" + j].yspeed = bellHolder["bell_a" + j].yorigspeed;
bellHolder.attachMovie("blood_mc", "bloodbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["bloodbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["bloodbell_a" + j]._y = bellHolder["bell_a" + j]._y;
bellHolder["bell_a" + j]._x = bellHolder["bell_a" + j]._x + 3;
destroyBullet(_bullet);
bellHolder["barbell_a" + j].bar_mc._x = bellHolder["barbell_a" + j].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["barbell_a" + j].healthorigno) * 30);
bellHolder["barbell_a" + j].healthno = bellHolder["barbell_a" + j].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["barbell_a" + j].healthno <= 0) && (!bellHolder["bell_a" + j].notdead)) {
bellHolder["bell_a" + j].notdead = true;
bellHolder.attachMovie("coin", "coinbell_a" + j, bellHolder.getNextHighestDepth());
bellHolder["coinbell_a" + j]._x = bellHolder["bell_a" + j]._x;
bellHolder["coinbell_a" + j]._y = bellHolder["bell_a" + j]._y + 20;
bellHolder["coinbell_a" + j].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + smallDrop;
score = score + smallDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount1 = enemyCount1 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_a" + j].yspeed = -1;
bellHolder["barbell_a" + j].removeMovieClip();
bellHolder["bell_a" + j].gotoAndPlay(2);
}
}
j++;
}
}
function checkWallHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(_bullet)) {
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar10bell_j" + k].healthno) == 0) {
bellHolder["bell_j" + k].yspeed = bellHolder["bell_j" + k].yorigspeed;
bellHolder.attachMovie("blood_mc", "blood10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["blood10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["blood10bell_j" + k]._y = bellHolder["bell_j" + k]._y;
bellHolder["bell_j" + k]._x = bellHolder["bell_j" + k]._x + 3;
destroyBullet(_bullet);
bellHolder["bar10bell_j" + k].bar_mc._x = bellHolder["bar10bell_j" + k].bar_mc._x - ((playerWeapon.bulletDamage / bellHolder["bar10bell_j" + k].healthorigno) * 30);
bellHolder["bar10bell_j" + k].healthno = bellHolder["bar10bell_j" + k].healthno - playerWeapon.bulletDamage;
}
if ((bellHolder["bar10bell_j" + k].healthno <= 0) && (!bellHolder["bell_j" + k].notdead)) {
bellHolder["bell_j" + k].notdead = true;
bellHolder.attachMovie("coin3", "coin10bell_j" + k, bellHolder.getNextHighestDepth());
bellHolder["coin10bell_j" + k]._x = bellHolder["bell_j" + k]._x;
bellHolder["coin10bell_j" + k]._y = bellHolder["bell_j" + k]._y + 20;
bellHolder["coin10bell_j" + k].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + bigDrop;
score = score + bigDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder["bell_j" + k].yspeed = -1;
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].gotoAndPlay(2);
}
}
k++;
}
}
function checkMiniHit10(_bullet) {
k = 0;
while (k < totalEnemiesGoalRatio) {
if (bellHolder["bell_j" + k].hitTest(wall)) {
towerLife = towerLife - 1;
_root.cratesound.start(0, 1);
bellHolder["bar10bell_j" + k].removeMovieClip();
bellHolder["bell_j" + k].removeMovieClip();
}
k++;
}
}
function makeLvl() {
bellTime10++;
if ((bellTime10 >= bellLimit10) && (enemyCount10 < 20)) {
bellTotal10++;
bellLimit10 = bellLimit10 - 0.5;
miniSnakeSpeed = miniSnakeSpeed + 0.5;
bellHolder.attachMovie("enemy_mc10", "bell_j" + bellTotal10, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10]._x = Math.floor(Math.random() * 421) + 200;
totalEnemies = totalEnemies + 1;
enemyCount10 = enemyCount10 + 0.3;
bellHolder["bell_j" + bellTotal10].xspeed = miniSnakeSpeed - 1;
bellHolder["bell_j" + bellTotal10].yspeed = quickSpeed + 3;
bellHolder["bell_j" + bellTotal10].damage = 3;
bellHolder["bell_j" + bellTotal10].fallTime = 0;
bellHolder["bell_j" + bellTotal10].attackTime = 0;
bellHolder["bell_j" + bellTotal10].randFall = Math.floor(Math.random() * 12) + 30;
bellHolder["bell_j" + bellTotal10].yorigspeed = bellHolder["bell_j" + bellTotal10].yspeed;
bellHolder["bell_j" + bellTotal10]._y = bellTop2;
bellHolder["bell_j" + bellTotal10].onEnterFrame = function () {
if (!gpause) {
this.fallTime++;
if (!bellHolder["bell_j" + bellTotal10].baron) {
bellHolder.attachMovie("healthbar", "bar10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_j" + bellTotal10].baron = true;
bellHolder["bar10" + this._name].healthno = 1;
bellHolder["bar10" + this._name].healthorigno = bellHolder["bar10" + this._name].healthno;
}
bellHolder["bar10" + this._name]._x = this._x;
bellHolder["bar10" + this._name]._y = this._y;
bellHolder["bar10" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
if (this.hitTest(wall3)) {
this._x = this._x - this.yspeed;
this.xspeed = 0;
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar10" + this._name].healthno) == 0) {
bellHolder["bar10" + this._name].healthno = bellHolder["bar10" + this._name].healthno - sisDamage;
bellHolder["bar10" + this._name].bar_mc._x = bellHolder["bar10" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar10" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood10" + this._name]._x = this._x;
bellHolder["blood10" + this._name]._y = this._y;
}
if ((bellHolder["bar10" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin10" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin10" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin10" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin10" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount10 = enemyCount10 - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar10" + this._name].removeMovieClip();
this.gotoAndPlay(10);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime10 = 0;
}
bellTime++;
if ((bellTime >= bellLimit) && (enemyCount1 < 20)) {
miniSnakeSpeed = miniSnakeSpeed + 0.5;
bellTotal++;
bellHolder.attachMovie("enemy_mc10", "bell_a" + bellTotal, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal]._x = Math.floor(Math.random() * 421) + 200;
enemyCount1 = enemyCount1 + 1;
totalEnemies = totalEnemies + 1;
bellHolder["bell_a" + bellTotal].xspeed = miniSnakeSpeed - 1;
bellHolder["bell_a" + bellTotal].yspeed = quickSpeed + 3;
bellHolder["bell_a" + bellTotal].damage = 1;
bellHolder["bell_a" + bellTotal].attackTime = 0;
bellHolder["bell_a" + bellTotal].fallTime = 0;
bellHolder["bell_a" + bellTotal].yorigspeed = bellHolder["bell_a" + bellTotal].yspeed;
bellHolder["bell_a" + bellTotal]._y = bellTop2;
bellHolder["bell_a" + bellTotal].onEnterFrame = function () {
if (!gpause) {
if (!bellHolder["bell_a" + bellTotal].baron) {
bellHolder.attachMovie("healthbar", "bar" + this._name, bellHolder.getNextHighestDepth());
bellHolder["bell_a" + bellTotal].baron = true;
bellHolder["bar" + this._name].healthno = 1;
bellHolder["bar" + this._name].healthorigno = bellHolder["bar" + this._name].healthno;
}
bellHolder["bar" + this._name]._x = this._x;
bellHolder["bar" + this._name]._y = this._y - 20;
bellHolder["bar" + this._name].onEnterFrame = function () {
if (_root.gameOver) {
this.removeMovieClip();
}
};
this._y = this._y + this.xspeed;
if (this.hitTest(wall3)) {
this._x = this._x - this.yspeed;
this.xspeed = 0;
}
if (this.hitTest(wall)) {
bellHolder["bar" + this._name].removeMovieClip();
towerLife = 0;
this.removeMovieClip();
}
if (this.hitTest(sisbullet)) {
this._x = this._x + 1;
sisbullet.removeMovieClip();
_root.fleshsound.start(0, 1);
if ((!bellHolder["bar" + this._name].healthno) == 0) {
bellHolder["bar" + this._name].healthno = bellHolder["bar" + this._name].healthno - sisDamage;
bellHolder["bar" + this._name].bar_mc._x = bellHolder["bar" + this._name].bar_mc._x - ((sisDamage / bellHolder["bar" + this._name].healthorigno) * 30);
bellHolder.attachMovie("blood_mc", "blood" + this._name, bellHolder.getNextHighestDepth());
bellHolder["blood" + this._name]._x = this._x;
bellHolder["blood" + this._name]._y = this._y;
}
if ((bellHolder["bar" + this._name].healthno <= 0) && (!bellHolder[this._name].notdead)) {
bellHolder[this._name].notdead = true;
bellHolder.attachMovie("coin", "coin" + this._name, bellHolder.getNextHighestDepth());
bellHolder["coin" + this._name]._x = bellHolder[this._name]._x;
bellHolder["coin" + this._name]._y = bellHolder[this._name]._y + 20;
bellHolder["coin" + this._name].onEnterFrame = function () {
if (!gpause) {
if (this.hitTest(shooter)) {
this.touchedonce = true;
}
if (this.hitTest(moneycounter)) {
this.removeMovieClip();
_root.coinsound.start(0, 1);
coins = coins + tinyDrop;
score = score + tinyDrop;
}
if (this.touchedonce || (momAllyOn)) {
xMouse1 = moneycounter._x;
yMouse1 = moneycounter._y;
if (Math.abs(xMouse - this._x) < 1) {
this._x = xMouse1;
this._y = yMouse1;
} else {
this._x = this._x - ((this._x - xMouse1) / 7);
this._y = this._y - ((this._y - yMouse1) / 7);
}
}
}
};
enemyCount = enemyCount - 1;
totalKillsCount = totalKillsCount + 1;
score = score + 100;
bellHolder[this._name].yspeed = -1;
bellHolder["bar" + this._name].removeMovieClip();
this.gotoAndPlay(2);
}
}
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
bellTime = 0;
}
}
function rotatePlayer() {
if (_xmouse >= (player_mc._x + 50)) {
player_mc._rotation = Math.atan2(_ymouse - player_mc._y, _xmouse - player_mc._x) * radians2;
}
}
function shakeScreen() {
player_mc._x = player_mc._x + shakeQuan;
bellHolder._x = bellHolder._x + shakeQuan;
effectHolder_mc._x = effectHolder_mc._x + shakeQuan;
player_mc._y = player_mc._y + (shakeQuan * 2);
bellHolder._y = bellHolder._y + (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y + (shakeQuan * 2);
}
stop();
if (restart) {
continueGame();
}
var bulletArray = new Array();
clearInterval(screenTimer);
delete effectHolder.onEnterFrame;
effectHolder.clear();
var _numParticles = 0;
var pressed1 = false;
var pressed2 = false;
var pressed3 = false;
var pressed4 = false;
var pressed5 = false;
var pressed6 = false;
var pressed7 = false;
var waveNumber = 16;
miniSnakeSpeed = 7;
crates = 3;
towerLife = 1;
towerLifeOrig = 1;
pulsegunbought = true;
pulsegunon = true;
loadWeapon("Pulse Gun");
var gpause = false;
_root.attachMovie("waveNo", "wavePresent", bellHolder.getNextHighestDepth());
_root.wavePresent._x = 320;
_root.wavePresent._y = 210;
_root.wavePresent.txtScore.text = "Wave " + _root.waveNumber;
var winonce = false;
var totalEnemiesGoal = 99;
var totalEnemiesGoalRatio = 99;
var totalKillsCount = 0;
var totalEnemies = 0;
var enemyCount1 = 0;
var enemyCount2 = 0;
var enemyCount3 = 0;
var enemyCount4 = 0;
var enemyCount5 = 0;
var enemyCount6 = 0;
var enemyCount7 = 0;
var enemyCount8 = 0;
var enemyCount10 = 0;
var bulletAmmoCounter = 0;
var changeWeapon = false;
var reloadingNow = false;
var weaponFired = false;
var shakeQuan = 1;
var shakeTime = 0;
var gameOver = false;
var bellTop = 700;
var bellTop2 = -50;
var bellTime = -1000;
var bellLimit = 139;
var bellTotal = 0;
var bellTime2 = 0;
var bellLimit2 = 150;
var bellTotal2 = 0;
var bellTime3 = 150;
var bellLimit3 = 160;
var bellTotal3 = 0;
var bellTime4 = 900;
var bellLimit4 = 1060;
var bellTotal4 = 0;
var bellTime5 = 200;
var bellLimit5 = 250;
var bellTotal5 = 0;
var bellTime6 = 30;
var bellLimit6 = 40;
var bellTotal6 = 0;
var bellTime7 = 0;
var bellLimit7 = 500;
var bellTotal7 = 0;
var bellTime8 = 99;
var bellLimit8 = 100;
var bellTotal8 = 0;
var bellTime10 = 0;
var bellLimit10 = 77;
var bellTotal10 = 0;
var mouseClicked = false;
var radians = (Math.PI/180);
var radians2 = 57.2957795130823;
if (pulsegunbought) {
loadWeapon("Pulse Gun");
} else if (playerWeapon.flamethroweron && (flamethrowerbought)) {
loadWeapon("Flame Thrower");
} else {
loadWeapon("Pistol");
}
effectHolder_mc.createEmptyMovieClip("laser_mc", map_mc.getNextHighestDepth());
_root.createEmptyMovieClip("bellHolder", _root.getNextHighestDepth());
effectHolder_mc.cacheAsBitmap();
effectHolder_mc.onPress = function () {
mouseClicked = true;
if (playerWeapon.pulsegunon) {
fireWeapon(player_mc._x, player_mc._y, _root._xmouse, _root._ymouse);
}
};
effectHolder_mc.onRelease = function () {
mouseClicked = false;
};
effectHolder_mc.onReleaseOutside = function () {
mouseClicked = false;
};
function showNotYet() {
notYet_mc.gotoAndStop(2);
}
function continueGame() {
_root.gameOver = false;
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
_root.gamewononce = false;
_root.nextFrame();
_root.playerWeapon.bulletAmmo = _root.playerWeapon.bulletClip;
_root.clip_mc.bar_mc._x = -15;
_root.reloadingNow = false;
_root.changeWeapon = false;
_root.reloadsound.start(0, 1);
_root.bulletAmmoCounter = 0;
_root.upgradesound.stop("upgradesound");
_root.bgsound.start(0, 999);
wall.gotoAndStop(1);
crate1.gotoAndStop(1);
crate2.gotoAndStop(1);
crate3.gotoAndStop(1);
ally_crate1.gotoAndStop(1);
ally_crate2.gotoAndStop(1);
ally_crate3.gotoAndStop(1);
crate1._y = crate1_origy;
crate2._y = crate2_origy;
crate3._y = crate3_origy;
ally_crate1._y = ally_crate1_origy;
ally_crate2._y = ally_crate2_origy;
ally_crate3._y = ally_crate3_origy;
player_mc._y = player_mc_origy;
player_anim._y = player_anim_origy;
head_mc._y = head_mc_origy;
crates = 3;
restart = false;
score = score * 0.75;
score = Math.round(score);
towerLife = towerLifeOrig;
gameOver_mc.removeMovieClip();
i = 0;
while (i < 999) {
_root.bellHolder["bell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 999) {
_root.bellHolder["bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 999) {
_root.bellHolder["bell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 999) {
_root.bellHolder["bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 999) {
_root.bellHolder["bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 999) {
_root.bellHolder["bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 999) {
_root.bellHolder["bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 999) {
_root.bellHolder["bell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 999) {
_root.bellHolder["bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 99) {
_root.bellHolder["bell_j" + p].removeMovieClip();
p++;
}
}
var pressed23 = false;
var prev1 = "UNPAUSED";
_quality = "MEDIUM";
prev = "HIGH";
_root.shooter._visible = true;
var bgsound = new Sound();
bgsound.attachSound("bgsound");
_root.bgsound.start(0, 99);
var upgradesound = new Sound();
upgradesound.attachSound("upgradesound");
var forestsound = new Sound();
forestsound.attachSound("forestsound");
forestsound.start(0, 999);
var zombiesound = new Sound();
zombiesound.attachSound("zombiesound");
_root.zombiesound.start(0, 1);
soundPlay = new Sound();
max = 3;
min = 1;
rndClip = Math.round(Math.random() * (max - min)) + min;
soundPlay.attachSound(rndClip);
var gpause = false;
_root.onEnterFrame = function () {
weaponbar.weaponbar.macRem.text = "Enemies left: " + ((totalEnemiesGoal - totalKillsCount) + 1);
if (_root.momAllyBought && (!momPlaced)) {
momIcon.gotoAndStop(1);
} else {
momIcon.gotoAndStop(2);
}
if (_root.dadAllyBought && (!dadPlaced)) {
dadIcon.gotoAndStop(1);
} else {
dadIcon.gotoAndStop(2);
}
if (_root.sisAllyBought && (!sisPlaced)) {
sisIcon.gotoAndStop(1);
} else {
sisIcon.gotoAndStop(2);
}
if ((momCrate1on || (momCrate2on)) || (momCrate3on)) {
momAllyOn = true;
} else {
momAllyOn = false;
}
if ((dadCrate1on || (dadCrate2on)) || (dadCrate3on)) {
dadAllyOn = true;
} else {
dadAllyOn = false;
}
if ((sisCrate1on || (sisCrate2on)) || (sisCrate3on)) {
sisAllyOn = true;
} else {
sisAllyOn = false;
}
weaponbar.weaponbar.scoreTxt.text = "Score: " + _root.score;
if (Key.isDown(80)) {
if (pressed23 == false) {
if (prev1 == "PAUSED") {
_root.gpause = false;
prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if (prev1 == "UNPAUSED") {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
prev1 = "PAUSED";
}
}
pressed23 = true;
} else {
pressed23 = false;
}
if (!gpause) {
checkMiniHit10();
ally_crate1.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate1._x + 75;
sisbullet._y = ally_crate1._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate2.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate2._x + 75;
sisbullet._y = ally_crate2._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
ally_crate3.sis_mc.onEnterFrame = function () {
sisTimer++;
if ((sisTimer > 50) && (!winonce)) {
_root.attachMovie("bullets", "sisbullet", bellHolder.getNextHighestDepth());
sisbullet._x = ally_crate3._x + 75;
sisbullet._y = ally_crate3._y + 35;
sisTimer = 0;
xMouse2 = _xmouse;
yMouse2 = _ymouse;
yRange = ((xMouse2 / 23) - this._y) - (yMouse2 / 77);
sisbullet.onEnterFrame = function () {
this._x = this._x + sisSpeed;
this._y = this._y + yRange;
if (this._x > 640) {
this.removeMovieClip();
}
};
}
};
if ((dadAllyOn && (towerLife < towerLifeOrig)) && (!winonce)) {
dadTimer++;
if (dadTimer > 77) {
towerLife = towerLife + 1;
life_mc.bar_mc._x = life_mc.bar_mc._x - ((1 / towerLifeOrig) * 30);
dadTimer = 0;
}
}
macLife.text = (towerLife + " / ") + towerLifeOrig;
if ((totalEnemies <= totalEnemiesGoal) && (!gameOver)) {
makeLvl();
}
if (totalKillsCount >= (totalEnemiesGoal + 1)) {
if (!winonce) {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
mouseClicked = false;
_root.attachMovie("wavecomplete", "wavecomplete", bellHolder.getNextHighestDepth());
wavecomplete._x = -640;
wavecomplete._y = 0;
winonce = true;
_root.notYet_mc.gotoAndStop(1);
}
}
if (mouseClicked && (!playerWeapon.pulsegunon)) {
fireWeapon();
}
if (playerWeapon.gatlingunon && (weaponFired)) {
shakeTime++;
if (shakeTime > 1) {
shakeQuan = 1;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
shakeTime = 0;
}
}
if (playerWeapon.machinegunon && (weaponFired)) {
shakeTime++;
if (shakeTime > 1) {
shakeQuan = 1;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
shakeTime = 0;
}
}
if (playerWeapon.pulsegunon && (weaponFired)) {
shakeQuan = 3;
player_mc._x = player_mc._x - shakeQuan;
bellHolder._x = bellHolder._x - shakeQuan;
effectHolder_mc._x = effectHolder_mc._x - shakeQuan;
player_mc._y = player_mc._y - (shakeQuan * 2);
bellHolder._y = bellHolder._y - (shakeQuan * 2);
effectHolder_mc._y = effectHolder_mc._y - (shakeQuan * 2);
weaponFired = false;
}
rotatePlayer();
updateBullets();
macStats1.text = "$" + _root.playerWeapon.stats1Cost;
macStats2.text = "$" + _root.playerWeapon.stats2Cost;
if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macStats3.text = "Max";
} else {
macStats3.text = "$" + _root.playerWeapon.stats3Cost;
}
macName.text = _root.playerWeapon.itemName;
macHand.text = "Handling: " + playerWeapon.bulletOffset;
macDam.text = "Damage: " + playerWeapon.bulletDamage;
macRel.text = "Reload: " + playerWeapon.reloadSpeed;
if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macAmmo.text = "\u221E/\u221E";
} else {
macAmmo.text = (playerWeapon.bulletAmmo + "/") + playerWeapon.bulletClip;
}
CoinTxt.text = "$" + coins;
effectHolder_mc.laser_mc.clear();
if (playerWeapon.bulletAmmo <= 0) {
bulletAmmoCounter++;
clip_mc.bar_mc._x = clip_mc.bar_mc._x + 0.3;
}
if (bulletAmmoCounter >= 100) {
playerWeapon.bulletAmmo = playerWeapon.bulletClip;
var _local3 = new Array();
clip_mc.bar_mc._x = -15;
reloadingNow = false;
changeWeapon = false;
_root.reloadsound.start(0, 1);
bulletAmmoCounter = 0;
}
if (towerLife < 0) {
towerLife = 0;
}
if (towerLife == 0) {
if (crates == 3) {
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate1.gotoAndStop(3);
if (momCrate1on) {
momCrate1on = false;
momAllyBought = false;
}
if (dadCrate1on) {
dadCrate1on = false;
dadAllyBought = false;
}
if (sisCrate1on) {
sisCrate1on = false;
sisAllyBought = false;
}
ally_crate1.gotoAndStop(1);
crate2.gotoAndStop(2);
crate2.bounce_mc.gotoAndPlay(2);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 2;
_root.crashsound.start(0, 1);
} else if (crates == 2) {
life_mc.bar_mc._x = -15;
towerLife = towerLifeOrig;
crate2.gotoAndStop(3);
if (momCrate2on) {
momCrate2on = false;
momAllyBought = false;
}
if (dadCrate2on) {
dadCrate2on = false;
dadAllyBought = false;
}
if (sisCrate2on) {
sisCrate2on = false;
sisAllyBought = false;
}
ally_crate2.gotoAndStop(1);
crate3.gotoAndStop(2);
crate3.bounce_mc.gotoAndPlay(2);
crate1._y = crate1._y + crateHeight;
crate2._y = crate2._y + crateHeight;
crate3._y = crate3._y + crateHeight;
ally_crate1._y = ally_crate1._y + crateHeight;
ally_crate2._y = ally_crate2._y + crateHeight;
ally_crate3._y = ally_crate3._y + crateHeight;
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
crates = 1;
_root.crashsound.start(0, 1);
} else if (crates == 1) {
crate3.gotoAndStop(3);
ally_crate3.gotoAndStop(1);
player_mc._y = player_mc._y + crateHeight;
player_anim._y = player_anim._y + crateHeight;
head_mc._y = head_mc._y + crateHeight;
_root.restart = true;
_root.attachMovie("gameOver_mc", "gameOver_mc", bellHolder.getNextHighestDepth());
gameOver_mc._x = -7;
gameOver_mc._y = 0;
Mouse.show();
wall.gotoAndStop(2);
crates = 0;
_root.crashsound.start(0, 1);
if (momCrate3on) {
momCrate3on = false;
momAllyBought = false;
}
if (dadCrate3on) {
dadCrate3on = false;
dadAllyBought = false;
}
if (sisCrate3on) {
sisCrate3on = false;
sisAllyBought = false;
}
}
}
if (Key.isDown(49)) {
loadWeapon("Pistol");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 100;
}
}
if (Key.isDown(51)) {
if (shotgunbought) {
loadWeapon("Shotgun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(50)) {
if (machinegunbought) {
loadWeapon("Machine Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(52)) {
if (gatlinggunbought) {
loadWeapon("Gatling Gun");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(53)) {
if (sniperbought) {
loadWeapon("Sniper");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = true;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
if (Key.isDown(54)) {
if (pulsegunbought) {
loadWeapon("Pulse Gun");
weaponFired = false;
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 100;
} else {
showNotYet();
}
}
if (Key.isDown(55)) {
if (flamethrowerbought) {
loadWeapon("Flamethrower");
weaponFired = false;
if (!changeWeapon) {
playerWeapon.bulletAmmo = 0;
reloadingNow = false;
clip_mc.bar_mc._x = -15;
changeWeapon = false;
bulletAmmoCounter = 0;
}
} else {
showNotYet();
}
}
}
};
upg_btn1.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats1Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats1Cost;
_root.playerWeapon.stats1Cost = _root.playerWeapon.stats1Cost * 2;
_root.playerWeapon.bulletDamage = _root.playerWeapon.bulletDamage + 0.5;
macInfo.text = "";
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn2.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats2Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats2Cost;
_root.playerWeapon.stats2Cost = _root.playerWeapon.stats2Cost * 2;
if (_root.playerWeapon.pulsegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 200;
} else if (_root.playerWeapon.machinegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.gatlingunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 50;
macInfo.text = "";
}
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn3.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats3Cost) {
macInfo.text = "";
_root.coins = _root.coins - _root.playerWeapon.stats3Cost;
_root.playerWeapon.stats3Cost = _root.playerWeapon.stats3Cost * 2;
if (_root.playerWeapon.shotgunon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 9;
} else if (_root.playerWeapon.sniperon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 6;
} else {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 10;
}
} else if (playerWeapon.pistolon || (playerWeapon.pulsegunon)) {
macInfo.text = "Maxed out!";
_root.errorsound.start(0, 1);
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
var fleshsound = new Sound();
fleshsound.attachSound("fleshsound");
var hoversound = new Sound();
hoversound.attachSound("hoversound");
var errorsound = new Sound();
errorsound.attachSound("errorsound");
var registersound = new Sound();
registersound.attachSound("registersound");
var gunsound = new Sound();
gunsound.attachSound("gunsound");
var machgunsound = new Sound();
machgunsound.attachSound("machgunsound");
var crashsound = new Sound();
crashsound.attachSound("crashsound");
var elecsound = new Sound();
elecsound.attachSound("elecsound");
var snipersound = new Sound();
snipersound.attachSound("snipersound");
var reloadsound = new Sound();
reloadsound.attachSound("reloadsound");
var gatlingsound = new Sound();
gatlingsound.attachSound("gatlingsound");
var coinsound = new Sound();
coinsound.attachSound("coinsound");
function addSparkles(_targetX, _targetY, _sparkNumber, _distance, _sparkSize) {
var _local6 = 0;
while (_local6 < _sparkNumber) {
var _local4 = _root.attachMovie("spark", "spark_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local3 = _root.attachMovie("spark2", "spark2_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = (_targetX + random(_distance)) - (_distance / 2);
_local4._y = (_targetY + random(_distance)) - (_distance / 2);
_local3._x = (_targetX + random(_distance)) - (_distance / 2);
_local3._y = (_targetY + random(_distance)) - (_distance / 2);
var _local5 = random(_sparkSize) + (_sparkSize / 4);
_local4._xscale = _local5;
_local4._yscale = _local5;
_local5 = random(_sparkSize) + (_sparkSize / 4);
_local3._xscale = _local5;
_local3._yscale = _local5;
_local3._rotation = random(359);
_local4._alpha = lightningAlpha;
_local3._alpha = lightningAlpha;
_local6++;
}
}
var lightningOffset = 15;
var lightningFrequency = 15;
var lightningWidth = 1;
var lightningColor = "0x5C98EF";
var lightningAlpha = 75;
var lightningBranches = 3;
var sparkNumber = 7;
var sparkDistance = 23;
var sparkSize = 100;
var reloadSpeed = 250;
var clearSpeed = 100;
var glow = (new flash.filters.GlowFilter());
glow.color = 16711680 /* 0xFF0000 */;
glow.alpha = 1;
glow.blurX = 7;
glow.blurY = 7;
glow.quality = 2;
effectHolder_mc.laser_mc.filters = new Array(glow);
var glow_color = lightningColor;
var glow_alpha = 0.6;
var glow_blurX = 5;
var glow_blurY = 5;
var glow_strength = 2;
var glow_quality = 3;
var effectHolder = effectHolder_mc;
var filter_glow = (new flash.filters.GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality));
effectHolder.filters = [filter_glow];
Instance of Symbol 1641 MovieClip "effectHolder_mc" in Frame 36
onClipEvent (load) {
this.useHandCursor = false;
}
Instance of Symbol 1600 MovieClip "shooter" in Frame 36
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (enterFrame) {
this.tabEnabled = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
this.swapDepths(_root.getNextHighestDepth());
if (_root._currentframe == 100) {
removeMovieClip("");
Mouse.show();
}
}
Instance of Symbol 1465 MovieClip "upg_btn1" in Frame 36
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn2" in Frame 36
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn3" in Frame 36
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1751 MovieClip in Frame 36
on (rollOver) {
Mouse.show();
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
on (release) {
if ((!restart) || (!winonce)) {
if (_root.prev1 == "PAUSED") {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if ((_root.prev1 = "UNPAUSED")) {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
_root.prev1 = "PAUSED";
}
}
}
Instance of Symbol 1754 MovieClip "Btn_Mute" in Frame 36
onClipEvent (load) {
this.tabEnabled = false;
}
on (release) {
if (_root.bgsound.getVolume() != 0) {
this.gotoAndStop(2);
_root.oldVolume = _root.bgsound.getVolume();
_root.slider.slidebar.onEnterFrame = null;
_root.bgsound.setVolume(0);
} else {
this.gotoAndStop(1);
_root.slider.slidebar.onEnterFrame = _root.adjustVolume;
_root.bgsound.setVolume(_root.oldVolume);
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
}
Instance of Symbol 1786 MovieClip "pause_mc" in Frame 36
onClipEvent (enterFrame) {
this.tabEnabled = false;
this.swapDepths(_root.getNextHighestDepth());
}
Symbol 59 MovieClip Frame 22
_root.bomb_mc.removeMovieClip();
stop();
Symbol 63 MovieClip [spark2] Frame 16
this.removeMovieClip();
Symbol 64 MovieClip [spark] Frame 16
this.removeMovieClip();
Symbol 74 MovieClip [coin2] Frame 192
stop();
Symbol 77 MovieClip [coin3] Frame 192
stop();
this.removeMovieClip();
Symbol 80 MovieClip [earthquake] Frame 9
stop();
Symbol 84 MovieClip [fps] Frame 1
fps = 30;
var timeinit = new Date();
var lasttime = timeinit.getMilliseconds();
onEnterFrame = function () {
var _local1 = new Date();
timepassed = (((_local1.getMilliseconds() - lasttime) >= 0) ? (_local1.getMilliseconds() - lasttime) : (1000 + (_local1.getMilliseconds() - lasttime)));
fps = Math.round(10000 / timepassed) / 10;
lasttime = _local1.getMilliseconds();
};
Symbol 88 MovieClip [notbuy_mc] Frame 1
stop();
Symbol 88 MovieClip [notbuy_mc] Frame 2
var timeLeft = 60;
this.onEnterFrame = function () {
this.timeLeft--;
if (this.timeLeft == 0) {
gotoAndStop (1);
}
};
Symbol 88 MovieClip [notbuy_mc] Frame 3
var timeLeft = 120;
this.onEnterFrame = function () {
this.timeLeft--;
if (this.timeLeft == 0) {
gotoAndStop (1);
}
};
Symbol 109 MovieClip [flame] Frame 11
stop();
if (_root.crates == 3) {
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
_root.crate3.gotoAndStop(1);
}
if (_root.crates == 2) {
_root.crate2.gotoAndStop(1);
_root.crate3.gotoAndStop(1);
}
if (_root.crates == 1) {
_root.crate3.gotoAndStop(1);
}
Symbol 116 MovieClip [bullets] Frame 1
Symbol 123 MovieClip [flame_mc] Frame 25
stop();
Symbol 183 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 6
stop();
Symbol 196 Button
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
Symbol 209 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 223
stop();
stop();
_root.gotoAndStop(3);
Symbol 254 MovieClip Frame 15
stop();
Symbol 264 MovieClip [enemy_mc] Frame 1
stop();
Symbol 313 MovieClip Frame 14
stop();
Symbol 323 MovieClip [enemy_mc2] Frame 1
stop();
Symbol 323 MovieClip [enemy_mc2] Frame 3
stop();
Symbol 375 MovieClip Frame 13
stop();
Symbol 391 MovieClip [enemy_mc2b] Frame 1
stop();
Symbol 391 MovieClip [enemy_mc2b] Frame 3
stop();
Symbol 442 MovieClip Frame 15
stop();
Symbol 454 MovieClip [enemy_mc3] Frame 1
stop();
Symbol 499 MovieClip Frame 15
stop();
Symbol 500 MovieClip [enemy_mc3b] Frame 1
stop();
Symbol 534 MovieClip Frame 14
stop();
Symbol 542 MovieClip [enemy_mc4] Frame 1
stop();
Symbol 542 MovieClip [enemy_mc4] Frame 3
stop();
Symbol 545 MovieClip [enemy_mc4b] Frame 1
stop();
Symbol 545 MovieClip [enemy_mc4b] Frame 16
stop();
this.removeMovieClip();
Symbol 545 MovieClip [enemy_mc4b] Frame 17
stop();
Symbol 575 MovieClip Frame 10
stop();
Symbol 576 MovieClip [enemy_mc5] Frame 1
stop();
Symbol 594 MovieClip Frame 12
stop();
Symbol 595 MovieClip [enemy_mc6] Frame 1
stop();
Symbol 613 MovieClip Frame 13
stop();
Symbol 614 MovieClip [enemy_mc6b] Frame 1
stop();
Symbol 678 MovieClip Frame 21
stop();
Symbol 679 MovieClip [enemy_mc7] Frame 1
stop();
Symbol 679 MovieClip [enemy_mc7] Frame 3
stop();
Symbol 738 MovieClip Frame 21
stop();
Symbol 739 MovieClip [enemy_mc7b] Frame 1
stop();
Symbol 739 MovieClip [enemy_mc7b] Frame 3
stop();
Symbol 781 MovieClip Frame 15
stop();
Symbol 792 MovieClip [enemy_mc8] Frame 1
stop();
Symbol 854 MovieClip Frame 13
stop();
Symbol 855 MovieClip [enemy_mc9] Frame 1
stop();
Symbol 855 MovieClip [enemy_mc9] Frame 3
stop();
Symbol 870 MovieClip Frame 13
stop();
Symbol 878 MovieClip [enemy_mc10] Frame 1
stop();
Symbol 913 MovieClip Frame 15
stop();
Symbol 914 MovieClip [enemy_mc11] Frame 1
stop();
Symbol 952 MovieClip Frame 15
stop();
Symbol 953 MovieClip [enemy_mc12] Frame 1
stop();
Symbol 1022 MovieClip Frame 14
stop();
Symbol 1023 MovieClip [enemy_mc13] Frame 1
stop();
Symbol 1023 MovieClip [enemy_mc13] Frame 3
stop();
Symbol 1080 MovieClip Frame 12
stop();
Symbol 1081 MovieClip [enemy_mc13b] Frame 1
stop();
Symbol 1081 MovieClip [enemy_mc13b] Frame 3
stop();
Symbol 1123 MovieClip Frame 15
stop();
Symbol 1124 MovieClip [enemy_mc14] Frame 1
stop();
Symbol 1124 MovieClip [enemy_mc14] Frame 3
stop();
Symbol 1196 MovieClip Frame 35
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1196 MovieClip Frame 37
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1196 MovieClip Frame 39
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1196 MovieClip Frame 41
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1213 MovieClip Frame 15
if (!winonce) {
_root.prev1 = "UNPAUSED";
_root.mouseClicked = false;
_root.attachMovie("wavecomplete2", "wavecomplete", bellHolder.getNextHighestDepth());
_root.wavecomplete._x = -640;
_root.wavecomplete._y = 0;
_root.winonce = true;
_root.notYet_mc.gotoAndStop(1);
}
Symbol 1213 MovieClip Frame 18
stop();
Symbol 1252 MovieClip Frame 50
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 52
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 54
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 56
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 58
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 60
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 62
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 64
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 66
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 68
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 70
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 72
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 74
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 76
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 78
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 80
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 82
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 84
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 86
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 88
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 90
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 92
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 94
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 96
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 98
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 100
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 102
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 104
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 106
_root.player_mc._y = _root.player_mc._y + 4;
_root.bellHolder._y = _root.bellHolder._y + 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y + 4;
_root.player_mc._x = _root.player_mc._x + 4;
_root.bellHolder._x = _root.bellHolder._x + 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + 4;
Symbol 1252 MovieClip Frame 108
_root.player_mc._y = _root.player_mc._y - 4;
_root.bellHolder._y = _root.bellHolder._y - 4;
_root.effectHolder_mc._y = _root.effectHolder_mc._y - 4;
_root.player_mc._x = _root.player_mc._x - 4;
_root.bellHolder._x = _root.bellHolder._x - 4;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - 4;
Symbol 1252 MovieClip Frame 132
_root.bgsound.start(0, 1);
Symbol 1252 MovieClip Frame 190
_root.introOnce = true;
gotoAndPlay (97);
Symbol 1253 MovieClip [enemy_mc15] Frame 1
stop();
Symbol 1264 MovieClip [blood_mc] Frame 6
stop();
Symbol 1269 MovieClip Frame 2
stop();
Symbol 1272 MovieClip Frame 2
stop();
Symbol 1277 MovieClip Frame 2
stop();
Symbol 1278 MovieClip [bullet] Frame 1
stop();
Symbol 1278 MovieClip [bullet] Frame 2
stop();
Symbol 1278 MovieClip [bullet] Frame 3
stop();
Symbol 1278 MovieClip [bullet] Frame 4
stop();
Symbol 1278 MovieClip [bullet] Frame 5
stop();
Symbol 1297 MovieClip Frame 10
stop();
Symbol 1301 MovieClip Frame 1
stop();
Symbol 1317 MovieClip Frame 1
stop();
Symbol 1324 MovieClip Frame 1
stop();
Symbol 1324 MovieClip Frame 2
CoinTxt.text = "";
trace(_root.crates);
no_btn.onRelease = function () {
gotoAndStop (1);
};
yes_btn.onRelease = function () {
if (((_root.coins >= _root.playerWeapon.itemCost) && (!_root.playerWeapon.repairCrateOn)) || (((_root.coins >= _root.playerWeapon.itemCost) && (_root.playerWeapon.repairCrateOn)) && (_root.towerLife < _root.towerLifeOrig))) {
_root.coins = _root.coins - _root.playerWeapon.itemCost;
_root.score = _root.score + _root.playerWeapon.itemCost;
_root.registersound.start(0, 1);
CoinTxt.text = "Awesome!";
if (_root.playerWeapon.flamethroweron) {
_root.flamethrowerbought = true;
} else if (_root.playerWeapon.pulsegunon) {
_root.pulsegunbought = true;
} else if (_root.playerWeapon.sniperon) {
_root.sniperbought = true;
weaponbar.weaponbar.weapon4.gotoAndStop(2);
} else if (_root.playerWeapon.shotgunon) {
_root.shotgunbought = true;
weaponbar.weaponbar.weapon3.gotoAndStop(2);
} else if (_root.playerWeapon.machinegunon) {
_root.machinegunbought = true;
weaponbar.weaponbar.weapon2.gotoAndStop(2);
} else if (_root.playerWeapon.gatlingunon) {
_root.gatlinggunbought = true;
weaponbar.weaponbar.weapon5.gotoAndStop(2);
} else if (_root.playerWeapon.repairCrateOn) {
_root.towerLife = _root.towerLifeOrig;
_root.life_mc.bar_mc._x = -15;
}
gotoAndStop (1);
} else if (((_root.coins <= _root.playerWeapon.itemCost) && (!_root.playerWeapon.repairCrateOn)) || (((_root.coins <= _root.playerWeapon.itemCost) && (_root.playerWeapon.repairCrateOn)) && (_root.towerLife < _root.towerLifeOrig))) {
CoinTxt.text = "Not enough money!";
_root.errorsound.start(0, 1);
} else if (_root.towerLife == _root.towerLifeOrig) {
CoinTxt.text = "Maxed out!";
_root.errorsound.start(0, 1);
}
};
Symbol 1327 MovieClip Frame 1
stop();
Symbol 1327 MovieClip Frame 2
stop();
Symbol 1383 MovieClip [coin] Frame 192
stop();
Symbol 1444 MovieClip Frame 1
stop();
Symbol 1454 MovieClip Frame 1
stop();
Symbol 1454 MovieClip Frame 2
CoinTxt.text = "";
no_btn.onRelease = function () {
gotoAndStop (1);
};
yes_btn.onRelease = function () {
if ((_root.coins >= _root.playerWeapon.itemCost) && (_root.crates < 3)) {
_root.coins = _root.coins - _root.playerWeapon.itemCost;
_root.score = _root.score + _root.playerWeapon.itemCost;
_root.registersound.start(0, 1);
CoinTxt.text = "Awesome!";
if (_root.playerWeapon.buyCrateOn) {
if (_root.crates == 2) {
_root.crates = 3;
_root.crate1.gotoAndStop(1);
_root.sisbow1._y = _root.sisbow1._y - _root.crateHeight;
_root.sisbow2._y = _root.sisbow2._y - _root.crateHeight;
_root.sisbow3._y = _root.sisbow3._y - _root.crateHeight;
_root.crate1._y = _root.crate1._y - _root.crateHeight;
_root.crate2._y = _root.crate2._y - _root.crateHeight;
_root.crate3._y = _root.crate3._y - _root.crateHeight;
_root.ally_crate1._y = _root.ally_crate1._y - _root.crateHeight;
_root.ally_crate2._y = _root.ally_crate2._y - _root.crateHeight;
_root.ally_crate3._y = _root.ally_crate3._y - _root.crateHeight;
_root.player_mc._y = _root.player_mc._y - _root.crateHeight;
_root.player_anim._y = _root.player_anim._y - _root.crateHeight;
_root.head_mc._y = _root.head_mc._y - _root.crateHeight;
_root.towerLife = _root.towerLifeOrig;
_root.life_mc.bar_mc._x = -15;
} else if (_root.crates == 1) {
_root.crates = 2;
_root.crate2.gotoAndStop(1);
_root.sisbow1._y = _root.sisbow1._y - _root.crateHeight;
_root.sisbow2._y = _root.sisbow2._y - _root.crateHeight;
_root.sisbow3._y = _root.sisbow3._y - _root.crateHeight;
_root.tripod._y = _root.tripod._y - _root.crateHeight;
_root.crate1._y = _root.crate1._y - _root.crateHeight;
_root.crate2._y = _root.crate2._y - _root.crateHeight;
_root.crate3._y = _root.crate3._y - _root.crateHeight;
_root.ally_crate1._y = _root.ally_crate1._y - _root.crateHeight;
_root.ally_crate2._y = _root.ally_crate2._y - _root.crateHeight;
_root.ally_crate3._y = _root.ally_crate3._y - _root.crateHeight;
_root.player_mc._y = _root.player_mc._y - _root.crateHeight;
_root.player_anim._y = _root.player_anim._y - _root.crateHeight;
_root.head_mc._y = _root.head_mc._y - _root.crateHeight;
_root.towerLife = _root.towerLifeOrig;
_root.life_mc.bar_mc._x = -15;
}
}
gotoAndStop (1);
} else if (((_root.coins <= _root.playerWeapon.itemCost) && (!_root.playerWeapon.buyCrateOn)) || (((_root.coins <= _root.playerWeapon.itemCost) && (_root.playerWeapon.buyCrateOn)) && (_root.crates <= 3))) {
CoinTxt.text = "Not enough money!";
_root.errorsound.start(0, 1);
} else if (_root.crates == 3) {
CoinTxt.text = "Maxed out!";
_root.errorsound.start(0, 1);
}
};
Symbol 1456 MovieClip Frame 1
stop();
Symbol 1456 MovieClip Frame 2
CoinTxt.text = "";
no_btn.onRelease = function () {
gotoAndStop (1);
};
yes_btn.onRelease = function () {
if ((_root.coins >= _root.playerWeapon.itemCost) && (!_root.momAllyBought)) {
_root.coins = _root.coins - _root.playerWeapon.itemCost;
_root.score = _root.score + _root.playerWeapon.itemCost;
_root.registersound.start(0, 1);
CoinTxt.text = "Awesome!";
if (_root.playerWeapon.buyMomOn) {
_root.momAllyBought = true;
_root.momPlaced = false;
}
} else if (((_root.coins <= _root.playerWeapon.itemCost) && (!_root.momAllyBought)) || ((_root.coins <= _root.playerWeapon.itemCost) && (!_root.momAllyBought))) {
CoinTxt.text = "Not enough money!";
_root.errorsound.start(0, 1);
} else if (_root.momAllyBought) {
CoinTxt.text = "Already hired!";
_root.errorsound.start(0, 1);
}
};
Symbol 1458 MovieClip Frame 1
stop();
Symbol 1458 MovieClip Frame 2
CoinTxt.text = "";
no_btn.onRelease = function () {
gotoAndStop (1);
};
yes_btn.onRelease = function () {
if ((_root.coins >= _root.playerWeapon.itemCost) && (!_root.dadAllyBought)) {
_root.coins = _root.coins - _root.playerWeapon.itemCost;
_root.score = _root.score + _root.playerWeapon.itemCost;
_root.registersound.start(0, 1);
CoinTxt.text = "Awesome!";
if (_root.playerWeapon.buyDadOn) {
_root.dadAllyBought = true;
_root.dadPlaced = false;
}
} else if (((_root.coins <= _root.playerWeapon.itemCost) && (!_root.dadAllyBought)) || ((_root.coins <= _root.playerWeapon.itemCost) && (!_root.dadAllyBought))) {
CoinTxt.text = "Not enough money!";
_root.errorsound.start(0, 1);
} else if (_root.dadAllyBought) {
CoinTxt.text = "Already hired!";
_root.errorsound.start(0, 1);
}
};
Symbol 1460 MovieClip Frame 1
stop();
Symbol 1460 MovieClip Frame 2
CoinTxt.text = "";
no_btn.onRelease = function () {
gotoAndStop (1);
};
yes_btn.onRelease = function () {
if ((_root.coins >= _root.playerWeapon.itemCost) && (!_root.sisAllyBought)) {
_root.coins = _root.coins - _root.playerWeapon.itemCost;
_root.score = _root.score + _root.playerWeapon.itemCost;
_root.registersound.start(0, 1);
CoinTxt.text = "Awesome!";
if (_root.playerWeapon.buySisOn) {
_root.sisAllyBought = true;
_root.sisPlaced = false;
}
} else if (((_root.coins <= _root.playerWeapon.itemCost) && (!_root.sisAllyBought)) || ((_root.coins <= _root.playerWeapon.itemCost) && (!_root.sisAllyBought))) {
CoinTxt.text = "Not enough money!";
_root.errorsound.start(0, 1);
} else if (_root.sisAllyBought) {
CoinTxt.text = "Already hired!";
_root.errorsound.start(0, 1);
}
};
Symbol 1462 MovieClip Frame 1
stop();
Symbol 1462 MovieClip Frame 2
CoinTxt.text = "";
no_btn.onRelease = function () {
gotoAndStop (1);
};
yes_btn.onRelease = function () {
if (_root.coins >= _root.playerWeapon.itemCost) {
_root.coins = _root.coins - _root.playerWeapon.itemCost;
_root.score = _root.score + _root.playerWeapon.itemCost;
_root.registersound.start(0, 1);
CoinTxt.text = "Awesome!";
_root.towerLifeOrig = _root.towerLifeOrig * 2;
_root.playerWeapon.itemCost = _root.playerWeapon.itemCost * 2;
_root.towerLife = _root.towerLifeOrig;
_root.life_mc.bar_mc._x = -15;
} else {
CoinTxt.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
Symbol 1465 MovieClip Frame 1
stop();
Symbol 1484 MovieClip Frame 1
stop();
Symbol 1488 MovieClip Frame 1
stop();
Symbol 1493 MovieClip Frame 1
stop();
Symbol 1493 MovieClip Frame 2
this.onEnterFrame = function () {
macLife.text = (_root.towerLife + "/") + _root.towerLifeOrig;
};
Symbol 1494 MovieClip Frame 1
this.onEnterFrame = function () {
macLife.text = (_root.towerLife + "/") + _root.towerLifeOrig;
CoinTxt.text = "$" + _root.coins;
macStats1.text = "$" + _root.playerWeapon.stats1Cost;
macStats2.text = "$" + _root.playerWeapon.stats2Cost;
if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macStats3.text = "Max";
} else {
macStats3.text = "$" + _root.playerWeapon.stats3Cost;
}
macName.text = _root.playerWeapon.itemName;
macDesc.text = _root.playerWeapon.itemDesc;
itemCostText.text = "$" + _root.playerWeapon.itemCost;
macHand.text = "Handling: " + _root.playerWeapon.bulletOffset;
macDam.text = "Damage: " + _root.playerWeapon.bulletDamage;
macRel.text = "Reload: " + _root.playerWeapon.reloadSpeed;
if (_root.playerWeapon.repairCrateOn) {
buy_btn.gotoAndStop(1);
buy_btn.enabled = true;
} else if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macAmmo.text = "\u221E/\u221E";
} else if ((_root.playerWeapon.buySisOn || (_root.playerWeapon.buyMomOn)) || (_root.playerWeapon.buyDadOn)) {
buy_btn.gotoAndStop(3);
buy_btn.enabled = true;
} else {
macAmmo.text = (_root.playerWeapon.bulletAmmo + "/") + _root.playerWeapon.bulletClip;
}
};
buy_btn.onRelease = function () {
if (_root.playerWeapon.buyCrateOn) {
choice_btn2.gotoAndStop(2);
} else if (_root.playerWeapon.buyMomOn) {
choice_btn3.gotoAndStop(2);
} else if (_root.playerWeapon.buyDadOn) {
choice_btn4.gotoAndStop(2);
} else if (_root.playerWeapon.buySisOn) {
choice_btn5.gotoAndStop(2);
} else if (_root.playerWeapon.upgradeCrateOn) {
choice_btn6.gotoAndStop(2);
} else {
choice_btn.gotoAndStop(2);
}
};
buy_btn.onEnterFrame = function () {
if (((((((_root.flamethrowerbought && (_root.playerWeapon.flamethroweron)) || (_root.pulsegunbought && (_root.playerWeapon.pulsegunon))) || (_root.gatlinggunbought && (_root.playerWeapon.gatlingunon))) || (_root.sniperbought && (_root.playerWeapon.sniperon))) || (_root.shotgunbought && (_root.playerWeapon.shotgunon))) || (_root.machinegunbought && (_root.playerWeapon.machinegunon))) || (_root.pistolbought && (_root.playerWeapon.pistolon))) {
buy_btn.gotoAndStop(2);
buy_btn.enabled = false;
upg_btn1.enabled = true;
upg_btn2.enabled = true;
upg_btn3.enabled = true;
} else {
buy_btn.gotoAndStop(1);
buy_btn.enabled = true;
upg_btn1.enabled = false;
upg_btn2.enabled = false;
upg_btn3.enabled = false;
}
};
upg_btn1.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats1Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats1Cost;
_root.score = _root.score + _root.playerWeapon.stats1Cost;
_root.registersound.start(0, 1);
_root.playerWeapon.stats1Cost = _root.playerWeapon.stats1Cost * 2;
_root.playerWeapon.bulletDamage = _root.playerWeapon.bulletDamage + 0.5;
} else {
_root.errorsound.start(0, 1);
macInfo.text = "Not enough money!";
}
};
upg_btn2.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats2Cost) {
_root.coins = _root.coins - _root.playerWeapon.stats2Cost;
_root.score = _root.score + _root.playerWeapon.stats2Cost;
_root.registersound.start(0, 1);
_root.playerWeapon.stats2Cost = _root.playerWeapon.stats2Cost * 2;
if (_root.playerWeapon.pulsegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 150;
} else if (_root.playerWeapon.machinegunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.gatlingunon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.flamethroweron) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else if (_root.playerWeapon.pistolon) {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 10;
} else {
_root.playerWeapon.reloadSpeed = _root.playerWeapon.reloadSpeed - 50;
macInfo.text = "";
}
} else {
macInfo.text = "Not enough money!";
_root.errorsound.start(0, 1);
}
};
upg_btn3.onRelease = function () {
if (_root.coins >= _root.playerWeapon.stats3Cost) {
_root.registersound.start(0, 1);
_root.coins = _root.coins - _root.playerWeapon.stats3Cost;
_root.score = _root.score + _root.playerWeapon.stats3Cost;
_root.playerWeapon.stats3Cost = _root.playerWeapon.stats3Cost * 2;
if (_root.playerWeapon.shotgunon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 9;
} else if (_root.playerWeapon.sniperon) {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 6;
} else {
_root.playerWeapon.bulletClip = _root.playerWeapon.bulletClip + 10;
}
} else {
_root.errorsound.start(0, 1);
if (_root.playerWeapon.pistolon || (_root.playerWeapon.pulsegunon)) {
macInfo.text = "Maxed out!";
} else {
macInfo.text = "Not enough money!";
}
}
};
noFunds.text = "";
_root.repairCrateInfo = false;
btn1.onRelease = function () {
weaponsart.gotoAndStop(1);
macInfo.text = "";
repairCrateInfo = false;
coverstats.gotoAndStop(1);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Pistol");
bulletAmmoCounter = 0;
_root.pistolselected = true;
_root.machinegunselected = false;
_root.shotgunselected = false;
_root.gatlinggunselected = false;
_root.sniperselected = false;
_root.pulsegunselected = false;
_root.flamethrowerselected = false;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn2.onRelease = function () {
weaponsart.gotoAndStop(2);
macInfo.text = "";
repairCrateInfo = false;
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
coverstats.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Machine Gun");
_root.pistolselected = false;
_root.machinegunselected = true;
_root.shotgunselected = false;
_root.gatlinggunselected = false;
_root.sniperselected = false;
_root.pulsegunselected = false;
_root.flamethrowerselected = false;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn3.onRelease = function () {
weaponsart.gotoAndStop(3);
macInfo.text = "";
repairCrateInfo = false;
coverstats.gotoAndStop(1);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Shotgun");
_root.pistolselected = false;
_root.machinegunselected = false;
_root.shotgunselected = true;
_root.gatlinggunselected = false;
_root.sniperselected = false;
_root.pulsegunselected = false;
_root.flamethrowerselected = false;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn4.onRelease = function () {
weaponsart.gotoAndStop(4);
macInfo.text = "";
repairCrateInfo = false;
coverstats.gotoAndStop(1);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Gatling Gun");
_root.pistolselected = false;
_root.machinegunselected = false;
_root.shotgunselected = false;
_root.gatlinggunselected = true;
_root.sniperselected = false;
_root.pulsegunselected = false;
_root.flamethrowerselected = false;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn5.onRelease = function () {
weaponsart.gotoAndStop(5);
macInfo.text = "";
repairCrateInfo = false;
coverstats.gotoAndStop(1);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Sniper");
_root.pistolselected = false;
_root.machinegunselected = false;
_root.shotgunselected = false;
_root.gatlinggunselected = false;
_root.sniperselected = true;
_root.pulsegunselected = false;
_root.flamethrowerselected = false;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn6.onRelease = function () {
weaponsart.gotoAndStop(6);
macInfo.text = "";
repairCrateInfo = false;
coverstats.gotoAndStop(1);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Pulse Gun");
_root.pistolselected = false;
_root.machinegunselected = false;
_root.shotgunselected = false;
_root.gatlinggunselected = false;
_root.sniperselected = false;
_root.pulsegunselected = true;
_root.flamethrowerselected = false;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn7.onRelease = function () {
weaponsart.gotoAndStop(7);
macInfo.text = "";
repairCrateInfo = false;
coverstats.gotoAndStop(1);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Flamethrower");
_root.pistolselected = false;
_root.machinegunselected = false;
_root.shotgunselected = false;
_root.gatlinggunselected = false;
_root.sniperselected = false;
_root.pulsegunselected = false;
_root.flamethrowerselected = true;
_root.weaponFired = false;
if (!_root.changeWeapon) {
_root.playerWeapon.bulletAmmo = 0;
_root.reloadingNow = false;
_root.clip_mc.bar_mc._x = -15;
_root.changeWeapon = false;
_root.bulletAmmoCounter = 100;
}
};
btn_8.onRelease = function () {
macInfo.text = "";
weaponsart.gotoAndStop(8);
coverstats.gotoAndStop(2);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Repair Crate");
};
btn_9.onRelease = function () {
macInfo.text = "";
weaponsart.gotoAndStop(9);
coverstats.gotoAndStop(2);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Buy Crate");
};
btn_10.onRelease = function () {
macInfo.text = "";
weaponsart.gotoAndStop(10);
coverstats.gotoAndStop(2);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Upgrade Crate");
};
btn_11.onRelease = function () {
macInfo.text = "";
weaponsart.gotoAndStop(11);
coverstats.gotoAndStop(3);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Hire Mom");
};
btn_12.onRelease = function () {
macInfo.text = "";
weaponsart.gotoAndStop(12);
coverstats.gotoAndStop(3);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
_root.loadWeapon("Hire Dad");
};
btn_13.onRelease = function () {
macInfo.text = "";
weaponsart.gotoAndStop(13);
coverstats.gotoAndStop(3);
choice_btn.gotoAndStop(1);
choice_btn2.gotoAndStop(1);
choice_btn3.gotoAndStop(1);
choice_btn4.gotoAndStop(1);
choice_btn5.gotoAndStop(1);
choice_btn6.gotoAndStop(1);
_root.loadWeapon("Hire Sis");
};
Instance of Symbol 1288 MovieClip in Symbol 1494 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 1301 MovieClip "btn1" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1301 MovieClip "btn2" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1301 MovieClip "btn3" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1301 MovieClip "btn4" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1301 MovieClip "btn5" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1301 MovieClip "btn6" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1301 MovieClip "btn7" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1327 MovieClip "btn_8" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1327 MovieClip "btn_9" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1327 MovieClip "btn_12" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1327 MovieClip "btn_13" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1327 MovieClip "btn_11" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1327 MovieClip "btn_10" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1444 MovieClip "weaponsart" in Symbol 1494 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.playerWeapon.pistolon) {
this.gotoAndStop(1);
}
if (_root.playerWeapon.shotgunon) {
this.gotoAndStop(3);
}
if (_root.playerWeapon.machinegunon) {
this.gotoAndStop(2);
}
if (_root.playerWeapon.sniperon) {
this.gotoAndStop(5);
}
if (_root.playerWeapon.gatlingunon) {
this.gotoAndStop(4);
}
if (_root.playerWeapon.pulsegunon) {
this.gotoAndStop(6);
}
if (_root.playerWeapon.flamethroweron) {
this.gotoAndStop(7);
}
if (_root.playerWeapon.pistolon) {
this.gotoAndStop(1);
}
if (_root.playerWeapon.pistolon) {
this.gotoAndStop(1);
}
if (_root.playerWeapon.pistolon) {
this.gotoAndStop(1);
}
if (_root.playerWeapon.pistolon) {
this.gotoAndStop(1);
}
if (_root.playerWeapon.buyDadOn) {
this.gotoAndStop(12);
}
if (_root.playerWeapon.buySisOn) {
this.gotoAndStop(13);
}
}
Instance of Symbol 1465 MovieClip "upg_btn1" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn2" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1465 MovieClip "upg_btn3" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1484 MovieClip "next_btn" in Symbol 1494 MovieClip Frame 1
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1488 MovieClip in Symbol 1494 MovieClip Frame 1
on (release) {
_root.clicksound.start(0, 1);
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1497 MovieClip [wavecomplete] Frame 1
_root.mouseClicked = false;
Mouse.show();
_root.shooter._visible = false;
Symbol 1497 MovieClip [wavecomplete] Frame 12
stop();
_root.mouseClicked = false;
_root.effectHolder_mc.enabled = false;
Mouse.show();
_root.shooter._visible = false;
mouseListener = new Object();
mouseListener.onMouseDown = function () {
Mouse.show();
_root.shooter._visible = false;
gotoAndPlay (13);
Mouse.removeListener(mouseListener);
};
Mouse.addListener(mouseListener);
Symbol 1497 MovieClip [wavecomplete] Frame 13
_root.gatesound.start(0, 1);
Symbol 1497 MovieClip [wavecomplete] Frame 17
i = 0;
while (i < 199) {
_root.bellHolder["bell_a" + i].removeMovieClip();
_root.bellHolder["coinbell_a" + i].removeMovieClip();
_root.bellHolder["barbell_a" + i].removeMovieClip();
_root.bellHolder["bloodbell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 199) {
_root.bellHolder["bell_b" + g].removeMovieClip();
_root.bellHolder["coin2bell_b" + g].removeMovieClip();
_root.bellHolder["bar2bell_b" + g].removeMovieClip();
_root.bellHolder["blood2bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 199) {
_root.bellHolder["bell_c" + h].removeMovieClip();
_root.bellHolder["coin3bell_c" + h].removeMovieClip();
_root.bellHolder["bar3bell_c" + h].removeMovieClip();
_root.bellHolder["blood3bell_c" + h].removeMovieClip();
_root.bellHolder["enembulletbell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 199) {
_root.bellHolder["bell_d" + j].removeMovieClip();
_root.bellHolder["coin4bell_d" + j].removeMovieClip();
_root.bellHolder["bar4bell_d" + j].removeMovieClip();
_root.bellHolder["blood4bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 199) {
_root.bellHolder["bell_e" + k].removeMovieClip();
_root.bellHolder["coin5bell_e" + k].removeMovieClip();
_root.bellHolder["bar5bell_e" + k].removeMovieClip();
_root.bellHolder["blood5bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 199) {
_root.bellHolder["bell_f" + l].removeMovieClip();
_root.bellHolder["coin6bell_f" + l].removeMovieClip();
_root.bellHolder["bar6bell_f" + l].removeMovieClip();
_root.bellHolder["blood6bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 199) {
_root.bellHolder["bell_g" + m].removeMovieClip();
_root.bellHolder["coin7bell_g" + m].removeMovieClip();
_root.bellHolder["bar7bell_g" + m].removeMovieClip();
_root.bellHolder["blood7bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 199) {
_root.bellHolder["bell_h" + n].removeMovieClip();
_root.bellHolder["coin8bell_h" + n].removeMovieClip();
_root.bellHolder["bar8bell_h" + n].removeMovieClip();
_root.bellHolder["blood8bell_h" + n].removeMovieClip();
_root.bellHolder["enembulletbell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 199) {
_root.bellHolder["bell_i" + o].removeMovieClip();
_root.bellHolder["coin9bell_i" + o].removeMovieClip();
_root.bellHolder["bar9bell_i" + o].removeMovieClip();
_root.bellHolder["blood9bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 199) {
_root.bellHolder["bell_j" + p].removeMovieClip();
_root.bellHolder["coin10bell_j" + p].removeMovieClip();
_root.bellHolder["bar10bell_j" + p].removeMovieClip();
_root.bellHolder["blood10bell_j" + p].removeMovieClip();
p++;
}
q = 0;
while (q < 199) {
_root.bellHolder["bell_z" + q].removeMovieClip();
_root.bellHolder["coin13bell_z" + q].removeMovieClip();
_root.bellHolder["bar13bell_z" + q].removeMovieClip();
_root.bellHolder["blood13bell_z" + q].removeMovieClip();
q++;
}
r = 0;
while (r < 2999) {
_root.bellHolder["bullet" + r].removeMovieClip();
r++;
}
Symbol 1497 MovieClip [wavecomplete] Frame 18
stop();
_root.gameOver = true;
_root.bgsound.stop("bgsound");
_root.upgradesound.start(0, 1);
buyUpgrades.weaponTrans.gotoAndPlay(2);
buyUpgrades.next_btn.onRelease = function () {
Mouse.hide();
_root.clicksound.start(0, 1);
_root.shooter._visible = true;
gotoAndPlay (19);
};
Symbol 1497 MovieClip [wavecomplete] Frame 21
buyUpgrades.weaponTrans.gotoAndStop(1);
Symbol 1497 MovieClip [wavecomplete] Frame 22
stop();
_root.playerWeapon.bulletAmmo = _root.playerWeapon.bulletClip;
var bulletArray = new Array();
_root.clip_mc.bar_mc._x = -15;
_root.clearInterval(playerWeapon.reloadTimer);
_root.playerWeapon.reloadTimer = 0;
_root.reloadingNow = false;
_root.changeWeapon = false;
_root.reloadsound.start(0, 1);
_root.bulletAmmoCounter = 0;
_root.macInfo.text = "";
_root.weaponbar.gotoAndPlay(1);
_root.effectHolder_mc.enabled = true;
_root.gameOver = false;
_root.gamewononce = false;
_root.nextFrame();
_root.playerWeapon.bulletAmmo = _root.playerWeapon.bulletClip;
_root.clip_mc.bar_mc._x = -15;
_root.reloadingNow = false;
_root.changeWeapon = false;
_root.reloadsound.start(0, 1);
_root.bulletAmmoCounter = 0;
_root.upgradesound.stop("upgradesound");
_root.bgsound.start(0, 999);
i = 0;
while (i < 199) {
_root.bellHolder["bell_a" + i].removeMovieClip();
_root.bellHolder["coinbell_a" + i].removeMovieClip();
_root.bellHolder["barbell_a" + i].removeMovieClip();
_root.bellHolder["bloodbell_a" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 199) {
_root.bellHolder["bell_b" + g].removeMovieClip();
_root.bellHolder["coin2bell_b" + g].removeMovieClip();
_root.bellHolder["bar2bell_b" + g].removeMovieClip();
_root.bellHolder["blood2bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 199) {
_root.bellHolder["bell_c" + h].removeMovieClip();
_root.bellHolder["coin3bell_c" + h].removeMovieClip();
_root.bellHolder["bar3bell_c" + h].removeMovieClip();
_root.bellHolder["blood3bell_c" + h].removeMovieClip();
_root.bellHolder["enembulletbell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 199) {
_root.bellHolder["bell_d" + j].removeMovieClip();
_root.bellHolder["coin4bell_d" + j].removeMovieClip();
_root.bellHolder["bar4bell_d" + j].removeMovieClip();
_root.bellHolder["blood4bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 199) {
_root.bellHolder["bell_e" + k].removeMovieClip();
_root.bellHolder["coin5bell_e" + k].removeMovieClip();
_root.bellHolder["bar5bell_e" + k].removeMovieClip();
_root.bellHolder["blood5bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 199) {
_root.bellHolder["bell_f" + l].removeMovieClip();
_root.bellHolder["coin6bell_f" + l].removeMovieClip();
_root.bellHolder["bar6bell_f" + l].removeMovieClip();
_root.bellHolder["blood6bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 199) {
_root.bellHolder["bell_g" + m].removeMovieClip();
_root.bellHolder["coin7bell_g" + m].removeMovieClip();
_root.bellHolder["bar7bell_g" + m].removeMovieClip();
_root.bellHolder["blood7bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 199) {
_root.bellHolder["bell_h" + n].removeMovieClip();
_root.bellHolder["coin8bell_h" + n].removeMovieClip();
_root.bellHolder["bar8bell_h" + n].removeMovieClip();
_root.bellHolder["blood8bell_h" + n].removeMovieClip();
_root.bellHolder["enembulletbell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 199) {
_root.bellHolder["bell_i" + o].removeMovieClip();
_root.bellHolder["coin9bell_i" + o].removeMovieClip();
_root.bellHolder["bar9bell_i" + o].removeMovieClip();
_root.bellHolder["blood9bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 199) {
_root.bellHolder["bell_j" + p].removeMovieClip();
_root.bellHolder["coin10bell_j" + p].removeMovieClip();
_root.bellHolder["bar10bell_j" + p].removeMovieClip();
_root.bellHolder["blood10bell_j" + p].removeMovieClip();
p++;
}
q = 0;
while (q < 199) {
_root.bellHolder["bell_z" + q].removeMovieClip();
_root.bellHolder["coin13bell_z" + q].removeMovieClip();
_root.bellHolder["bar13bell_z" + q].removeMovieClip();
_root.bellHolder["blood13bell_z" + q].removeMovieClip();
q++;
}
r = 0;
while (r < 2999) {
_root.bellHolder["bullet" + r].removeMovieClip();
r++;
}
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
if (((_root.momAllyBought && (!_root.tiponce)) || (_root.dadAllyBought && (!_root.tiponce))) || (_root.sisAllyBought && (!_root.tiponce))) {
_root.showIconHow();
_root.tiponce = true;
}
this.removeMovieClip();
Symbol 1505 MovieClip Frame 1
stop();
Symbol 1507 MovieClip Frame 1
var timeLeft = 9000;
this.onEnterFrame = function () {
this.timeLeft--;
this._x = this._x - 0.7;
if (this.timeLeft == 0) {
this.removeMovieClip();
}
};
Symbol 1511 MovieClip Frame 1
var timeLeft = 9000;
this.onEnterFrame = function () {
this.timeLeft--;
this._y = this._y - 0.7;
if (this.timeLeft == 0) {
this.removeMovieClip();
}
};
Symbol 1515 MovieClip Frame 1
stop();
Symbol 1518 MovieClip Frame 1
stop();
Symbol 1518 MovieClip Frame 2
System.security.allowInsecureDomain("http://www.notdoppler.com");
System.security.allowDomain("http://www.notdoppler.com");
this.createEmptyMovieClip("highscores", this.getNextHighestDepth());
_root.hs_hash = (("fl3m_uP_Ebri8zi8#" + _root.hs_game) + _root.hs_score) + "2I2RI3tH6ahl?";
this.highscores.loadMovie("http://www.notdoppler.com/highscores/highscores.swf");
Symbol 1519 MovieClip [wavecomplete2] Frame 1
_root.mouseClicked = false;
Mouse.show();
_root.shooter._visible = false;
Instance of Symbol 1499 MovieClip in Symbol 1519 MovieClip [wavecomplete2] Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Symbol 1519 MovieClip [wavecomplete2] Frame 12
stop();
_root.mouseClicked = false;
_root.effectHolder_mc.enabled = false;
Mouse.show();
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.gameOver = true;
_root.shooter._visible = false;
mouseListener = new Object();
mouseListener.onMouseDown = function () {
Mouse.show();
_root.shooter._visible = false;
gotoAndPlay (13);
Mouse.removeListener(mouseListener);
};
Mouse.addListener(mouseListener);
Symbol 1519 MovieClip [wavecomplete2] Frame 13
submitbtn.onRelease = function () {
_root.inputhigh.html = false;
gotoAndStop (14);
};
_root.gatesound.start(0, 1);
stop();
_root.bgsound.stop("bgsound");
_root.upgradesound.start(0, 1);
buyUpgrades.weaponTrans.gotoAndPlay(2);
buyUpgrades.next_btn.onRelease = function () {
Mouse.hide();
_root.clicksound.start(0, 1);
_root.shooter._visible = true;
gotoAndPlay (19);
};
Instance of Symbol 1502 MovieClip in Symbol 1519 MovieClip [wavecomplete2] Frame 13
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 1505 MovieClip "submitbtn" in Symbol 1519 MovieClip [wavecomplete2] Frame 13
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1515 MovieClip in Symbol 1519 MovieClip [wavecomplete2] Frame 13
on (release) {
stopAllSounds();
_root.gameOver = true;
i = 0;
while (i < 999) {
_root.bellHolder["bell" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 999) {
_root.bellHolder["bell2" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 999) {
_root.bellHolder["bell3" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 999) {
_root.bellHolder["bell4" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 999) {
_root.bellHolder["bell5" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 999) {
_root.bellHolder["bell6" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 999) {
_root.bellHolder["bell7" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 999) {
_root.bellHolder["bell8" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 999) {
_root.bellHolder["bell9" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 999) {
_root.bellHolder["bell10" + p].removeMovieClip();
p++;
}
_root.gotoAndStop(3);
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1518 MovieClip "hsloader" in Symbol 1519 MovieClip [wavecomplete2] Frame 14
onClipEvent (load) {
function loadHighscores() {
this._visible = true;
this.gotoAndStop(2);
}
function unloadHighscores() {
this._visible = false;
this.highscores.removeMovieClip();
this.gotoAndStop(1);
}
_root.hs_game = "zombeast";
_root.hs_score = _root.score;
_root.hs_view = 2;
loadHighscores();
}
Instance of Symbol 1488 MovieClip in Symbol 1519 MovieClip [wavecomplete2] Frame 14
on (release) {
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1522 MovieClip [waveNo] Frame 1
var timeLeft = 100;
this.onEnterFrame = function () {
this.timeLeft--;
this._y = this._y - 0.5;
if (this.timeLeft == 0) {
this.removeMovieClip();
}
};
Symbol 1530 MovieClip Frame 1
stop();
Symbol 1530 MovieClip Frame 3
stop();
Symbol 1531 MovieClip [gameOver_mc] Frame 1
Mouse.show();
_root.shooter._visible = false;
_root.gpause = true;
Symbol 1531 MovieClip [gameOver_mc] Frame 2
Mouse.show();
_root.shooter._visible = false;
Symbol 1531 MovieClip [gameOver_mc] Frame 47
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.gameOver = true;
_root.mouseClicked = false;
Symbol 1531 MovieClip [gameOver_mc] Frame 52
_root.gameOver = true;
Symbol 1531 MovieClip [gameOver_mc] Frame 53
_root.gpause = false;
_root.prev1 = "PAUSED";
_root.mouseClicked = false;
submitbtn.onRelease = function () {
_root.inputhigh.html = false;
gotoAndStop (54);
};
continue_btn.onRelease = function () {
Mouse.hide();
_root.shooter._visible = true;
_root.towerLife = _root.towerLifeOrig;
_root.gameOver = true;
gotoAndPlay (55);
_root.prevFrame();
};
stop();
Instance of Symbol 1502 MovieClip in Symbol 1531 MovieClip [gameOver_mc] Frame 53
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 1530 MovieClip "continue_btn" in Symbol 1531 MovieClip [gameOver_mc] Frame 53
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1515 MovieClip in Symbol 1531 MovieClip [gameOver_mc] Frame 53
on (release) {
_root.gameOver = true;
i = 0;
while (i < 999) {
_root.bellHolder["bell" + i].removeMovieClip();
i++;
}
g = 0;
while (g < 999) {
_root.bellHolder["bell2" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 999) {
_root.bellHolder["bell3" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 999) {
_root.bellHolder["bell4" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 999) {
_root.bellHolder["bell5" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 999) {
_root.bellHolder["bell6" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 999) {
_root.bellHolder["bell7" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 999) {
_root.bellHolder["bell8" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 999) {
_root.bellHolder["bell9" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 999) {
_root.bellHolder["bell10" + p].removeMovieClip();
p++;
}
_root.gotoAndStop(3);
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1488 MovieClip in Symbol 1531 MovieClip [gameOver_mc] Frame 53
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1505 MovieClip "submitbtn" in Symbol 1531 MovieClip [gameOver_mc] Frame 53
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1518 MovieClip "hsloader" in Symbol 1531 MovieClip [gameOver_mc] Frame 54
onClipEvent (load) {
function loadHighscores() {
this._visible = true;
this.gotoAndStop(2);
}
function unloadHighscores() {
this._visible = false;
this.highscores.removeMovieClip();
this.gotoAndStop(1);
}
_root.hs_game = "zombeast";
_root.hs_score = _root.score;
_root.hs_view = 2;
loadHighscores();
}
Symbol 1531 MovieClip [gameOver_mc] Frame 55
stop();
this.removeMovieClip();
Symbol 1542 MovieClip Frame 17
stop();
Symbol 1546 MovieClip Frame 1
stop();
Symbol 1549 MovieClip Frame 1
stop();
Instance of Symbol 183 MovieClip in Symbol 1550 MovieClip Frame 1
on (release) {
_root.clicksound.start(0, 1);
_root.tutorial.gotoAndPlay(2);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1488 MovieClip in Symbol 1550 MovieClip Frame 7
on (release) {
_root.clicksound.start(0, 1);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1546 MovieClip in Symbol 1550 MovieClip Frame 15
on (release) {
_root.clicksound.start(0, 1);
_root.creditsbox.gotoAndPlay(2);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1488 MovieClip in Symbol 1550 MovieClip Frame 30
on (release) {
_root.clicksound.start(0, 1);
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1550 MovieClip Frame 46
stop();
Instance of Symbol 1549 MovieClip in Symbol 1550 MovieClip Frame 46
on (release) {
_root.clicksound.start(0, 1);
getURL ("http://www.notdoppler.com/highscores.php?game=zombeast", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1553 MovieClip Frame 9
stop();
Symbol 1556 MovieClip Frame 8
stop();
Symbol 1562 MovieClip Frame 7
_root.gatesound.start(0, 1);
Symbol 1562 MovieClip Frame 91
gotoAndPlay (8);
Symbol 1568 MovieClip Frame 1
stop();
Symbol 1575 MovieClip Frame 1
stop();
Symbol 1578 MovieClip Frame 1
stop();
Instance of Symbol 1502 MovieClip in Symbol 1578 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 1568 MovieClip in Symbol 1578 MovieClip Frame 1
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
Instance of Symbol 1575 MovieClip in Symbol 1578 MovieClip Frame 1
on (release) {
_root.creditsbox.gotoAndPlay(6);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1578 MovieClip Frame 2
_root.gatesound.start(0, 1);
Symbol 1578 MovieClip Frame 5
stop();
Instance of Symbol 1568 MovieClip in Symbol 1578 MovieClip Frame 5
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
Instance of Symbol 1575 MovieClip in Symbol 1578 MovieClip Frame 5
on (release) {
_root.clicksound.start(0, 1);
_root.creditsbox.gotoAndPlay(6);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1577 MovieClip in Symbol 1578 MovieClip Frame 5
on (release) {
getURL ("http://www.astiggames.com/", "_blank");
}
Instance of Symbol 1575 MovieClip in Symbol 1578 MovieClip Frame 8
on (release) {
_root.creditsbox.gotoAndPlay(6);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1568 MovieClip in Symbol 1578 MovieClip Frame 12
on (release) {
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
Instance of Symbol 1575 MovieClip in Symbol 1578 MovieClip Frame 12
on (release) {
_root.creditsbox.gotoAndPlay(6);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1600 MovieClip Frame 1
stop();
Symbol 1612 MovieClip Frame 1
stop();
Symbol 1616 MovieClip Frame 1
stop();
Symbol 1620 MovieClip Frame 1
stop();
Symbol 1626 MovieClip Frame 1
stop();
Symbol 1632 MovieClip Frame 1
stop();
Symbol 1638 MovieClip Frame 1
stop();
Symbol 1638 MovieClip Frame 2
_root.gatesound.start(0, 1);
Symbol 1638 MovieClip Frame 5
stop();
Instance of Symbol 1502 MovieClip in Symbol 1638 MovieClip Frame 5
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 1612 MovieClip in Symbol 1638 MovieClip Frame 5
on (release) {
_quality = "LOW";
_root.clicksound.start(0, 1);
stopAllSounds();
_root.gotoAndStop(4);
this.gotoAndStop(1);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1616 MovieClip in Symbol 1638 MovieClip Frame 5
on (release) {
_root.prev = "HIGH";
_quality = "MEDIUM";
_root.clicksound.start(0, 1);
stopAllSounds();
_root.gotoAndStop(4);
this.gotoAndStop(1);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1620 MovieClip in Symbol 1638 MovieClip Frame 5
on (release) {
_quality = "HIGH";
_root.prev = "MEDS";
_root.clicksound.start(0, 1);
stopAllSounds();
_root.gotoAndStop(4);
this.gotoAndStop(1);
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1642 MovieClip Frame 1
stop();
Symbol 1643 MovieClip Frame 11
if (_root.crates == 3) {
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
_root.crate3.gotoAndStop(1);
}
if (_root.crates == 2) {
_root.crate2.gotoAndStop(1);
_root.crate3.gotoAndStop(1);
}
if (_root.crates == 1) {
_root.crate3.gotoAndStop(1);
}
this.gotoAndStop(1);
Symbol 1644 MovieClip Frame 1
stop();
Symbol 1649 MovieClip Frame 1
stop();
Symbol 1649 MovieClip Frame 2
_root.momAllyOn = true;
Symbol 1649 MovieClip Frame 3
_root.dadAllyOn = true;
Symbol 1649 MovieClip Frame 4
_root.sisAllyOn = true;
Symbol 1650 MovieClip Frame 10
if (_root.crates == 3) {
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
_root.crate3.gotoAndStop(1);
}
if (_root.crates == 2) {
_root.crate2.gotoAndStop(1);
_root.crate3.gotoAndStop(1);
}
if (_root.crates == 1) {
_root.crate3.gotoAndStop(1);
}
this.gotoAndStop(1);
Symbol 1651 MovieClip Frame 1
stop();
Symbol 1656 MovieClip Frame 1
stop();
Symbol 1656 MovieClip Frame 2
_root.momAllyOn = true;
Symbol 1656 MovieClip Frame 3
_root.dadAllyOn = true;
Symbol 1656 MovieClip Frame 4
_root.sisAllyOn = true;
Symbol 1658 MovieClip Frame 1
stop();
Symbol 1659 MovieClip Frame 1
stop();
Symbol 1671 MovieClip Frame 1
stop();
Symbol 1671 MovieClip Frame 2
stop();
Symbol 1673 MovieClip Frame 1
stop();
Symbol 1675 MovieClip Frame 1
stop();
Symbol 1675 MovieClip Frame 2
stop();
Symbol 1677 MovieClip Frame 1
stop();
Symbol 1677 MovieClip Frame 2
stop();
Symbol 1679 MovieClip Frame 1
stop();
Symbol 1679 MovieClip Frame 2
stop();
Symbol 1681 MovieClip Frame 1
stop();
Symbol 1681 MovieClip Frame 2
stop();
Symbol 1683 MovieClip Frame 1
stop();
Symbol 1683 MovieClip Frame 2
stop();
Symbol 1685 MovieClip Frame 30
stop();
Symbol 1725 MovieClip Frame 1
stop();
Instance of Symbol 1725 MovieClip in Symbol 1729 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.playerWeapon.pistolon) {
this.gotoAndStop(1);
} else if (_root.playerWeapon.machinegunon) {
this.gotoAndStop(2);
} else if (_root.playerWeapon.shotgunon) {
this.gotoAndStop(3);
} else if (_root.playerWeapon.sniperon) {
this.gotoAndStop(4);
} else if (_root.playerWeapon.gatlingunon) {
this.gotoAndStop(5);
} else if (_root.playerWeapon.pulsegunon) {
this.gotoAndStop(6);
} else if (_root.playerWeapon.flamethroweron) {
this.gotoAndStop(7);
}
}
Symbol 1733 MovieClip Frame 1
stop();
Instance of Symbol 1327 MovieClip "btn_11" in Symbol 1733 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1735 MovieClip Frame 1
stop();
Instance of Symbol 1327 MovieClip "btn_11" in Symbol 1735 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1737 MovieClip Frame 1
stop();
Instance of Symbol 1327 MovieClip "btn_11" in Symbol 1737 MovieClip Frame 1
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1754 MovieClip Frame 1
stop();
Symbol 1754 MovieClip Frame 2
stop();
Symbol 1769 MovieClip Frame 1
stop();
Symbol 1773 MovieClip Frame 1
stop();
Symbol 1778 MovieClip Frame 1
stop();
Symbol 1781 MovieClip Frame 1
stop();
Symbol 1786 MovieClip Frame 1
stop();
Symbol 1786 MovieClip Frame 2
this.onEnterFrame = function () {
if (_quality == "MEDIUM") {
quality_btn.qualitytext = "Med";
} else if (_quality == "LOW") {
quality_btn.qualitytext = "Low";
} else if (_quality == "HIGH") {
quality_btn.qualitytext = "Hi";
}
};
quitbtn.onRelease = function () {
gotoAndStop (3);
_root.clicksound.start(0, 1);
};
Instance of Symbol 1515 MovieClip "quitbtn" in Symbol 1786 MovieClip Frame 2
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1488 MovieClip "moregames" in Symbol 1786 MovieClip Frame 2
on (release) {
_root.clicksound.start(0, 1);
getURL ("http://www.notdoppler.com/?ref=zombeaststampede", "_blank");
}
on (rollOver) {
_root.hoversound.start(0, 1);
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1769 MovieClip "quality_btn" in Symbol 1786 MovieClip Frame 2
on (release) {
_root.clicksound.start(0, 1);
if ((_quality == "MEDIUM") && (_root.prev == "HIGH")) {
_quality = "LOW";
_root.pause_mc.quality_btn.qualitytext = "Low";
} else if ((_quality == "MEDIUM") && (_root.prev == "LOW")) {
_quality = "HIGH";
_root.prev = "MEDS";
_root.pause_mc.quality_btn.qualitytext = "Hi";
} else if ((_quality == "HIGH") && (_root.prev == "MEDS")) {
_quality = "MEDIUM";
_root.quality_btn.qualitytext = "Med";
_root.prev = "HIGH";
_quality = "MEDIUM";
trace("1");
} else if (_quality == "LOW") {
_quality = "MEDIUM";
_root.prev = "LOW";
trace("2");
_root.pause_mc.quality_btn.qualitytext = "Med";
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1773 MovieClip "unpause" in Symbol 1786 MovieClip Frame 2
on (release) {
Mouse.hide();
_root.clicksound.start(0, 1);
_root.shooter._visible = true;
if ((!restart) || (!winonce)) {
if (_root.prev1 == "PAUSED") {
_root.gpause = false;
_root.prev1 = "UNPAUSED";
_root.pause_mc.gotoAndStop(1);
} else if ((_root.prev1 = "UNPAUSED")) {
_root.gpause = true;
_root.pause_mc.gotoAndStop(2);
_root.prev1 = "PAUSED";
}
}
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Symbol 1786 MovieClip Frame 3
nobtn.onRelease = function () {
_root.clicksound.start(0, 1);
gotoAndStop (2);
};
Instance of Symbol 1778 MovieClip in Symbol 1786 MovieClip Frame 3
on (release) {
_root.clicksound.start(0, 1);
_root.gpause = false;
stopAllSounds();
_root.prev1 = "UNPAUSED";
_root.gameOver = true;
_root.gameoverHit(_root.temporaryBullet);
g = 0;
while (g < 99) {
_root.bellHolder["bell_b" + g].removeMovieClip();
_root.bellHolder["coin2bell_b" + g].removeMovieClip();
_root.bellHolder["bar2bell_b" + g].removeMovieClip();
_root.bellHolder["blood2bell_b" + g].removeMovieClip();
g++;
}
h = 0;
while (h < 99) {
_root.bellHolder["bell_c" + h].removeMovieClip();
_root.bellHolder["coin3bell_c" + h].removeMovieClip();
_root.bellHolder["bar3bell_c" + h].removeMovieClip();
_root.bellHolder["blood3bell_c" + h].removeMovieClip();
_root.bellHolder["enembulletbell_c" + h].removeMovieClip();
h++;
}
j = 0;
while (j < 99) {
_root.bellHolder["bell_d" + j].removeMovieClip();
_root.bellHolder["coin4bell_d" + j].removeMovieClip();
_root.bellHolder["bar4bell_d" + j].removeMovieClip();
_root.bellHolder["blood4bell_d" + j].removeMovieClip();
j++;
}
k = 0;
while (k < 99) {
_root.bellHolder["bell_e" + k].removeMovieClip();
_root.bellHolder["coin5bell_e" + k].removeMovieClip();
_root.bellHolder["bar5bell_e" + k].removeMovieClip();
_root.bellHolder["blood5bell_e" + k].removeMovieClip();
k++;
}
l = 0;
while (l < 99) {
_root.bellHolder["bell_f" + l].removeMovieClip();
_root.bellHolder["coin6bell_f" + l].removeMovieClip();
_root.bellHolder["bar6bell_f" + l].removeMovieClip();
_root.bellHolder["blood6bell_f" + l].removeMovieClip();
l++;
}
m = 0;
while (m < 99) {
_root.bellHolder["bell_g" + m].removeMovieClip();
_root.bellHolder["coin7bell_g" + m].removeMovieClip();
_root.bellHolder["bar7bell_g" + m].removeMovieClip();
_root.bellHolder["blood7bell_g" + m].removeMovieClip();
m++;
}
n = 0;
while (n < 99) {
_root.bellHolder["bell_h" + n].removeMovieClip();
_root.bellHolder["coin8bell_h" + n].removeMovieClip();
_root.bellHolder["bar8bell_h" + n].removeMovieClip();
_root.bellHolder["blood8bell_h" + n].removeMovieClip();
_root.bellHolder["enembulletbell_h" + n].removeMovieClip();
n++;
}
o = 0;
while (o < 99) {
_root.bellHolder["bell_i" + o].removeMovieClip();
_root.bellHolder["coin9bell_i" + o].removeMovieClip();
_root.bellHolder["bar9bell_i" + o].removeMovieClip();
_root.bellHolder["blood9bell_i" + o].removeMovieClip();
o++;
}
p = 0;
while (p < 99) {
_root.bellHolder["bell_j" + p].removeMovieClip();
_root.bellHolder["coin10bell_j" + p].removeMovieClip();
_root.bellHolder["bar10bell_j" + p].removeMovieClip();
_root.bellHolder["blood10bell_j" + p].removeMovieClip();
p++;
}
q = 0;
while (q < 99) {
_root.bellHolder["bell_z" + q].removeMovieClip();
_root.bellHolder["coin13bell_z" + q].removeMovieClip();
_root.bellHolder["bar13bell_z" + q].removeMovieClip();
_root.bellHolder["blood13bell_z" + q].removeMovieClip();
q++;
}
r = 0;
while (r < 999) {
_root.bellHolder["bullet" + r].removeMovieClip();
r++;
}
_root.gotoAndStop(3);
}
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Instance of Symbol 1781 MovieClip "nobtn" in Symbol 1786 MovieClip Frame 3
on (rollOver) {
Mouse.show();
_root.hoversound.start(0, 1);
_root.shooter._visible = false;
this.gotoAndStop(2);
}
on (rollOut) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
on (releaseOutside) {
Mouse.hide();
_root.shooter._visible = true;
this.gotoAndStop(1);
}
Symbol 1787 MovieClip Frame 1
stop();
Symbol 1787 MovieClip Frame 2
_root.player_mc._x = _root.player_mc._x + _root.shakeQuan;
_root.bellHolder._x = _root.bellHolder._x + _root.shakeQuan;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + _root.shakeQuan;
_root.player_mc._y = _root.player_mc._y + (_root.shakeQuan * 2);
_root.bellHolder._y = _root.bellHolder._y + (_root.shakeQuan * 2);
_root.effectHolder_mc._y = _root.effectHolder_mc._y + (_root.shakeQuan * 2);
Symbol 1787 MovieClip Frame 3
_root.player_mc._x = _root.player_mc._x - _root.shakeQuan;
_root.bellHolder._x = _root.bellHolder._x - _root.shakeQuan;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - _root.shakeQuan;
_root.player_mc._y = _root.player_mc._y - (_root.shakeQuan * 2);
_root.bellHolder._y = _root.bellHolder._y - (_root.shakeQuan * 2);
_root.effectHolder_mc._y = _root.effectHolder_mc._y - (_root.shakeQuan * 2);
Symbol 1787 MovieClip Frame 4
_root.player_mc._x = _root.player_mc._x + _root.shakeQuan;
_root.bellHolder._x = _root.bellHolder._x + _root.shakeQuan;
_root.effectHolder_mc._x = _root.effectHolder_mc._x + _root.shakeQuan;
_root.player_mc._y = _root.player_mc._y + (_root.shakeQuan * 2);
_root.bellHolder._y = _root.bellHolder._y + (_root.shakeQuan * 2);
_root.effectHolder_mc._y = _root.effectHolder_mc._y + (_root.shakeQuan * 2);
Symbol 1787 MovieClip Frame 5
_root.player_mc._x = _root.player_mc._x - _root.shakeQuan;
_root.bellHolder._x = _root.bellHolder._x - _root.shakeQuan;
_root.effectHolder_mc._x = _root.effectHolder_mc._x - _root.shakeQuan;
_root.player_mc._y = _root.player_mc._y - (_root.shakeQuan * 2);
_root.bellHolder._y = _root.bellHolder._y - (_root.shakeQuan * 2);
_root.effectHolder_mc._y = _root.effectHolder_mc._y - (_root.shakeQuan * 2);
Symbol 1789 MovieClip Frame 153
stop();
_root.showMessage();
Symbol 1791 MovieClip Frame 13
stop();