Frame 1
function onEnterFrame() {
if (on_frame == 1) {
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
bar._xscale = getPercent * 100;
if (bytes_loaded == bytes_total) {
intro._alpha = 100;
intro.play();
on_frame = 2;
intro._x = 76;
intro._y = 197;
}
}
}
stop();
on_frame = 1;
var kongregate = _global.kongregate;
kongregate.services.connect();
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if ((((domain == "armorgames.com") || (domain == "www.armorgames.com")) || (domain == "kongregate.com")) || (domain == "www.kongregate.com")) {
} else {
var CPMStarContentSpotID = "0";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=1207QE3B17C1C");
__com_mochibot__("c3f6ac69", this, 10301, true);
}
if ((domain == "kongregate.com") || (domain == "www.kongregate.com")) {
__com_mochibot__("c3f6ac69", this, 10301, true);
}
intro._x = 1000;
intro._y = 1000;
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item3 = new ContextMenuItem("Play More Games", itemHandler3);
myMenu.customItems.push(item3);
_root.menu = myMenu;
Instance of Symbol 328 MovieClip "intro" in Frame 1
on (release) {
getURL ("http://www.arcadebomb.com", "_blank");
}
Frame 2
function makeButton(button) {
button.onRollOver = function () {
button._alpha = 100;
};
button.onRollOut = function () {
button._alpha = 20;
};
}
stop();
Mouse.show();
buttonsM = new Array(q1, q2, q3, q4);
i = buttonsM.length - 1;
while (i >= 0) {
buttonsM[i]._alpha = 20;
makeButton(buttonsM[i]);
i--;
}
q1.onRelease = function () {
gotoAndStop (3);
};
q2.onRelease = function () {
gotoAndStop (4);
};
q3.onRelease = function () {
getURL ("http://www.arcadebomb.com", "_blank");
};
q4.onRelease = function () {
gotoAndStop (5);
};
sObject = SharedObject.getLocal("saveFile");
level = 1;
kills = 0;
score = 0;
money = 500;
health = 100;
maxHealth = 100;
gunEquipped = 1;
engs = 0;
mercs = 0;
ownGun = new Array(1, 0, 0, 0, 0, 0, 0);
clipSizeLevel = new Array(0, 0, 0, 0, 0, 0, 0);
reloadTimeLevel = new Array(0, 0, 0, 0, 0, 0, 0);
gunStrengthLevel = new Array(0, 0, 0, 0, 0, 0, 0);
if (sObject.data.level != undefined) {
level = sObject.data.level;
}
if (sObject.data.kills != undefined) {
kills = sObject.data.kills;
}
if (sObject.data.score != undefined) {
score = sObject.data.score;
}
if (sObject.data.money != undefined) {
money = sObject.data.money;
}
if (sObject.data.health != undefined) {
health = sObject.data.health;
}
if (sObject.data.maxHealth != undefined) {
maxHealth = sObject.data.maxHealth;
}
if (sObject.data.gunEquipped != undefined) {
gunEquipped = sObject.data.gunEquipped;
}
if (sObject.data.engs != undefined) {
engs = sObject.data.engs;
}
if (sObject.data.mercs != undefined) {
mercs = sObject.data.mercs;
}
i = 0;
while (i <= ownGun.length) {
if (sObject.data.ownGun[i] != undefined) {
ownGun[i] = sObject.data.ownGun[i];
}
i++;
}
i = 0;
while (i <= clipSizeLevel.length) {
if (sObject.data.clipSizeLevel[i] != undefined) {
clipSizeLevel[i] = sObject.data.clipSizeLevel[i];
}
i++;
}
i = 0;
while (i <= reloadTimeLevel.length) {
if (sObject.data.reloadTimeLevel[i] != undefined) {
reloadTimeLevel[i] = sObject.data.reloadTimeLevel[i];
}
i++;
}
i = 0;
while (i <= gunStrengthLevel.length) {
if (sObject.data.gunStrengthLevel[i] != undefined) {
gunStrengthLevel[i] = sObject.data.gunStrengthLevel[i];
}
i++;
}
Frame 3
function penguinMake(n) {
if ((n != 2) && (n != 7)) {
pen.p.b1.gotoAndStop(n);
pen.p.a1.gotoAndStop(n);
pen.p.a2.gotoAndStop(n);
pen.p.f1.gotoAndStop(n);
pen.p.f2.gotoAndStop(n);
pen.p.h1.gotoAndStop(n);
pen.ph.gotoAndStop(n);
}
}
function penguinMake2(i, n) {
if ((n != 2) && (n != 7)) {
penguins[i].p.b1.gotoAndStop(n);
penguins[i].p.a1.gotoAndStop(n);
penguins[i].p.a2.gotoAndStop(n);
penguins[i].p.f1.gotoAndStop(n);
penguins[i].p.f2.gotoAndStop(n);
penguins[i].p.h1.gotoAndStop(n);
}
}
function onEnterFrame() {
if (penguins.length != penguinHealth.length) {
penguinHealth.splice(penguins.length, 1);
}
if (Paused == 0) {
if ((!shop1._x) >= 0) {
health = health + (engs / 100);
if (health >= maxHealth) {
health = maxHealth;
}
wg2.healthN = (Math.floor(health) + "/") + maxHealth;
wg2.healthN2 = (Math.floor(health) + "/") + maxHealth;
yourHealth._xscale = (health / maxHealth) * 100;
}
shaker();
tX = hole._x + hole.gun._x;
tY = hole._y + hole.gun._y;
if (penguins[0] != null) {
tX2 = penguins[0]._x - tX;
tY2 = penguins[0]._y - tY;
var rads = Math.atan2(tY2, tX2);
hole.gun._rotation = (rads * 180) / Math.PI;
}
var theTimes = mercs;
if (theTimes > 0) {
theTimes = theTimes - 1;
mercShotDelay1 = mercShotDelay1 - 1;
if (mercs >= 2) {
mercShotDelay2 = mercShotDelay2 - 1;
}
if (mercs >= 3) {
mercShotDelay3 = mercShotDelay3 - 1;
}
if (((mercShotDelay1 <= 0) || (mercShotDelay2 <= 0)) || (mercShotDelay3 <= 0)) {
if (mercShotDelay1 <= 0) {
mercShotDelay1 = 19;
pickersa = 0;
holes[pickersa].gun.gShot.gotoAndStop(randRange(2, 4));
}
if (mercShotDelay2 <= 0) {
mercShotDelay2 = 9;
pickersa = 1;
holes[pickersa].gun.gShot.gotoAndStop(randRange(2, 4));
}
if (mercShotDelay3 <= 0) {
mercShotDelay3 = 4;
pickersa = 2;
holes[pickersa].gun.gShot.gotoAndStop(randRange(2, 4));
}
createEmptyMovieClip("trianglea", 930559);
with (trianglea) {
lineStyle(1, 16777215);
moveTo(holes[pickersa]._x, holes[pickersa]._y);
lineTo(penguins[0]._x, penguins[0]._y);
}
trianglea.onEnterFrame = function () {
trianglea._alpha = trianglea._alpha - (trianglea._alpha / 2);
if (trianglea._alpha <= 5) {
trianglea.removeMovieClip();
}
};
penguinHealth[0] = penguinHealth[0] - 2;
if (muted == 0) {
hit2.start();
hit2.start();
hit2.start();
hit2.start();
}
bloodType = randRange(1, 4);
if (bloodType == 1) {
blood = _root.attachMovie("y1", "Blood" + depth, depth);
}
if (bloodType == 2) {
blood = _root.attachMovie("y2", "Blood" + depth, depth);
}
if (bloodType == 3) {
blood = _root.attachMovie("y3", "Blood" + depth, depth);
}
if (bloodType == 4) {
blood = _root.attachMovie("y4", "Blood" + depth, depth);
}
depth++;
blood._x = penguins[0]._x;
blood._y = penguins[0]._y;
blood._xscale = (blood._yscale = 75);
depth2++;
healthBars[0].g._xscale = (100 / originalHealth[penguinType[0] - 1]) * penguinHealth[0];
if ((penguinHealth[0] <= 0) && (penguinHealth[0] != undefined)) {
removePenguin();
}
}
}
tX = hole2._x + hole2.gun._x;
tY = hole2._y + hole2.gun._y;
if (penguins[0] != null) {
tX2 = penguins[0]._x - tX;
tY2 = penguins[0]._y - tY;
var rads = Math.atan2(tY2, tX2);
hole2.gun._rotation = (rads * 180) / Math.PI;
}
tX = hole3._x + hole3.gun._x;
tY = hole3._y + hole3.gun._y;
if (penguins[0] != null) {
tX2 = penguins[0]._x - tX;
tY2 = penguins[0]._y - tY;
var rads = Math.atan2(tY2, tX2);
hole3.gun._rotation = (rads * 180) / Math.PI;
}
var qx = (_xmouse - gun._x);
var qy = (_ymouse - gun._y);
var radians2 = Math.atan2(qy, qx);
gun._rotation = (radians2 * 180) / Math.PI;
p.tt._rotation = gun._rotation + 360;
addEnemy = randRange(1, enComeSpeed[level - 1]);
if (((addEnemy == 1) || (penguins.length == 0)) && (penguinsPerLevel[level - 1] > 0)) {
penguinsPerLevel[level - 1] = penguinsPerLevel[level - 1] - 1;
createEnemy();
eLeft = penguinsPerLevel[level - 1] + penguins.length;
penguinsOnStage = penguinsOnStage + 1;
}
penguinMovement();
shoot();
} else {
i = penguins.length - 1;
while (i >= 0) {
penguins[i].p.stop();
i--;
}
}
cursorMovement();
}
function cursorMovement() {
var _local2 = _xmouse - aim._x;
var _local1 = _ymouse - aim._y;
aim._x = aim._x + (_local2 / 2);
aim._y = aim._y + (_local1 / 2);
}
function updateStats() {
es = "X" + engs;
ms = "X" + mercs;
other.moneyTxt = money;
other.moneyTxt2 = money;
scorer.scoreTxt = score;
scorer.scoreTxt2 = score;
other.killsTxt = kills;
other.killsTxt2 = kills;
other.levelTxt = level;
other.levelTxt2 = level;
other.ammoTxt = ammo[gunEquipped - 1];
other.ammoTxt2 = ammo[gunEquipped - 1];
wg.clipTxt = (leftInClip + "/") + clipSize[gunEquipped - 1];
wg.clipTxt2 = (leftInClip + "/") + clipSize[gunEquipped - 1];
}
function removePenguin2() {
penguins[i].removeMovieClip();
healthBars[i].removeMovieClip();
penguins.splice(i, 1);
healthBars.splice(i, 1);
penguinType.splice(i, 1);
penguinHealth.splice(i, 1);
}
function removePenguin() {
if (i == -1) {
i = 0;
}
if (penguins[i] != undefined) {
if (muted == 0) {
death.start();
death2.start();
death3.start();
death.start();
death2.start();
death3.start();
}
kills = kills + 1;
score = score + penguinScore[penguinType[i] - 1];
money = money + penguinMoney[penguinType[i] - 1];
kongregate.stats.submit("Money", money);
kongregate.stats.submit("Score", score);
kongregate.stats.submit("Kills", 1);
updateStats();
penguinsOnStage = penguinsOnStage - 1;
penguins[i].gotoAndStop(2);
penguinMake2(i, penguinType[i]);
if (((penguinType[i] == 2) || (penguinType[i] == 3)) || (penguinType[i] == 7)) {
exp = attachMovie("Explosion2", "exp" + depth, depth);
if (muted == 0) {
expa.start();
}
depth++;
exp._x = penguins[i]._x;
exp._y = penguins[i]._y;
}
moner = attachMovie("moneyMC", "money" + depth, depth);
depth++;
moner._x = randRange(_xmouse - 20, _xmouse + 20);
moner._y = randRange(_ymouse - 20, _ymouse + 20);
moner.moneyMC.mon = "$" + penguinMoney[penguinType[i] - 1];
moner.moneyMC.mon2 = "$" + penguinMoney[penguinType[i] - 1];
healthBars[i].removeMovieClip();
penguins.splice(i, 1);
healthBars.splice(i, 1);
penguinType.splice(i, 1);
penguinHealth.splice(i, 1);
if ((penguinsOnStage <= 0) && (penguinsPerLevel[level - 1] < 1)) {
if (level == 25) {
gotoAndStop (6);
i = penguins.length - 1;
while (i >= 0) {
removePenguin2();
i--;
}
song.stop();
aim.removeMovieClip();
gun.removeMovieClip();
hole.removeMovieClip();
hole2.removeMovieClip();
hole3.removeMovieClip();
Mouse.show();
} else {
shop();
Paused = 1;
}
}
eLeft = penguinsPerLevel[level - 1] + penguins.length;
}
}
function shop() {
shop1 = attachMovie("shopScreen", "shop1", 999523);
shop1.shop.pText._alpha = 0;
shop1._x = Stage.width / 2;
shop1._y = Stage.height / 2;
gunButtons = new Array(shop1.shop.g1, shop1.shop.g2, shop1.shop.g3, shop1.shop.g4, shop1.shop.g5, shop1.shop.g6, shop1.shop.g7);
gunButtons[gunEquipped - 1]._alpha = 20;
shop1.shop.left1.infobox1.gotoAndStop(gunEquipped);
gunSelected = gunEquipped - 1;
shop1.shop.aa1 = "$" + (ammoCost[gunSelected] * 100);
shop1.shop.sss1 = Strengths[gunSelected][gunStrengthLevel[gunSelected]];
shop1.shop.ss1 = "$" + StrengthCosts[gunSelected][gunStrengthLevel[gunSelected]];
shop1.shop.ccc1 = ClipSizes[gunSelected][clipSizeLevel[gunSelected]];
shop1.shop.cc1 = "$" + ClipSizeCosts[gunSelected][clipSizeLevel[gunSelected]];
shop1.shop.fff1 = Reloads[gunSelected][reloadTimeLevel[gunSelected]];
shop1.shop.ff1 = "$" + ReloadCosts[gunSelected][reloadTimeLevel[gunSelected]];
upButtons = new Array(shop1.shop.u1, shop1.shop.u2, shop1.shop.u3, shop1.shop.u4);
createHighlights();
shop1.shop.shopMoney = "$" + money;
shop1.shop.b1.onRelease = function () {
if ((money >= (ammoCost[gunSelected] * 100)) && (ownGun[gunSelected] == 1)) {
money = money - (ammoCost[gunSelected] * 100);
ammo[gunSelected] = ammo[gunSelected] + 100;
}
shop1.shop.aa1 = "$" + (ammoCost[gunSelected] * 100);
shop1.shop.shopMoney = "$" + money;
};
shop1.shop.b2.onRelease = function () {
if (((money >= ReloadCosts[gunSelected][reloadTimeLevel[gunSelected]]) && (ownGun[gunSelected] == 1)) && (ReloadCosts[gunSelected][reloadTimeLevel[gunSelected]] != "Maxed")) {
money = money - ReloadCosts[gunSelected][reloadTimeLevel[gunSelected]];
reloadTimeLevel[gunSelected] = reloadTimeLevel[gunSelected] + 1;
}
reloadTime[gunSelected] = Reloads[gunSelected][reloadTimeLevel[gunSelected]];
shop1.shop.fff1 = Reloads[gunSelected][reloadTimeLevel[gunSelected]];
shop1.shop.ff1 = "$" + ReloadCosts[gunSelected][reloadTimeLevel[gunSelected]];
shop1.shop.shopMoney = "$" + money;
};
shop1.shop.b3.onRelease = function () {
if (((money >= StrengthCosts[gunSelected][gunStrengthLevel[gunSelected]]) && (ownGun[gunSelected] == 1)) && (StrengthCosts[gunSelected][gunStrengthLevel[gunSelected]] != "Maxed")) {
money = money - StrengthCosts[gunSelected][gunStrengthLevel[gunSelected]];
gunStrengthLevel[gunSelected] = gunStrengthLevel[gunSelected] + 1;
}
gunStrength[gunSelected] = Strengths[gunSelected][gunStrengthLevel[gunSelected]];
shop1.shop.sss1 = Strengths[gunSelected][gunStrengthLevel[gunSelected]];
shop1.shop.ss1 = "$" + StrengthCosts[gunSelected][gunStrengthLevel[gunSelected]];
shop1.shop.shopMoney = "$" + money;
};
shop1.shop.b4.onRelease = function () {
if (((money >= ClipSizeCosts[gunSelected][clipSizeLevel[gunSelected]]) && (ownGun[gunSelected] == 1)) && (ClipSizeCosts[gunSelected][clipSizeLevel[gunSelected]] != "Maxed")) {
money = money - ClipSizeCosts[gunSelected][clipSizeLevel[gunSelected]];
clipSizeLevel[gunSelected] = clipSizeLevel[gunSelected] + 1;
}
clipSize[gunSelected] = ClipSizes[gunSelected][clipSizeLevel[gunSelected]];
shop1.shop.ccc1 = ClipSizes[gunSelected][clipSizeLevel[gunSelected]];
shop1.shop.cc1 = "$" + ClipSizeCosts[gunSelected][clipSizeLevel[gunSelected]];
shop1.shop.shopMoney = "$" + money;
};
shop1.shop.b5.onRelease = function () {
if (rightSelector == 0) {
if (money >= Math.floor((maxHealth - health) * 10)) {
money = money - Math.floor((maxHealth - health) * 10);
health = maxHealth;
wg2.healthN = (Math.floor(health) + "/") + maxHealth;
wg2.healthN2 = (Math.floor(health) + "/") + maxHealth;
yourHealth._xscale = (health / maxHealth) * 100;
shop1.shop.aa2 = maxHealth - health;
shop1.shop.pp2 = (maxHealth - health) * 10;
}
}
if (rightSelector == 1) {
if (money >= ((maxHealth - 90) * 10)) {
money = money - ((maxHealth - 90) * 10);
maxHealth = maxHealth + 10;
health = health + 10;
wg2.healthN = (Math.floor(health) + "/") + maxHealth;
wg2.healthN2 = (Math.floor(health) + "/") + maxHealth;
yourHealth._xscale = (health / maxHealth) * 100;
shop1.shop.aa2 = maxHealth + 10;
shop1.shop.pp2 = (maxHealth - 90) * 10;
}
}
if (rightSelector == 2) {
if ((money >= mercCosts[mercs]) && (mercCosts[mercs] != "Maxed")) {
money = money - mercCosts[mercs];
mercs = mercs + 1;
if (mercs == 1) {
hole._alpha = 100;
}
if (mercs == 2) {
hole2._alpha = 100;
}
if (mercs == 3) {
hole3._alpha = 100;
}
updateStats();
shop1.shop.aa2 = mercs;
shop1.shop.pp2 = mercCosts[mercs];
}
}
if (rightSelector == 3) {
if ((money >= engCosts[engs]) && (engCosts[engs] != "Maxed")) {
money = money - engCosts[engs];
engs = engs + 1;
updateStats();
shop1.shop.aa2 = engs;
shop1.shop.pp2 = engCosts[engs];
}
}
shop1.shop.shopMoney = "$" + money;
};
i = gBlood.length - 1;
while (i >= 0) {
gBlood[i].removeMovieClip();
gBlood.splice(i, 1);
i--;
}
}
function createHighlights() {
createHover4(shop1.shop.buyGun);
createHover3(shop1.shop.b1);
createHover3(shop1.shop.b2);
createHover3(shop1.shop.b3);
createHover3(shop1.shop.b4);
createHover3(shop1.shop.b5);
createHover5(shop1.shop.finished);
createHovera5(shop1.shop.mg);
shop1.shop.pur.gotoAndStop(ownGun[0] + 1);
i = gunButtons.length - 1;
while (i >= 0) {
createHover(gunButtons[i], i);
i--;
}
i = upButtons.length - 1;
while (i >= 0) {
createHover2(upButtons[i], i);
i--;
}
}
function createHover(button, i) {
button.onRollOver = function () {
deSelectWeps();
if (button._alpha <= 15) {
button._alpha = 10;
}
};
button.onRollOut = function () {
deSelectWeps();
};
button.onRelease = function () {
if (button._alpha >= 15) {
button._alpha = 10;
}
if (button._alpha <= 15) {
t = gunButtons.length - 1;
while (t >= 0) {
gunButtons[t]._alpha = 0;
t--;
}
button._alpha = 20;
if (ownGun[i] == 1) {
shop1.shop.pText._alpha = 0;
} else {
shop1.shop.pText._alpha = 100;
}
shop1.shop.aa1 = "$" + (ammoCost[i] * 100);
shop1.shop.sss1 = Strengths[i][gunStrengthLevel[i]];
shop1.shop.ss1 = "$" + StrengthCosts[i][gunStrengthLevel[i]];
shop1.shop.ccc1 = ClipSizes[i][clipSizeLevel[i]];
shop1.shop.cc1 = "$" + ClipSizeCosts[i][clipSizeLevel[i]];
shop1.shop.fff1 = Reloads[i][reloadTimeLevel[i]];
shop1.shop.ff1 = "$" + ReloadCosts[i][reloadTimeLevel[i]];
}
gunSelected = i;
shop1.shop.left1.infobox1.gotoAndStop(i + 1);
shop1.shop.pur.gotoAndStop(ownGun[i] + 1);
};
}
function createHover2(button, i) {
button.onRollOver = function () {
deSelectUps();
if (button._alpha <= 15) {
button._alpha = 10;
}
};
button.onRollOut = function () {
deSelectUps();
};
button.onRelease = function () {
if (button._alpha >= 15) {
button._alpha = 0;
}
if (button._alpha <= 15) {
t = upButtons.length - 1;
while (t >= 0) {
upButtons[t]._alpha = 0;
t--;
}
button._alpha = 20;
rightSelector = i;
if (i == 0) {
shop1.shop.aa2 = maxHealth - health;
shop1.shop.pp2 = (maxHealth - health) * 10;
shop1.shop.ee2 = "Full Health";
}
if (i == 1) {
shop1.shop.aa2 = maxHealth + 10;
shop1.shop.pp2 = (maxHealth - 90) * 10;
shop1.shop.ee2 = "Higher Max Health";
}
if (i == 2) {
shop1.shop.aa2 = mercs;
shop1.shop.pp2 = mercCosts[mercs];
shop1.shop.ee2 = "Assistance in Battle";
}
if (i == 3) {
shop1.shop.aa2 = engs;
shop1.shop.pp2 = engCosts[engs];
shop1.shop.ee2 = "Healing in Battle";
}
}
shop1.shop.right.infobox.gotoAndStop(i + 1);
};
}
function createHover3(button) {
button.onRollOver = function () {
button._alpha = 20;
};
button.onRollOut = function () {
button._alpha = 10;
};
button.onRelease = function () {
};
}
function createHover4(button) {
button.onRollOver = function () {
if (ownGun[gunSelected] != 1) {
button._alpha = 20;
}
};
button.onRollOut = function () {
button._alpha = 10;
};
button.onRelease = function () {
if ((ownGun[gunSelected] != 1) && (money >= gunCosts[gunSelected])) {
ammo[gunEquipped - 1] = ammo[gunEquipped - 1] + leftInClip;
money = money - gunCosts[gunSelected];
shop1.shop.shopMoney = "$" + money;
ownGun[gunSelected] = 1;
kongregate.stats.submit("Gun" + gunSelected, 1);
shop1.shop.pText._alpha = 0;
shop1.shop.pur.gotoAndStop(ownGun[gunSelected] + 1);
leftInClip = clipSize[gunSelected];
if (gunSelected >= gunEquipped) {
gunEquipped = gunSelected + 1;
gun.tGun.gotoAndStop(gunEquipped);
}
shop1.shop.shopMoney = "$" + money;
}
};
}
function createHover5(button) {
button.onRollOver = function () {
button._alpha = 10;
};
button.onRollOut = function () {
button._alpha = 0;
};
button.onRelease = function () {
level = level + 1;
updateStats();
shop1.removeMovieClip();
d.d1.d2 = "Day " + level;
d.gotoAndPlay(1);
leftInClip = clipSize[gunEquipped - 1];
Paused = 0;
sObject.data.level = level;
sObject.flush();
sObject.data.kills = kills;
sObject.flush();
sObject.data.score = score;
sObject.flush();
sObject.data.money = money;
sObject.flush();
sObject.data.health = health;
sObject.flush();
sObject.data.maxHealth = maxHealth;
sObject.flush();
sObject.data.gunEquipped = gunEquipped;
sObject.flush();
sObject.data.engs = engs;
sObject.flush();
sObject.data.mercs = mercs;
sObject.flush();
sObject.data.ownGun = ownGun;
sObject.flush();
sObject.data.clipSizeLevel = clipSizeLevel;
sObject.flush();
sObject.data.reloadTimeLevel = reloadTimeLevel;
sObject.flush();
sObject.data.gunStrengthLevel = gunStrengthLevel;
sObject.flush();
};
}
function createHovera5(button) {
button.onRollOver = function () {
button._alpha = 10;
};
button.onRollOut = function () {
button._alpha = 0;
};
button.onRelease = function () {
getURL ("http://www.arcadebomb.com", "_blank");
};
}
function createHover6(button) {
button.onRollOver = function () {
button._alpha = 100;
};
button.onRollOut = function () {
button._alpha = 75;
};
button.onRelease = function () {
level = level + 1;
updateStats();
shop1.removeMovieClip();
d.d1.d2 = "Day " + level;
d.gotoAndPlay(1);
Paused = 0;
};
}
function createHover7(button) {
button.onRollOver = function () {
button._alpha = 100;
};
button.onRollOut = function () {
button._alpha = 75;
};
button.onRelease = function () {
shop1.shop.confirm._alpha = 0;
shop1.shop.confirm._x = -1000;
};
}
function deSelectWeps() {
i = gunButtons.length - 1;
while (i >= 0) {
if (gunButtons[i]._alpha <= 15) {
gunButtons[i]._alpha = 0;
}
i--;
}
}
function deSelectUps() {
i = upButtons.length - 1;
while (i >= 0) {
if (upButtons[i]._alpha <= 15) {
upButtons[i]._alpha = 0;
}
i--;
}
}
function createEnemy() {
enType = randRange(1, pensAllowed[level - 1]);
hb = attachMovie("healthBar", "healthBar" + depth, depth);
depth++;
healthBars.push(hb);
if (enType == 1) {
pen = attachMovie("penguin1", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(375, 475);
penguinHealth.push(5);
}
if (enType == 2) {
pen = attachMovie("penguin2", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(150, 300);
penguinHealth.push(15);
}
if (enType == 3) {
pen = attachMovie("penguin1", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(375, 475);
penguinHealth.push(30);
}
if (enType == 4) {
pen = attachMovie("penguin1", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(375, 475);
penguinHealth.push(15);
}
if (enType == 5) {
pen = attachMovie("penguin1", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(375, 475);
penguinHealth.push(100);
pen.p.a1._y = pen.p.a1._y - 20;
pen.p.a2._y = pen.p.a2._y - 20;
}
if (enType == 6) {
pen = attachMovie("penguin1", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(375, 475);
penguinHealth.push(100);
}
if (enType == 7) {
pen = attachMovie("penguin3", "penguin" + depth, depth);
depth++;
pen._x = (-pen._width) / 2;
pen._y = randRange(150, 300);
penguinHealth.push(100);
}
penguinMake(enType);
hb._x = pen._x;
hb._y = pen._y - 30;
penguins.push(pen);
penguinType.push(enType);
}
function penguinMovement() {
i = penguins.length - 1;
while (i >= 0) {
if (penguinType[i] == 6) {
invis = randRange(1, 100);
if (invis == 1) {
if (penguins[i]._alpha >= 80) {
penguins[i]._alpha = 50;
} else {
penguins[i]._alpha = 100;
}
}
if (penguins[i]._currentframe != 1) {
penguins[i]._alpha = 100;
}
}
if ((penguins[i]._currentframe == 3) && (penguins[i].p._currentframe == 15)) {
health = health - 1;
if (health <= 0) {
attachMovie("GameOverScreen", "GameOverScreen", 993999);
GameOverScreen._x = Stage.width / 2;
GameOverScreen._y = Stage.height / 2;
Paused = 1;
GameOverScreen.a1.onRollOver = function () {
GameOverScreen.a1.gotoAndPlay(2);
};
GameOverScreen.a1.onRollOut = function () {
GameOverScreen.a1.gotoAndStop(1);
};
GameOverScreen.a1.onRelease = function () {
GameOverScreen.removeMovieClip();
health = maxHealth;
Paused = 0;
score = Math.floor(score * 0.8);
i = penguins.length - 1;
while (i >= 0) {
removePenguin();
i--;
}
};
GameOverScreen.a2.onRollOver = function () {
GameOverScreen.a2.gotoAndPlay(2);
};
GameOverScreen.a2.onRollOut = function () {
GameOverScreen.a2.gotoAndStop(1);
};
GameOverScreen.a2.onRelease = function () {
i = penguins.length - 1;
while (i >= 0) {
removePenguin2();
i--;
}
hole.removeMovieClip();
aim.removeMovieClip();
gun.removeMovieClip();
song.stop();
hole2.removeMovieClip();
hole3.removeMovieClip();
GameOverScreen.removeMovieClip();
gotoAndStop (2);
};
GameOverScreen.a3.onRollOver = function () {
GameOverScreen.a3.gotoAndPlay(2);
};
GameOverScreen.a3.onRollOut = function () {
GameOverScreen.a3.gotoAndStop(1);
};
GameOverScreen.a3.onRelease = function () {
getURL ("http://www.arcadebomb.com", "_blank");
};
}
wg2.healthN = (Math.floor(health) + "/") + maxHealth;
wg2.healthN2 = (Math.floor(health) + "/") + maxHealth;
yourHealth._xscale = (health / maxHealth) * 100;
}
if (hill.hitTest(penguins[i]._x + (penguins[i]._width / 2), penguins[i]._y + (penguins[i]._height / 2), true)) {
if ((penguinType[i] == 2) || (penguinType[i] == 7)) {
health = health - 5;
if (health <= 0) {
attachMovie("GameOverScreen", "GameOverScreen", 993999);
GameOverScreen._x = Stage.width / 2;
GameOverScreen._y = Stage.height / 2;
Paused = 1;
GameOverScreen.a1.onRollOver = function () {
GameOverScreen.a1.gotoAndPlay(2);
};
GameOverScreen.a1.onRollOut = function () {
GameOverScreen.a1.gotoAndStop(1);
};
GameOverScreen.a1.onRelease = function () {
GameOverScreen.removeMovieClip();
health = maxHealth;
Paused = 0;
score = Math.floor(score * 0.8);
i = penguins.length - 1;
while (i >= 0) {
removePenguin();
i--;
}
};
GameOverScreen.a2.onRollOver = function () {
GameOverScreen.a2.gotoAndPlay(2);
};
GameOverScreen.a2.onRollOut = function () {
GameOverScreen.a2.gotoAndStop(1);
};
GameOverScreen.a3.onRollOver = function () {
GameOverScreen.a3.gotoAndPlay(2);
};
GameOverScreen.a3.onRollOut = function () {
GameOverScreen.a3.gotoAndStop(1);
};
GameOverScreen.a3.onRelease = function () {
getURL ("http://www.arcadebomb.com", "_blank");
};
}
wg2.healthN = (Math.floor(health) + "/") + maxHealth;
wg2.healthN2 = (Math.floor(health) + "/") + maxHealth;
yourHealth._xscale = (health / maxHealth) * 100;
penguins[i].gotoAndStop(2);
removePenguin();
} else {
penguins[i].gotoAndStop(3);
penguinMake2(i, penguinType[i]);
}
} else {
penguins[i]._x = penguins[i]._x + penSpeedNorm;
if (penguinType[i] == 4) {
penguins[i]._x = penguins[i]._x + penSpeedNorm;
}
if (penguinType[i] == 7) {
penguins[i]._x = penguins[i]._x + penSpeedNorm;
}
if (penguinType[i] == 5) {
penguins[i]._x = penguins[i]._x - (penSpeedNorm / 2);
}
}
healthBars[i]._x = penguins[i]._x;
healthBars[i]._y = penguins[i]._y - 30;
if (penguinType[i] == 5) {
healthBars[i]._y = penguins[i]._y - 50;
}
if ((penguins[i]._x - (penguins[i]._width / 2)) >= Stage.width) {
removePenguin();
}
i--;
}
}
function gBloodGo() {
i = gBlood.length - 1;
while (i >= 0) {
gBlood[i]._alpha = gBlood[i]._alpha - 5;
if (gBlood[i]._alpha <= 0) {
gBlood[i].removeMovieClip();
gBlood.splice(i, 1);
}
i--;
}
}
function shoot() {
gunDelay = gunDelay - 1;
if ((gunDelay >= 0) && (leftInClip == clipSize[gunEquipped - 1])) {
yourClip._xscale = 100 - ((gunDelay / reloadTime[gunEquipped - 1]) * 100);
updateStats();
}
if ((gunDelay <= 0) && (clipTxt == 0)) {
updateStats();
}
if (((((mDown == 1) && (gunDelay <= 0)) && (penguins.length > 0)) && ((ammo[gunEquipped - 1] + leftInClip) > 0)) || ((gunEquipped == 5) && (moreShots != 0))) {
if ((gunEquipped == 5) && (moreShots == 0)) {
moreShots = 1;
} else if (moreShots == 1) {
moreShots = 2;
gun._rotation = gun._rotation + 2;
} else if (moreShots == 2) {
moreShots = 0;
gun._rotation = gun._rotation - 2;
}
if (muted == 0) {
pistol.start();
}
leftInClip = leftInClip - 1;
if (shake == 0) {
shake = 1;
}
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
gun.gShot.gotoAndStop(randRange(2, 4));
gunDelay = gunShotDelay[gunEquipped - 1];
if (leftInClip <= 0) {
leftInClip = clipSize[gunEquipped - 1];
ammo[gunEquipped - 1] = ammo[gunEquipped - 1] - clipSize[gunEquipped - 1];
if (ammo[gunEquipped - 1] < 0) {
leftInClip = leftInClip + ammo[gunEquipped - 1];
ammo[gunEquipped - 1] = 0;
}
if ((leftInClip <= 0) && (ammo[gunEquipped - 1] <= 0)) {
gunEquipped = gunEquipped - 1;
}
gunDelay = reloadTime[gunEquipped - 1];
if (muted == 0) {
reload.start();
reload.start();
reload.start();
}
}
if (isAutomatic[gunEquipped - 1] == 0) {
mDown = 0;
}
createEmptyMovieClip("triangle", 900555);
with (triangle) {
lineStyle(1, 16777215);
moveTo(gun._x, gun._y);
var xmoveAdd = (Math.cos((gun._rotation * Math.PI) / 180) * 10);
var ymoveAdd = (Math.sin((gun._rotation * Math.PI) / 180) * 10);
var currentX = gun._x;
var currentY = gun._y;
t = 100;
while (t >= 0) {
if (gunEquipped == 6) {
t = -7;
}
currentX = currentX + xmoveAdd;
currentY = currentY + ymoveAdd;
lineTo(currentX, currentY);
i = penguins.length - 1;
while (i >= 0) {
if (penguins[i].ph.hitTest(currentX, currentY, true) && (penguins[i]._alpha >= 80)) {
penguinHealth[i] = penguinHealth[i] - gunStrength[gunEquipped - 1];
healthBars[i].g._xscale = (100 / originalHealth[penguinType[i] - 1]) * penguinHealth[i];
if ((penguinHealth[i] <= 0) && (penguinHealth[i] != undefined)) {
removePenguin();
}
}
if (penguins[i].hitTest(currentX, currentY, true) && (penguins[i]._alpha >= 80)) {
t = -6;
penguinHealth[i] = penguinHealth[i] - gunStrength[gunEquipped - 1];
if (muted == 0) {
hit2.start();
hit2.start();
hit2.start();
hit2.start();
}
bloodType = randRange(1, 4);
if (bloodType == 1) {
blood = _root.attachMovie("y1", "Blood" + depth, depth);
}
if (bloodType == 2) {
blood = _root.attachMovie("y2", "Blood" + depth, depth);
}
if (bloodType == 3) {
blood = _root.attachMovie("y3", "Blood" + depth, depth);
}
if (bloodType == 4) {
blood = _root.attachMovie("y4", "Blood" + depth, depth);
}
depth++;
blood._x = currentX;
blood._y = currentY;
blood._xscale = (blood._yscale = 75);
depth2++;
healthBars[i].g._xscale = (100 / originalHealth[penguinType[i] - 1]) * penguinHealth[i];
if ((penguinHealth[i] <= 0) && (penguinHealth[i] != undefined)) {
removePenguin();
}
}
i--;
}
t--;
}
if (((t != -7) && (floor.hitTest(_xmouse, _ymouse, true))) || ((t != -7) && (gunEquipped == 6))) {
triangle.removeMovieClip();
createEmptyMovieClip("triangle", 900555);
if (gunEquipped == 6) {
expz = _root.attachMovie("Explosion2", "exp" + depth, depth);
depth++;
expz._x = _xmouse;
expz._y = _ymouse;
i = penguins.length - 1;
while (i >= 0) {
if (expz.hitTest(penguins[i])) {
penguinHealth[i] = penguinHealth[i] - gunStrength[gunEquipped - 1];
healthBars[i].g._xscale = (100 / originalHealth[penguinType[i] - 1]) * penguinHealth[i];
if ((penguinHealth[i] <= 0) && (penguinHealth[i] != undefined)) {
if (((penguinType[i] == 2) || (penguinType[i] == 3)) || (penguinType[i] == 7)) {
expz.removeMovieClip();
}
removePenguin();
}
}
i--;
}
}
with (triangle) {
lineStyle(1, 16777215);
moveTo(gun._x, gun._y);
if ((gunEquipped == 5) && (moreShots == 2)) {
lineTo(_xmouse + 25, _ymouse);
} else if ((gunEquipped == 5) && (moreShots == 0)) {
lineTo(_xmouse - 25, _ymouse);
} else {
lineTo(_xmouse, _ymouse);
}
}
fs = _root.attachMovie("floorShot", "floor" + depth, depth);
depth++;
fs._x = _xmouse;
fs._y = _ymouse;
fs.gotoAndStop(randRange(1, 3));
}
if ((t != -7) && (!floor.hitTest(_xmouse, _ymouse))) {
triangle.removeMovieClip();
createEmptyMovieClip("triangle", 900555);
with (triangle) {
lineStyle(1, 16777215);
moveTo(gun._x, gun._y);
xmoveAdd = Math.cos((gun._rotation * Math.PI) / 180) * 10;
ymoveAdd = Math.sin((gun._rotation * Math.PI) / 180) * 10;
currentX = gun._x;
currentY = gun._y;
t = 100;
while (t >= 0) {
currentX = currentX + xmoveAdd;
currentY = currentY + ymoveAdd;
lineTo(currentX, currentY);
if (floor.hitTest(currentX, currentY)) {
fs = _root.attachMovie("floorShot", "floor" + depth, depth);
depth++;
fs._x = currentX;
fs._y = currentY;
fs.gotoAndStop(randRange(1, 3));
t = -5;
}
t--;
}
}
}
}
triangle.onEnterFrame = function () {
triangle._alpha = triangle._alpha - (triangle._alpha / 2);
if (triangle._alpha <= 5) {
triangle.removeMovieClip();
}
};
}
}
function shaker() {
if (shake == 0) {
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 3;
_root._x = _root._x - 3;
} else if (shake == 3) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function randRange(smallNum, bigNum) {
return(Math.floor(Math.random() * ((bigNum - smallNum) + 1)) + smallNum);
}
depth = 50000;
depth2 = 100;
addEnemy = 0;
enComeSpeed = new Array(140, 130, 120, 110, 100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 47, 45, 42, 40, 37, 35, 32, 30, 27, 25, 20);
Mouse.hide();
aim.swapDepths(999901);
penguinsOnStage = 0;
gun.swapDepths(900557);
Paused = 0;
saved.swapDepths(5453);
hole._alpha = 0;
hole2._alpha = 0;
hole3._alpha = 0;
if (sObject.data.level != undefined) {
Paused = 1;
saved.con.onRollOver = function () {
saved.con.gotoAndStop(2);
};
saved.con.onRollOut = function () {
saved.con.gotoAndStop(1);
};
saved.ng.onRollOver = function () {
saved.ng.gotoAndStop(2);
};
saved.ng.onRollOut = function () {
saved.ng.gotoAndStop(1);
};
saved.ng.onRelease = function () {
level = 1;
kills = 0;
score = 0;
money = 500;
health = 100;
maxHealth = 100;
gunEquipped = 1;
engs = 0;
mercs = 0;
ownGun = new Array(1, 0, 0, 0, 0, 0, 0);
clipSizeLevel = new Array(0, 0, 0, 0, 0, 0, 0);
reloadTimeLevel = new Array(0, 0, 0, 0, 0, 0, 0);
gunStrengthLevel = new Array(0, 0, 0, 0, 0, 0, 0);
Paused = 0;
saved.removeMovieClip();
updateStats();
};
saved.con.onRelease = function () {
Paused = 0;
saved.removeMovieClip();
updateStats();
if (mercs >= 1) {
hole._alpha = 100;
}
if (mercs >= 2) {
hole2._alpha = 100;
}
if (mercs >= 3) {
hole3._alpha = 100;
}
gun.tGun.gotoAndStop(gunEquipped);
};
} else {
saved.removeMovieClip();
}
var song = new Sound();
song.attachSound("110364_Battle_Theme.mp3");
song.start(0, 99);
song.setVolume(30);
var pistol = new Sound();
pistol.attachSound("pistol.wav");
var death = new Sound();
death.attachSound("death.wav");
var death2 = new Sound();
death2.attachSound("death.wav");
var death3 = new Sound();
death3.attachSound("death.wav");
var hit2 = new Sound();
hit2.attachSound("hit2.wav");
var reload = new Sound();
reload.attachSound("reload.wav");
var expa = new Sound();
expa.attachSound("exp.wav");
keyListener = new Object();
muted = 0;
sound1.onRelease = function () {
if (muted == 1) {
muted = 0;
song.start(0, 99);
sound1.sound1.gotoAndStop(1);
} else {
muted = 1;
song.stop();
sound1.sound1.gotoAndStop(2);
}
};
qbtn.onRelease = function () {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
};
keyListener.onKeyDown = function () {
num = Key.getAscii();
if (num == 109) {
if (muted == 1) {
muted = 0;
song.start(0, 99);
sound1.sound1.gotoAndStop(1);
} else {
muted = 1;
song.stop();
sound1.sound1.gotoAndStop(2);
}
}
if (num == 49) {
gunEquipped = 1;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
}
if (num == 50) {
if (ownGun[1] == 1) {
gunEquipped = 2;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
} else {
yg.gotoAndPlay(2);
}
}
if (num == 51) {
if (ownGun[2] == 1) {
gunEquipped = 3;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
} else {
yg.gotoAndPlay(2);
}
}
if (num == 52) {
if (ownGun[3] == 1) {
gunEquipped = 4;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
} else {
yg.gotoAndPlay(2);
}
}
if (num == 53) {
if (ownGun[4] == 1) {
gunEquipped = 5;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
} else {
yg.gotoAndPlay(2);
}
}
if (num == 54) {
if (ownGun[5] == 1) {
gunEquipped = 6;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
} else {
yg.gotoAndPlay(2);
}
}
if (num == 55) {
if (ownGun[6] == 1) {
gunEquipped = 7;
leftInClip = 0;
gun.tGun.gotoAndStop(gunEquipped);
yourClip._xscale = (leftInClip / clipSize[gunEquipped - 1]) * 100;
updateStats();
num = 114;
} else {
yg.gotoAndPlay(2);
}
}
if (num == 114) {
leftInClip = clipSize[gunEquipped - 1];
ammo[gunEquipped - 1] = ammo[gunEquipped - 1] - clipSize[gunEquipped - 1];
gunDelay = reloadTime[gunEquipped - 1];
if (muted == 0) {
reload.start();
reload.start();
reload.start();
}
}
if ((num == 112) || ((num == 32) && ((!shop1._x) > 0))) {
if (Paused == 1) {
Paused = 0;
paused2.removeMovieClip();
i = penguins.length - 1;
while (i >= 0) {
penguins[i].p.play();
i--;
}
} else if (Paused == 0) {
Paused = 1;
attachMovie("paused", "paused2", 1000500);
paused2._x = Stage.width / 2;
paused2._y = Stage.height / 2;
}
}
};
Key.addListener(keyListener);
clipSize = new Array(12, 100, 150, 5, 25, 2, 250);
reloadTime = new Array(90, 90, 90, 90, 90, 90, 90);
ammo = new Array(999999, 999999, 999999, 999999, 999999, 999999, 999999);
gunStrength = new Array(2, 1, 1, 10, 6, 50, 5);
gunShotDelay = new Array(7, 5, 3, 10, 5, 20, 2);
isAutomatic = new Array(0, 1, 1, 0, 0, 0, 1);
clipSizeCostStart = new Array(100, 0, 0, 0, 0, 0, 0);
reloadTimeCostStart = new Array(35, 0, 0, 0, 0, 0, 0);
gunStrengthCostStart = new Array(1, 0, 0, 0, 0, 0, 0);
ammoCost = new Array(0, 1, 2, 3, 10, 8, 25, 5);
Reload1 = new Array(90, 60, 30);
Strength1 = new Array(2, 3, 4);
ClipSize1 = new Array(12, 18, 25);
Reload1Cost = new Array(100, 200, "Maxed");
Strength1Cost = new Array(200, 500, "Maxed");
ClipSize1Cost = new Array(50, 100, "Maxed");
Reload2 = new Array(90, 60, 30);
Strength2 = new Array(1, 1.2, 1.4, 1.6, 1.8, 2);
ClipSize2 = new Array(100, 200, 300);
Reload2Cost = new Array(100, 200, "Maxed");
Strength2Cost = new Array(200, 300, 400, 500, 600, "Maxed");
ClipSize2Cost = new Array(50, 100, "Maxed");
Reload3 = new Array(90, 60, 30);
Strength3 = new Array(1, 1.2, 1.4, 1.6, 1.8, 2);
ClipSize3 = new Array(150, 300, 500);
Reload3Cost = new Array(200, 400, "Maxed");
Strength3Cost = new Array(500, 750, 1000, 1250, 1500, "Maxed");
ClipSize3Cost = new Array(100, 200, "Maxed");
Reload4 = new Array(90, 60, 30);
Strength4 = new Array(10, 15, 20);
ClipSize4 = new Array(5, 10, 20);
Reload4Cost = new Array(1000, 2000, "Maxed");
Strength4Cost = new Array(1000, 2000, "Maxed");
ClipSize4Cost = new Array(1000, 2000, "Maxed");
Reload5 = new Array(90, 60, 30);
Strength5 = new Array(6, 8, 10);
ClipSize5 = new Array(30, 60, 90);
Reload5Cost = new Array(2500, 5000, "Maxed");
Strength5Cost = new Array(5000, 10000, "Maxed");
ClipSize5Cost = new Array(2000, 3000, "Maxed");
Reload6 = new Array(90, 60, 30);
Strength6 = new Array(50, 75, 100);
ClipSize6 = new Array(4, 6, 8);
Reload6Cost = new Array(7500, 15000, "Maxed");
Strength6Cost = new Array(7500, 15000, "Maxed");
ClipSize6Cost = new Array(5000, 10000, "Maxed");
Reload7 = new Array(90, 60, 30);
Strength7 = new Array(5, 6, 7, 8, 9, 10);
ClipSize7 = new Array(250, 500, 1000);
Reload7Cost = new Array(10000, 20000, "Maxed");
Strength7Cost = new Array(10000, 20000, 30000, 40000, 50000, "Maxed");
ClipSize7Cost = new Array(10000, 20000, "Maxed");
Reloads = new Array(Reload1, Reload2, Reload3, Reload4, Reload5, Reload6, Reload7);
Strengths = new Array(Strength1, Strength2, Strength3, Strength4, Strength5, Strength6, Strength7);
ClipSizes = new Array(ClipSize1, ClipSize2, ClipSize3, ClipSize4, ClipSize5, ClipSize6, ClipSize7);
ReloadCosts = new Array(Reload1Cost, Reload2Cost, Reload3Cost, Reload4Cost, Reload5Cost, Reload6Cost, Reload7Cost);
StrengthCosts = new Array(Strength1Cost, Strength2Cost, Strength3Cost, Strength4Cost, Strength5Cost, Strength6Cost, Strength7Cost);
ClipSizeCosts = new Array(ClipSize1Cost, ClipSize2Cost, ClipSize3Cost, ClipSize4Cost, ClipSize5Cost, ClipSize6Cost, ClipSize7Cost);
shake = 0;
tX = 0;
tY = 0;
tX2 = 0;
tY2 = 0;
mercShotDelay1 = 20;
mercShotDelay2 = 21;
mercShotDelay3 = 22;
holes = new Array(hole, hole2, hole3);
pickersa = 0;
hole.swapDepths(931559);
hole2.swapDepths(932559);
hole3.swapDepths(933559);
if (gunEquipped >= 2) {
if (gunStrengthLevel[gunEquipped - 1] > 0) {
gunStrength[gunEquipped - 1] = Strengths[gunEquipped - 1][gunStrengthLevel[gunEquipped - 1]];
}
if (reloadTimeLevel[gunEquipped - 1] > 0) {
reloadTime[gunEquipped - 1] = Reloads[gunEquipped - 1][reloadTimeLevel[gunEquipped - 1]];
}
if (clipSizeLevel[gunEquipped - 1] > 0) {
clipSize[gunEquipped - 1] = ClipSizes[gunEquipped - 1][clipSizeLevel[gunEquipped - 1]];
}
}
enType = 1;
penguins = new Array();
penguinType = new Array();
penguinHealth = new Array();
healthBars = new Array();
penguinMoney = new Array(10, 25, 40, 100, 200, 300, 500);
penguinScore = new Array(10, 25, 40, 70, 120, 180, 250);
gunCosts = new Array(0, 500, 2000, 5000, 15000, 30000, 50000);
updateStats();
mercCosts = new Array(1500, 8000, 25000, "Maxed");
engCosts = new Array(500, 1000, 1500, 2000, 3000, 4000, 5000, 7500, 10000, "Maxed");
gunSelected = 0;
rightSelector = 0;
gun.tGun.gotoAndStop(1);
pensAllowed = new Array(1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7);
penguinsPerLevel = new Array(15, 20, 25, 30, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 150);
penguinsPerLevel2 = new Array(15, 20, 25, 30, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 150);
penSpeedNorm = 2;
mDown = 0;
onMouseDown = function () {
mDown = 1;
if (_currentframe == 3) {
Mouse.hide();
}
};
onMouseUp = function () {
mDown = 0;
};
gunDelay = 0;
originalHealth = new Array(5, 15, 30, 15, 100, 100, 100);
leftInClip = clipSize[gunEquipped - 1];
gBlood = new Array();
updateStats();
moreShots = 0;
Frame 4
function createHover10(button) {
button.onRollOver = function () {
button._alpha = 10;
};
button.onRollOut = function () {
button._alpha = 0;
};
button.onRelease = function () {
gotoAndStop (2);
};
}
createHover10(finished2);
Frame 5
function createHover10(button) {
button.onRollOver = function () {
button._alpha = 10;
};
button.onRollOut = function () {
button._alpha = 0;
};
button.onRelease = function () {
gotoAndStop (2);
};
}
createHover10(finished2);
Frame 6
function createHover10(button) {
button.onRollOver = function () {
button._alpha = 10;
};
button.onRollOut = function () {
button._alpha = 0;
};
button.onRelease = function () {
gotoAndStop (2);
};
}
stop();
Mouse.show();
createHover10(finished2);
kongregate.stats.submit("gameComplete", 1);
Symbol 16 MovieClip [Blood1] Frame 25
_parent.removeMovieClip();
Symbol 17 MovieClip [y1] Frame 1
stop();
Symbol 34 MovieClip [Blood2] Frame 32
_parent.removeMovieClip();
Symbol 54 MovieClip [Blood3] Frame 33
_parent.removeMovieClip();
Symbol 76 MovieClip [Blood4] Frame 40
_parent.removeMovieClip();
Symbol 157 MovieClip [Explosion] Frame 29
_parent.removeMovieClip();
Symbol 162 MovieClip [dayMovie] Frame 100
stop();
Symbol 170 MovieClip Frame 12
stop();
Symbol 174 Button
on (release) {
gotoAndPlay (2);
_root.music.stop();
}
Symbol 175 MovieClip Frame 11
stop();
Symbol 177 Button
on (release) {
gotoAndPlay (1);
_root.music.start(0, 99);
}
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 2
stop();
Instance of Symbol 182 MovieClip in Symbol 183 MovieClip [sound_contr] Frame 1
/* no clip actions */
Symbol 188 MovieClip [ng] Frame 1
stop();
Symbol 191 MovieClip [con] Frame 1
stop();
Symbol 200 MovieClip [yhnptgy] Frame 1
stop();
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 11
stop();
Symbol 217 MovieClip [moneyMC] Frame 20
this.removeMovieClip();
Symbol 220 MovieClip [headShot] Frame 20
this.removeMovieClip();
Symbol 236 MovieClip Frame 14
_parent.removeMovieClip();
Symbol 250 MovieClip Frame 12
_parent.removeMovieClip();
Symbol 265 MovieClip Frame 14
_parent.removeMovieClip();
Symbol 278 MovieClip Frame 10
_parent.gotoAndStop(1);
Symbol 289 MovieClip Frame 11
_parent.gotoAndStop(1);
Symbol 299 MovieClip Frame 8
_parent.gotoAndStop(1);
Symbol 300 MovieClip [gunshots] Frame 1
stop();
Symbol 300 MovieClip [gunshots] Frame 2
stop();
Symbol 309 MovieClip [aim] Frame 1
stop();
Symbol 318 Button
on (release) {
getURL ("http://www.arcadebomb.com", "_blank");
}
Symbol 320 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 218
_root.play();
Symbol 787 MovieClip [__Packages.md5] Frame 0
class md5
{
function md5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 347 Button
on (release) {
getURL ("http://www.arcadebomb.com", "_blank");
}
Symbol 365 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 1
stop();
Symbol 408 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 70
_parent.removeMovieClip();
Symbol 423 MovieClip [penguin1] Frame 1
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 499 MovieClip Frame 1
stop();
Symbol 499 MovieClip Frame 2
stop();
Symbol 499 MovieClip Frame 4
stop();
Symbol 549 MovieClip Frame 1
stop();
Symbol 557 MovieClip [shopScreen] Frame 70
stop();
Symbol 573 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 30
_parent.removeMovieClip();
Symbol 600 MovieClip [penguin2] Frame 1
stop();
Symbol 610 MovieClip Frame 5
_parent.removeMovieClip();
Symbol 611 MovieClip [penguin3] Frame 1
stop();
Symbol 734 Button
on (release) {
var md = new md5();
x = new LoadVars();
x.n = newName.toLowerCase();
x.s = _root.score;
md5val = x.s + 1518;
x.k = md.hash("" + md5val);
x.sendAndLoad("http://hiscore.arcadebomb.com/penguinm_submit.php", x, "POST");
gotoAndStop (2);
}
Symbol 775 Button
on (release) {
getURL ("http://hiscore.arcadebomb.com/penguinm.php", "_blank");
}
Symbol 777 Button
on (release) {
prevpage();
}
Symbol 779 Button
on (release) {
nextpage();
}
Symbol 780 MovieClip Frame 5
function prevpage() {
if (indexpage < 2) {
return(undefined);
}
indexpage--;
showpage(indexpage);
}
function nextpage() {
if (indexpage > 9) {
return(undefined);
}
indexpage++;
showpage(indexpage);
}
function showpage(index) {
trace(index);
trace("---");
ii = 1;
while (ii < 11) {
this["i" + ii] = ((index - 1) * 10) + ii;
if (!i["name" + (((index - 1) * 10) + ii)]) {
this["name" + ii] = "...";
} else {
this["name" + ii] = i["name" + (((index - 1) * 10) + ii)];
}
if (!i["score" + (((index - 1) * 10) + ii)]) {
this["score" + ii] = "...";
} else {
this["score" + ii] = i["score" + (((index - 1) * 10) + ii)];
}
ii++;
}
}
var c = new LoadVars();
var i = new LoadVars();
c.sendAndLoad("http://hiscore.arcadebomb.com/penguinm_get.php", i, "POST");
indexpage = 1;
i.onLoad = function () {
showpage(1);
};
stop();
Symbol 785 MovieClip Frame 1
stop();
Symbol 785 MovieClip Frame 2
stop();