Frame 1
stop();
testing = true;
Stage.showMenu = false;
Stage.scaleMode = "noScale";
Stage.align = "CC";
fscommand ("trapallkeys", true);
fscommand ("fullscreen", true);
stopAllSounds();
NewgroundsAPI.connectMovie(727);
NewgroundsAPI.addCustomLink(1, "picoday2008");
Frame 2
_quality = "MEDIUM";
bgm = true;
sfx = true;
var bgm01 = new Sound();
bgm01.attachSound("introBGM");
if (!testing) {
myv = System.capabilities.version;
thev = myv.substring(4, myv.length()).split(",")[0];
checkA = parseInt(thev);
checkB = System.capabilities.playerType;
checkC = _url.split(":")[0];
if (checkA < 8) {
cleared = false;
error = 1;
gotoAndStop (91);
} else if (checkB == "StandAlone") {
cleared = false;
error = 2;
gotoAndStop (91);
} else if (checkC == "file") {
cleared = false;
error = 3;
gotoAndStop (91);
} else if ((_url.indexOf("uploads.ungrounded") == -1) && (_url.indexOf("portal.totalh") == -1)) {
cleared = false;
error = 4;
gotoAndStop (91);
} else {
cleared = true;
}
} else {
cleared = true;
}
Frame 41
gotoAndStop (60);
Frame 60
destroyMap();
endPlacement();
initialize();
reset();
createMap();
pauseM.gotoAndStop(1);
stop();
btn1.onPress = function () {
toMapEdit = false;
gotoAndPlay (69);
};
btn2.onPress = function () {
toMapEdit = true;
gotoAndPlay (69);
};
stopAllSounds();
bgm01.start(0, 10);
Frame 69
var sfxPico = new Sound();
sfxPico.attachSound("SFX_pico");
Frame 70
var sfxBuild = new Sound();
sfxBuild.attachSound("SFX_build");
Frame 71
var monsTypes = new Array(1, 2, 3, 5, 6, 7, 13, 14, 15, 4, 8, 1, 2, 3, 5, 6, 7, 13, 14, 15, 4, 9, 1, 2, 3, 5, 6, 7, 13, 14, 15, 4, 10, 1, 2, 3, 5, 6, 7, 13, 14, 15, 4, 11, 1, 2, 3, 5, 6, 7, 13, 14, 15, 4, 12);
var numMonsPW = new Array(5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 1, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 1, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 1, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 1, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 1);
var cells = new Array();
var ranges = new Array();
_quality = _oldq;
var buzzer = new Sound();
buzzer.attachSound("buzzer");
Frame 72
function mapGO() {
i = 0;
while (i < ctr) {
cells[i].gotoAndStop(parseInt(mapCode.charAt(i)));
i++;
}
}
function createMap() {
ctr = 0;
x = 0;
while (x < 11) {
y = 0;
while (y < 14) {
cells[ctr] = cell.duplicateMovieClip("c" + ctr, 100 + ctr);
cells[ctr].swapDepths(100 + ctr);
cells[ctr]._x = x * 30;
cells[ctr]._y = 25 + (y * 30);
cells[ctr].num = ctr;
cells[ctr].onPress = function () {
if (placing) {
if (this.buildable) {
ranges[this.num] = rg.duplicateMovieClip("rnght" + this.num, 1000 + this.num);
ranges[this.num]._x = cells[this.num]._x + 15;
ranges[this.num]._y = cells[this.num]._y + 15;
gold = gold - tank.goldrisk;
score = score - 10;
if (tank.tankid == 1) {
this.towName = "Pico";
ranges[this.num].gotoAndStop(2);
} else if (tank.tankid == 2) {
this.towName = "AH";
} else if (tank.tankid == 3) {
this.towName = "Dad";
} else if (tank.tankid == 4) {
this.towName = "Steve";
} else if (tank.tankid == 5) {
this.towName = "P-bot";
} else if (tank.tankid == 6) {
this.towName = "Salad Fingers";
}
this.gotoAndStop(5 + tank.tankid);
endPlacement();
this.kills = 0;
ranges[this.num]._visible = false;
} else {
errorMsg.gotoAndStop(1);
errorMsg.gotoAndStop(2);
}
} else if (this.tower) {
selectedUnit = this;
statPage.gotoAndStop(1);
cell.towName = this.towName;
updateStatPage();
statPage.gotoAndStop(2);
} else {
statPage.gotoAndStop(1);
selectedUnit = null;
}
};
cells[ctr].onRollOver = function () {
if (placing) {
if (this.buildable) {
if (tank.tankid == 1) {
green.gotoAndStop(3);
} else {
green.gotoAndStop(1);
}
} else if (tank.tankid == 1) {
green.gotoAndStop(4);
} else {
green.gotoAndStop(2);
}
green._x = this._x;
green._y = this._y;
}
};
cells[ctr].onRollOut = function () {
green._x = -100;
green._y = -100;
};
ctr++;
y++;
}
x++;
}
mapGO();
}
var sfxSalad = new Sound();
sfxSalad.attachSound("SFX_salad");
Frame 73
function startSpawn() {
_root.spawning = true;
btnPM.gotoAndStop(2);
}
function endSpawn() {
teb = setInterval(endSpawn2, 1000);
}
function endSpawn2() {
_root.spawning = false;
btnPM.gotoAndStop(1);
clearInterval(teb);
}
Frame 74
function checkAllowBuild(btntow) {
if (gold >= btntow.cost) {
btntow.gotoAndStop(1);
} else {
btntow.gotoAndStop(2);
}
}
function endPlacement() {
placing = false;
tank._x = -300;
tank._y = -300;
Mouse.show();
green._x = -100;
green._y = -100;
}
function startPlacement() {
placing = true;
tank._x = _xmouse;
tank._y = _ymouse;
Mouse.hide();
}
function destroyMap() {
j = 0;
while (j < ctr) {
clearInterval(cells[j].shootTimer);
cells[j].removeMovieClip();
ranges[j].removeMovieClip();
salads[j].removeMovieClip();
j++;
}
}
function restartGame() {
destroyMap();
endPlacement();
initialize();
reset();
createMap();
}
Frame 75
function spawnWave() {
startSpawn();
var spawningInt = setInterval(spawnMonster, 750);
var clearInt = setInterval(function () {
endSpawn();
clearInterval(spawningInt);
clearInterval(clearInt);
}, (750 * num) + 100);
}
function spawnMonster() {
Monsters[monsID] = enemy1.duplicateMovieClip("m" + monsID, 400 + monsID);
Monsters[monsID]._x = spawnCell._x + 3;
Monsters[monsID]._y = spawnCell._y + 3;
Monsters[monsID].myCell = mapCode.indexOf("3");
Monsters[monsID].Me = Monsters[monsID];
Monsters[monsID].ent.gotoAndStop(mtype);
Monsters[monsID].mtype = mtype;
monsID++;
stageMonsters++;
}
Frame 76
function initEffects(btntow) {
btntow.onRollOver = function () {
btntow.filters = new Array(glow);
towinfo.gotoAndStop(this.towid);
};
btntow.onRollOut = function () {
btntow.filters = new Array();
towinfo.gotoAndStop(1);
};
btntow.onPress = function () {
if (this.allow) {
tank.goldrisk = this.cost;
tank.gotoAndStop(this.tankid);
deselect();
startPlacement();
} else {
errorMsg.gotoAndStop(1);
errorMsg.gotoAndStop(3);
}
};
}
Frame 77
function initSpawn() {
if ((waveNum % 11) == 0) {
multiplier2++;
multiplier = multiplier + 7;
errorMsg.gotoAndStop(3 + Math.floor(waveNum / 11));
}
mtype = monsTypes[waveNum - 1];
num = numMonsPW[waveNum - 1];
spawnWave();
}
function startGame() {
waveNum++;
nextMsg = "Send Next Wave!";
waveTimer = setInterval(waveTick, 1000);
initSpawn();
}
function waveTick() {
if (!gamepaused) {
wtime = wtime - 1;
}
if ((wtime == 0) && (waveNum < 55)) {
waveNum++;
wtime = waveInterval;
initSpawn();
}
if (waveNum == 55) {
bd._visible = true;
stageMonsters = 1;
allowsendx = false;
}
if (waveNum > 55) {
restartGame();
gotoAndStop (94);
}
}
Frame 78
function initialize() {
lives = 20;
started = false;
wtime = waveInterval;
waveNum = 0;
multiplier = 1;
multiplier2 = 1;
bgm = true;
sfx = true;
placing = false;
rank = 1;
itemOK = true;
gold = 0;
score = 0;
gold = 50;
draggin = false;
allowsendx = true;
}
function reset() {
clearInterval(waveTimer);
clearInterval(teb);
clearInterval(spawningInt);
clearInterval(clearInt);
i = 0;
while (i < (monsID + 1)) {
Monsters[i].poisoned = false;
Monsters[i].poicount = 10;
clearInterval(Monsters[i].poisonInt);
Monsters[i].removeMovieClip();
i++;
}
stageMonsters = 0;
spawning = false;
deselect();
ctr = (x = (y = 0));
nextMsg = "Start Game!";
Mouse.show();
monsID = 0;
item._x = -70;
item._y = -70;
bd.swapDepths(1600);
bd._x = 570;
bd._y = 410;
bd._visible = false;
bd.onPress = function () {
Mouse.hide();
draggin = true;
delete bd.onPress;
};
}
Frame 79
function createSalad(num) {
salads[num] = salad.duplicateMovieClip("sal" + num, 2000 + num);
salads[num]._x = cells[num]._x + 15;
salads[num]._y = cells[num]._y + 15;
}
function spawD() {
inter = this.getNextHighestDepth();
inter = inter + 500;
item.swapDepths(inter);
pauseM.swapDepths(inter + 7);
bs.swapDepths(inter + 8);
tank.swapDepths(inter + 6);
green.swapDepths(inter + 3);
selectionCircle.swapDepths(inter + 2);
errorMsg.swapDepths(5005);
ea.swapDepths(5001);
}
var picoATK = new Array(5, 25, 50, 100, 200);
var ahATK = new Array(10, 25, 60, 120, 150);
var dadATK = new Array(10, 25, 50, 70, 100);
var tmATK = new Array(5, 10, 20, 35, 50);
var pbATK = new Array(20, 50, 100, 200, 300);
var sfATK = new Array(10, 25, 40, 55, 70);
var DADeff = new Array("10% Stun", "12% Stun", "14% Stun", "16% Stun", "20% Stun");
var SFeff = new Array("Poison 1", "Poison 3", "Poison 7", "Poison 15", "Poison 25");
var rs = new Array(100, 300, 500, 750, 1000, 1350, 1750, 2100, 2500, 3000, 3500, 4000, 5000, 6000, 7000, 10000, 12000, 14000, 16000, 18000, 20000, 25000, 30000, 35000, 40000, 45000, 50000);
var salads = new Array();
Frame 80
function updateStatPage() {
statPage.bluPic.gotoAndStop(selectedUnit._currentframe - 4);
statPage.bluPic.lvpic.gotoAndStop(selectedUnit.myLv);
statPage.tatk = selectedUnit.attack;
statPage.tatkspd = selectedUnit.atkspeed;
statPage.meff = selectedUnit.effectsFSP;
statPage.tname = selectedUnit.towName;
if (selectedUnit.towName == "AH") {
statPage.tname = "Alien Hominid";
}
statPage.tdesc = selectedUnit.desc;
if (statPage.tname == "Pico") {
arrATK = picoATK;
thEffect = "Normal";
} else if (statPage.tname == "Alien Hominid") {
arrATK = ahATK;
thEffect = "Normal";
} else if (statPage.tname == "Dad") {
arrATK = dadATK;
thEffect = DADeff[selectedUnit.myLv];
} else if (statPage.tname == "Steve") {
arrATK = tmATK;
thEffect = "Slow";
} else if (statPage.tname == "P-bot") {
arrATK = pbATK;
thEffect = "Anti-Air";
} else if (statPage.tname == "Salad Fingers") {
arrATK = sfATK;
thEffect = SFeff[selectedUnit.myLv];
}
if (selectedUnit.myLv < 5) {
statPage.natk = arrATK[selectedUnit.myLv];
statPage.kills = selectedUnit.kills;
statPage.neff = thEffect;
} else {
statPage.natk = "GOLD";
statPage.neff = "GOLD";
}
if (selectedUnit.myLv == 5) {
statPage.btnUP._visible = false;
} else {
statPage.btnUP.cost = selectedUnit.upgradeCost;
}
statPage.btnSELL.cost = selectedUnit.sellCost;
}
Frame 81
function deselect() {
selectionCircle._x = -50;
selectionCircle._y = -50;
statPage.gotoAndStop(1);
selectedUnit = null;
}
function checkMapValidity(tobem) {
isOK = true;
if (tobem.length != 154) {
isOK = false;
}
has3 = false;
has4 = false;
cctr = 0;
while (cctr < 154) {
if ((tobem.charAt(cctr) + "") == "3") {
if (has3) {
isOK = false;
} else {
has3 = true;
}
}
if ((tobem.charAt(cctr) + "") == "4") {
if (has4) {
isOK = false;
} else {
has4 = true;
}
}
cctr++;
}
if ((!has3) || (!has4)) {
isOK = false;
}
cCell = tobem.indexOf("3");
IAmFrom = "";
times = 0;
waypoint = cCell + ",";
cont = true;
do {
times++;
hasDir = false;
if (_root.cells[cCell + 1].walkable && (IAmFrom != "DOWN")) {
if (hasDir) {
isOK = false;
cont = false;
}
hasDir = true;
offset = 1;
}
if (_root.cells[cCell - 1].walkable && (IAmFrom != "UP")) {
if (hasDir) {
isOK = false;
cont = false;
}
hasDir = true;
offset = -1;
}
if (_root.cells[cCell + 14].walkable && (IAmFrom != "RIGHT")) {
if (hasDir) {
isOK = false;
cont = false;
}
hasDir = true;
offset = 14;
}
if (_root.cells[cCell - 14].walkable && (IAmFrom != "LEFT")) {
if (hasDir) {
isOK = false;
cont = false;
}
hasDir = true;
offset = -14;
}
if (!hasDir) {
isOK = false;
cont = false;
} else {
cCell = cCell + offset;
if (offset == 1) {
IAmFrom = "UP";
} else if (offset == -1) {
IAmFrom = "DOWN";
} else if (offset == 14) {
IAmFrom = "LEFT";
} else if (offset == -14) {
IAmFrom = "RIGHT";
}
}
if (_root.cells[cCell].finish) {
times = 165;
}
waypoint = waypoint + (cCell + ",");
if (times > 154) {
cont = false;
}
} while ((!_root.cells[cCell].finish) && (cont));
return(isOK);
}
if (toMapEdit) {
gotoAndStop ("mapEdit");
}
Frame 82
var bgm02 = new Sound();
bgm02.attachSound("gameBGM");
Frame 85
var sfxSell = new Sound();
sfxSell.attachSound("SFX_sell");
Frame 86
var sfxAH = new Sound();
sfxAH.attachSound("SFX_ah2");
Frame 87
var sfxDad = new Sound();
sfxDad.attachSound("SFX_dad");
Frame 88
var sfxPbot = new Sound();
sfxPbot.attachSound("SFX_pbot");
Frame 89
var sfxSteve = new Sound();
sfxSteve.attachSound("SFX_steve");
Frame 90
ctr = 0;
var cells = new Array();
x = 0;
while (x < 11) {
y = 0;
while (y < 14) {
cells[ctr] = cell.duplicateMovieClip("c" + ctr, 100 + ctr);
cells[ctr]._x = -100;
cells[ctr]._y = -100;
cells[ctr].num = ctr;
ctr++;
y++;
}
x++;
}
function restMaps() {
btnOne.gotoAndStop(1);
btnTwo.gotoAndStop(1);
btnTri.gotoAndStop(1);
btnFor.gotoAndStop(1);
btnFiv.gotoAndStop(1);
}
function restDiffs() {
diff1.gotoAndStop(1);
diff2.gotoAndStop(1);
diff3.gotoAndStop(1);
}
function ls() {
if (checkMapValidity(tobemap2)) {
mapCode = tobemap2;
destroyMap();
play();
} else {
buzzer.start(0, 1);
}
}
stop();
mapCode = "5111111111111151222221122221322111211211215111112112112142211221121121512112111211215121121112112151211222221121512111111111215122222222222151111111111111";
btnOne.gotoAndStop(2);
btnOne.onPress = function () {
mapCode = "5111111111111151222221122221322111211211215111112112112142211221121121512112111211215121121112112151211222221121512111111111215122222222222151111111111111";
restMaps();
btnOne.gotoAndStop(2);
};
btnTwo.onPress = function () {
mapCode = "1311111111111512122221122215121211211212151212112222121512121111111215121211111122151212122221211512122211212111121111112122211222222221112111111111115141";
restMaps();
btnTwo.gotoAndStop(2);
};
btnTri.onPress = function () {
mapCode = "1111113155555512222221555555121111111111111222222222222111111111111121122222222222211211111111111112222222222221111111111111215555512222222155555141111111";
restMaps();
btnTri.gotoAndStop(2);
};
btnFor.onPress = function () {
mapCode = "1111111111111132122222222221121211111111211212122222212112121211112121121212224121211212111111212112122222222121121111111111211222222222222111111111111111";
restMaps();
btnFor.gotoAndStop(2);
};
btnFiv.onPress = function () {
mapCode = "5555555555555551111111111111511111111111113222222222222151111111111121511111111111214222222222222151111111111111511111111111115555555555555555555555555555";
restMaps();
btnFiv.gotoAndStop(2);
};
sge.onPress = function () {
play();
};
diff = "Normal";
diff1.gotoAndStop(2);
diff1.onPress = function () {
_root.diff = "Normal";
restDiffs();
diff1.gotoAndStop(2);
};
diff2.onPress = function () {
_root.diff = "Hard";
restDiffs();
diff2.gotoAndStop(2);
};
diff3.onPress = function () {
_root.diff = "Impossible";
restDiffs();
diff3.gotoAndStop(2);
};
loadStart.onPress = function () {
tobemap2 = tobemap + "";
i = 0;
while (i < ctr) {
cells[i].gotoAndStop(parseInt(tobemap2.charAt(i)));
i++;
}
var xint = setInterval(function () {
ls();
clearInterval(xint);
}, 100);
};
Frame 91
stop();
if (cleared) {
gotoAndStop (92);
} else {
stop();
e.gotoAndStop(error);
onEnterFrame = function () {
gotoAndStop (91);
};
}
Frame 92
if (_root.diff == "Normal") {
difMul = 1;
} else if (_root.diff == "Hard") {
difMul = 2;
} else if (_root.diff == "Impossible") {
difMul = 3;
} else {
difMul = 1;
}
destroyMap();
clearInterval(xint);
stop();
waveInterval = 30;
initialize();
reset();
var waveTimer;
stopAllSounds();
bgm02.start(0, 100);
var bgm03 = new Sound();
bgm03.attachSound("loseBGM");
var bgm04 = new Sound();
bgm04.attachSound("winBGM");
sh.onPress = function () {
gotoAndStop ("loser");
};
var ctr;
var x;
var y = 0;
selectedUnit = null;
ctr = 0;
_root.spawning = false;
nextMsg = "Start Game!";
stageMonsters = 0;
monsID = 0;
createMap();
gold = 70;
allowsendx = true;
var teb;
rank = 1;
restartGame();
spawD();
monsID = 0;
var Monsters = new Array();
spawnCell = cells[mapCode.indexOf("3")];
onEnterFrame = function () {
if (stageMonsters < 0) {
stageMonsters = 0;
}
if ((!_root.spawning) && (stageMonsters == 0)) {
btnSNW.gotoAndStop(1);
} else {
btnSNW.gotoAndStop(2);
}
if (!allowsendx) {
btnSNW.gotoAndStop(2);
}
if (Key.isDown(27)) {
if (placing) {
endPlacement();
}
}
if (selectedUnit != null) {
statPage.mhp = (selectedUnit.hp + " / ") + selectedUnit.mmaxHP;
selectionCircle._x = selectedUnit._x;
selectionCircle._y = selectedUnit._y;
} else {
selectionCircle._x = -50;
selectionCircle._y = -50;
}
if (draggin) {
bd._x = _xmouse - 15;
bd._y = _ymouse - 15;
}
checkAllowBuild(btntow1);
checkAllowBuild(btntow2);
checkAllowBuild(btntow3);
checkAllowBuild(btntow4);
checkAllowBuild(btntow5);
checkAllowBuild(btntow6);
enemy1.ent.gotoAndStop(monsTypes[waveNum]);
nextWave = enemy1.mname;
if (rs[rank - 1] < score) {
rank++;
badger.gotoAndStop(rank);
badger.tbG.gotoAndPlay(1);
}
};
onMouseMove = function () {
if (placing) {
tank._x = _xmouse;
tank._y = _ymouse;
}
};
var glow = (new flash.filters.GlowFilter());
glow.color = 65280;
btntow1.towid = 2;
initEffects(btntow1);
btntow2.towid = 3;
initEffects(btntow2);
btntow3.towid = 4;
initEffects(btntow3);
btntow4.towid = 5;
initEffects(btntow4);
btntow5.towid = 6;
initEffects(btntow5);
btntow6.towid = 7;
initEffects(btntow6);
item.onPress = function () {
item.ditem.play();
};
Frame 93
stop();
sc = score;
restartGame();
destroyMap();
endPlacement();
_quality = "HIGH";
selectionCircle._x = -50;
selectionCircle._y = -50;
errorMsg.gotoAndStop(1);
pauseM.gotoAndStop(1);
sc = sc + (gold * 2);
stopAllSounds();
bgm03.start(0, 10);
btngen.onPress = function () {
_root.restartGame();
_root.gotoAndStop("mainscreen");
};
delete onEnterFrame;
Frame 94
stop();
sc = score;
restartGame();
destroyMap();
endPlacement();
_quality = "HIGH";
selectionCircle._x = -50;
selectionCircle._y = -50;
errorMsg.gotoAndStop(1);
pauseM.gotoAndStop(1);
delete onEnterFrame;
sc = sc + 5000;
sc = sc + (gold * 2);
btngen.onPress = function () {
_root.restartGame();
_root.gotoAndStop("mainscreen");
};
stopAllSounds();
bgm04.start(0, 10);
Frame 95
function resetGlow() {
mebut1.filters = new Array();
mebut2.filters = new Array();
mebut3.filters = new Array();
mebut4.filters = new Array();
mebut5.filters = new Array();
}
stop();
var glow = (new flash.filters.GlowFilter());
glow.color = 65280;
mebut1.filters = new Array(glow);
onEnterFrame = function () {
cur._x = _xmouse;
cur._y = _ymouse;
e = 0;
while (e < ctr) {
if (cur.hitTest(cells[e])) {
if (mepalcer) {
cells[e].gotoAndStop(memode);
}
}
e++;
}
};
btn1.onPress = function () {
maap = mapc;
mapc = "";
if (checkMapValidity(maap)) {
i = 0;
while (i < ctr) {
cells[i].gotoAndStop(parseInt(mapc.charAt(i)));
i++;
}
} else {
buzzer.start(0, 1);
}
};
btn2.onPress = function () {
gened = "";
str = "";
i = 0;
while (i < ctr) {
str = str + cells[i]._currentframe;
i++;
}
if (checkMapValidity(str)) {
gened = str;
} else {
buzzer.start(0, 1);
}
};
btn3.onPress = function () {
i = 0;
while (i < ctr) {
cells[i].gotoAndStop(1);
i++;
}
};
btn4.onPress = function () {
_root.gotoAndStop("mainscreen");
};
ctr = 0;
var cells = new Array();
x = 0;
while (x < 11) {
y = 0;
while (y < 14) {
cells[ctr] = cell.duplicateMovieClip("c" + ctr, 100 + ctr);
cells[ctr]._x = x * 30;
cells[ctr]._y = 25 + (y * 30);
cells[ctr].num = ctr;
cells[ctr].onPress = function () {
mepalcer = true;
this.gotoAndStop(memode);
};
ctr++;
y++;
}
x++;
}
memode = 1;
onMouseUp = function () {
mepalcer = false;
};
mebut1.onPress = function () {
resetGlow();
memode = 1;
mebut1.filters = new Array(glow);
};
mebut2.onPress = function () {
resetGlow();
memode = 2;
mebut2.filters = new Array(glow);
};
mebut3.onPress = function () {
resetGlow();
memode = 3;
mebut3.filters = new Array(glow);
};
mebut4.onPress = function () {
resetGlow();
memode = 4;
mebut4.filters = new Array(glow);
};
mebut5.onPress = function () {
resetGlow();
memode = 5;
mebut5.filters = new Array(glow);
};
btn5.onPress = function () {
getURL ("http://portal.totalh.com/lvledit.htm", "_new");
};
Symbol 11 Button
on (press) {
if (NewgroundsAPI.isInstalled()) {
NewgroundsAPI.loadNewgrounds();
} else {
getURL ("http://www.newgrounds.com", "_blank");
}
}
Symbol 17 MovieClip Frame 10
gotoAndPlay (1);
Symbol 33 Button
on (press) {
if (NewgroundsAPI.isInstalled()) {
NewgroundsAPI.loadNewgrounds("collection/picoday2008");
} else {
getURL ("http://www.newgrounds.com/collection/picoday2008", "_blank");
}
}
Symbol 35 MovieClip Frame 1
stop();
Symbol 46 Button
on (press) {
nextFrame();
}
Symbol 47 MovieClip Frame 1
function startAd(ngad_url) {
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
var _local1 = 731;
var _local2 = 3;
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.isInstalled()) {
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function () {
startAd(NewgroundsAPI.getAdURL());
};
} else {
filepath = _url.split("\\");
if (filepath.length < 2) {
filepath = _url.split("/");
filepath.shift();
filepath.shift();
filepath.shift();
filepath[0] = filepath[0].split("|").join(":");
}
filepath.pop();
msg = "Hey there!\r";
msg = msg + "I couldn't help but notice you are using our snazzy \r";
msg = msg + "Pico Day preloader.\r\r";
msg = msg + "Well, it seems like there was a problem with your API\r";
msg = msg + "installation because we can't seem to find the \r";
msg = msg + (("NewgroundsAPI.as file in " + filepath.join("\\")) + newline);
msg = msg + "Make sure when you download the API from Newgrounds\r";
msg = msg + "you unzip everything into this folder.";
}
stop();
Instance of Symbol 24 MovieClip in Symbol 47 MovieClip Frame 1
onClipEvent (enterFrame) {
loaded = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
gotoAndStop(loaded);
if (loaded == 100) {
_parent.play();
}
}
Symbol 47 MovieClip Frame 9
stop();
Symbol 47 MovieClip Frame 10
_root.gotoAndStop(2);
Symbol 709 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = "uploads.ungrounded.net";
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
}
static function SendMessage(msg) {
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 72 MovieClip Frame 12
stop();
Symbol 97 Button
on (press) {
if (NewgroundsAPI.isInstalled()) {
NewgroundsAPI.loadNewgrounds("collection/pico");
} else {
getURL ("http://www.newgrounds.com", "_blank");
}
}
Symbol 112 MovieClip Frame 15
stop();
Symbol 153 Button
on (press) {
getURL ("http://www.newgrounds.com/collection/pico", "_blank");
}
Symbol 156 MovieClip Frame 1
_quality = "MEDIUM";
Symbol 156 MovieClip Frame 225
_quality = "HIGH";
_root.play();
Symbol 198 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 2
stop();
Symbol 200 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 2
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 2
stop();
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 2
stop();
Symbol 212 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 2
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 2
stop();
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 2
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 2
stop();
Symbol 233 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 7
stop();
Symbol 233 MovieClip Frame 8
stop();
Symbol 233 MovieClip Frame 9
stop();
Symbol 233 MovieClip Frame 10
stop();
Symbol 233 MovieClip Frame 11
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 2
stop();
Symbol 243 MovieClip Frame 3
stop();
Symbol 243 MovieClip Frame 4
stop();
Symbol 243 MovieClip Frame 5
stop();
Symbol 244 MovieClip Frame 1
function shoot() {
if (!_root.gamepaused) {
shooted = false;
pissss = false;
i = 0;
while (i < _root.monsID) {
if (!_root.Monsters[i].dead) {
if (((!shooted) || (towName == "Dad")) || (effectsFSP == "Slow")) {
if (((towName == "Pico") && (_root.Monsters[i].mtype == "Air")) && (_root.Monsters[i].hitTest(_root.ranges[num]))) {
_root.Monsters[i].hp = _root.Monsters[i].hp - attack;
if (_root.sfx) {
lev.play();
_root.sfxPico.start(0, 1);
}
if (_root.Monsters[i].hp <= 0) {
kills++;
if (_root.selectedUnit == _root.cells[num]) {
_root.statPage.kills = kills;
}
}
rotate(_root.Monsters[i], lev);
shooted = true;
}
if (_root.Monsters[i].mtype == "Ground") {
if (_root.Monsters[i].hitTest(_root.ranges[num])) {
if (_root.Monsters[i].mimmune == "Invulnerable") {
willAttack = true;
} else if (_root.Monsters[i].mimmune == "All") {
willAttack = false;
} else if (_root.Monsters[i].mimmune == towName) {
willAttack = false;
} else {
_root.Monsters[i].hp = _root.Monsters[i].hp - attack;
if (_root.Monsters[i].hp <= 0) {
if (_root.selectedUnit == _root.cells[num]) {
_root.statPage.kills = kills;
}
}
shooted = true;
willAttack = true;
kills++;
lev.play();
}
if (willAttack && (_root.sfx)) {
if (towName == "Pico") {
_root.sfxPico.start(0, 1);
} else if (towName == "AH") {
_root.sfxAH.start(0, 1);
}
}
if ((towName != "Dad") && (willAttack)) {
rotate(_root.Monsters[i], lev);
}
if ((effectsFSP == "Slow") && (willAttack)) {
if (!pissss) {
pissss = true;
lev.play();
if (_root.sfx) {
_root.sfxSteve.start(0, 1);
}
}
_root.Monsters[i].slowMe();
} else if ((towName == "Dad") && (willAttack)) {
lev.play();
if (random(100) < stunChance) {
_root.Monsters[i].stunMe();
}
}
}
}
}
}
i++;
}
}
}
function airshoot() {
if (!_root.gamepaused) {
shooted = false;
i = 0;
while (i < _root.monsID) {
if (!_root.Monsters[i].dead) {
if (!shooted) {
if (_root.Monsters[i].mtype == "Air") {
if (_root.Monsters[i].hitTest(_root.ranges[num])) {
lev.play();
if (_root.sfx) {
_root.sfxPbot.start(0, 1);
}
_root.Monsters[i].hp = _root.Monsters[i].hp - attack;
shooted = true;
rotate(_root.Monsters[i], lev);
}
}
}
}
i++;
}
}
}
function rotate(k, l) {
Xd = (k._x + 15) - (l._x + _root.cells[num]._x);
Yd = (k._y + 15) - (l._y + _root.cells[num]._y);
radAngle = Math.atan2(Yd, Xd);
l._rotation = ((radAngle * 360) / (Math.PI*2)) + 90;
}
stop();
walkable = false;
buildable = true;
tower = false;
towName = "";
mygood.gotoAndStop(random(11) + 1);
Symbol 244 MovieClip Frame 2
stop();
walkable = true;
buildable = false;
tower = false;
Symbol 244 MovieClip Frame 3
stop();
walkable = false;
buildable = false;
tower = false;
Symbol 244 MovieClip Frame 4
stop();
walkable = true;
finish = true;
buildable = false;
tower = false;
Symbol 244 MovieClip Frame 5
stop();
walkable = false;
buildable = false;
tower = false;
medgo2.gotoAndStop(random(5) + 1);
Symbol 252 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 2
stop();
Symbol 252 MovieClip Frame 3
stop();
Symbol 252 MovieClip Frame 4
stop();
Symbol 256 MovieClip Frame 1
stop();
tankid = 1;
allow = true;
cost = 5;
Symbol 256 MovieClip Frame 2
stop();
allow = false;
Symbol 259 MovieClip Frame 1
stop();
tankid = 2;
allow = true;
cost = 25;
Symbol 259 MovieClip Frame 2
stop();
allow = false;
Symbol 262 MovieClip Frame 1
stop();
tankid = 3;
allow = true;
cost = 30;
Symbol 262 MovieClip Frame 2
stop();
allow = false;
Symbol 265 MovieClip Frame 1
stop();
tankid = 4;
allow = true;
cost = 50;
Symbol 265 MovieClip Frame 2
stop();
allow = false;
Symbol 268 MovieClip Frame 1
stop();
tankid = 5;
allow = true;
cost = 50;
Symbol 268 MovieClip Frame 2
stop();
allow = false;
Symbol 273 MovieClip Frame 1
stop();
tankid = 3;
allow = true;
cost = 30;
Symbol 273 MovieClip Frame 2
stop();
allow = false;
Symbol 276 MovieClip Frame 1
stop();
tankid = 6;
allow = true;
cost = 30;
Symbol 276 MovieClip Frame 2
stop();
allow = false;
Symbol 279 MovieClip Frame 1
stop();
tankid = 3;
allow = true;
cost = 30;
Symbol 279 MovieClip Frame 2
stop();
allow = false;
Symbol 285 MovieClip Frame 1
stop();
btnSNW.onPress = function () {
_root.endPlacement();
if (!_root.started) {
_root.started = true;
_root.startGame();
} else if (!_root.spawning) {
clearInterval(_root.waveTimer);
_root.waveNum++;
_root.wtime = _root.waveInterval;
_root.initSpawn();
_root.waveTimer = setInterval(_root.waveTick, 1000);
}
};
Symbol 285 MovieClip Frame 2
stop();
Symbol 286 MovieClip Frame 1
stop();
mybtn.onPress = function () {
_root.endPlacement();
_root.pauseM.gotoAndStop(2);
};
Symbol 286 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 3
stop();
Symbol 324 MovieClip Frame 4
stop();
Symbol 324 MovieClip Frame 5
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 2
stop();
Symbol 337 MovieClip Frame 3
stop();
Symbol 337 MovieClip Frame 4
stop();
Symbol 337 MovieClip Frame 5
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
stop();
Symbol 346 MovieClip Frame 3
stop();
Symbol 346 MovieClip Frame 4
stop();
Symbol 346 MovieClip Frame 5
stop();
Symbol 354 MovieClip Frame 1
stop();
Symbol 354 MovieClip Frame 2
stop();
Symbol 354 MovieClip Frame 3
stop();
Symbol 354 MovieClip Frame 4
stop();
Symbol 354 MovieClip Frame 5
stop();
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 2
stop();
Symbol 365 MovieClip Frame 3
stop();
Symbol 365 MovieClip Frame 4
stop();
Symbol 365 MovieClip Frame 5
stop();
Symbol 367 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 2
stop();
Symbol 367 MovieClip Frame 3
stop();
Symbol 367 MovieClip Frame 4
stop();
Symbol 367 MovieClip Frame 5
stop();
Symbol 368 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 2
stop();
Symbol 368 MovieClip Frame 3
stop();
Symbol 368 MovieClip Frame 4
stop();
Symbol 368 MovieClip Frame 5
stop();
Symbol 368 MovieClip Frame 6
stop();
Symbol 368 MovieClip Frame 7
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 2
stop();
Symbol 410 MovieClip Frame 3
stop();
Symbol 410 MovieClip Frame 4
stop();
Symbol 410 MovieClip Frame 5
stop();
Symbol 410 MovieClip Frame 6
stop();
Symbol 410 MovieClip Frame 7
stop();
Symbol 410 MovieClip Frame 8
stop();
Symbol 410 MovieClip Frame 9
stop();
Symbol 410 MovieClip Frame 10
stop();
Symbol 410 MovieClip Frame 11
stop();
Symbol 410 MovieClip Frame 12
stop();
Symbol 410 MovieClip Frame 13
stop();
Symbol 410 MovieClip Frame 14
stop();
Symbol 410 MovieClip Frame 15
stop();
Symbol 410 MovieClip Frame 16
stop();
Symbol 411 MovieClip Frame 1
stop();
if (goto2) {
gotoAndStop (2);
goto2 = false;
}
sgt = 0;
while (sgt < _root.ctr) {
_root.ranges[sgt]._visible = false;
sgt++;
}
Symbol 411 MovieClip Frame 2
stop();
_root.updateStatPage();
_root.ranges[_root.selectedUnit.num]._visible = true;
btnUP.onPress = function () {
if (_root.gold >= _root.selectedUnit.upgradeCost) {
_root.score = _root.score - 10;
_root.gold = _root.gold - _root.selectedUnit.upgradeCost;
bluPic.lvpic.gotoAndStop(_root.selectedUnit.myLv + 1);
_root.selectedUnit.ri.gotoAndStop(_root.selectedUnit.myLv + 1);
if (_root.selectedUnit.myLv == 5) {
btnUP._visible = false;
}
gotoAndStop (1);
goto2 = true;
} else {
_root.errorMsg.gotoAndStop(3);
}
};
btnSELL.onPress = function () {
clearInterval(_root.selectedUnit.shootTimer);
if (_root.selectedUnit.towName == "Salad Fingers") {
_root.salads[_root.selectedUnit.num].removeMovieClip();
}
_root.selectedUnit.towName = "";
_root.selectedUnit.attack = 0;
_root.selectedUnit.atkspeed = 0;
_root.selectedUnit.effectsFSP = "";
_root.selectedUnit.gotoAndStop(1);
_root.gold = _root.gold + _root.selectedUnit.sellCost;
_root.selectedUnit = null;
_root.selectionCircle._x = -50;
_root.selectionCircle._y = -50;
gotoAndStop (1);
};
Symbol 411 MovieClip Frame 3
stop();
sgt = 0;
while (sgt < _root.ctr) {
_root.ranges[sgt]._visible = false;
sgt++;
}
Symbol 437 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 2
stop();
Symbol 437 MovieClip Frame 3
stop();
Symbol 437 MovieClip Frame 4
stop();
Symbol 437 MovieClip Frame 5
stop();
Symbol 437 MovieClip Frame 6
stop();
Symbol 437 MovieClip Frame 7
stop();
Symbol 442 MovieClip Frame 1
stop();
Symbol 442 MovieClip Frame 2
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 1
stop();
_parent.myLv = 1;
myEff = "10% Stun";
myEff2 = "Poison: 1";
if (_parent.towName == "Pico") {
_parent.attack = 5;
_parent.upgradeCost = 10;
_parent.sellCost = 2;
} else if (_parent.towName == "AH") {
_parent.attack = 10;
_parent.upgradeCost = 15;
_parent.sellCost = 12;
} else if (_parent.towName == "Dad") {
_parent.effectsFSP = myEff;
_parent.stunChance = 10;
_parent.attack = 10;
_parent.upgradeCost = 20;
_parent.sellCost = 15;
} else if (_parent.towName == "Steve") {
_parent.attack = 5;
_parent.upgradeCost = 10;
_parent.sellCost = 25;
} else if (_parent.towName == "P-bot") {
_parent.attack = 20;
_parent.upgradeCost = 35;
_parent.sellCost = 25;
} else if (_parent.towName == "Salad Fingers") {
_parent.effectsFSP = myEff2;
_parent.poisonDmg = 1;
_parent.attack = 5;
_parent.upgradeCost = 20;
_parent.sellCost = 15;
}
Symbol 451 MovieClip Frame 2
stop();
_parent.myLv = 2;
myEff = "12% Stun";
myEff2 = "Poison: 2";
if (_parent.towName == "Pico") {
_parent.attack = 25;
_parent.upgradeCost = 25;
_parent.sellCost = 7;
} else if (_parent.towName == "AH") {
_parent.attack = 25;
_parent.upgradeCost = 25;
_parent.sellCost = 20;
} else if (_parent.towName == "Dad") {
_parent.effectsFSP = myEff;
_parent.stunChance = 12;
_parent.attack = 25;
_parent.upgradeCost = 30;
_parent.sellCost = 25;
} else if (_parent.towName == "Steve") {
_parent.attack = 10;
_parent.upgradeCost = 15;
_parent.sellCost = 30;
} else if (_parent.towName == "P-bot") {
_parent.attack = 50;
_parent.upgradeCost = 35;
_parent.sellCost = 42;
} else if (_parent.towName == "Salad Fingers") {
_parent.effectsFSP = myEff2;
_parent.poisonDmg = 3;
_parent.attack = 10;
_parent.upgradeCost = 25;
_parent.sellCost = 25;
}
Symbol 451 MovieClip Frame 3
stop();
_parent.myLv = 3;
myEff = "14% Stun";
myEff2 = "Poison: 3";
if (_parent.towName == "Pico") {
_parent.attack = 50;
_parent.upgradeCost = 45;
_parent.sellCost = 20;
} else if (_parent.towName == "AH") {
_parent.attack = 60;
_parent.upgradeCost = 35;
_parent.sellCost = 32;
} else if (_parent.towName == "Dad") {
_parent.effectsFSP = myEff;
_parent.stunChance = 14;
_parent.attack = 50;
_parent.upgradeCost = 50;
_parent.sellCost = 40;
} else if (_parent.towName == "Steve") {
_parent.attack = 20;
_parent.upgradeCost = 20;
_parent.sellCost = 37;
} else if (_parent.towName == "P-bot") {
_parent.attack = 100;
_parent.upgradeCost = 50;
_parent.sellCost = 60;
} else if (_parent.towName == "Salad Fingers") {
_parent.effectsFSP = myEff2;
_parent.poisonDmg = 7;
_parent.attack = 15;
_parent.upgradeCost = 30;
_parent.sellCost = 37;
}
Symbol 451 MovieClip Frame 4
stop();
_parent.myLv = 4;
myEff = "16% Stun";
myEff2 = "Poison: 4";
if (_parent.towName == "Pico") {
_parent.attack = 100;
_parent.upgradeCost = 100;
_parent.sellCost = 42;
} else if (_parent.towName == "AH") {
_parent.attack = 120;
_parent.upgradeCost = 80;
_parent.sellCost = 50;
} else if (_parent.towName == "Dad") {
_parent.effectsFSP = myEff;
_parent.stunChance = 16;
_parent.attack = 70;
_parent.upgradeCost = 50;
_parent.sellCost = 65;
} else if (_parent.towName == "Steve") {
_parent.attack = 35;
_parent.upgradeCost = 30;
_parent.sellCost = 47;
} else if (_parent.towName == "P-bot") {
_parent.attack = 200;
_parent.upgradeCost = 75;
_parent.sellCost = 85;
} else if (_parent.towName == "Salad Fingers") {
_parent.effectsFSP = myEff2;
_parent.poisonDmg = 15;
_parent.attack = 20;
_parent.upgradeCost = 45;
_parent.sellCost = 52;
}
Symbol 451 MovieClip Frame 5
stop();
_parent.myLv = 5;
myEff = "20% Stun";
myEff2 = "Poison: 5";
if (_parent.towName == "Pico") {
_parent.attack = 200;
_parent.sellCost = 92;
} else if (_parent.towName == "AH") {
_parent.attack = 150;
_parent.sellCost = 90;
} else if (_parent.towName == "Dad") {
_parent.effectsFSP = myEff;
_parent.stunChance = 20;
_parent.attack = 100;
_parent.sellCost = 90;
} else if (_parent.towName == "Steve") {
_parent.attack = 50;
_parent.sellCost = 62;
} else if (_parent.towName == "P-bot") {
_parent.attack = 300;
_parent.sellCost = 122;
} else if (_parent.towName == "Salad Fingers") {
_parent.effectsFSP = myEff2;
_parent.poisonDmg = 25;
_parent.attack = 25;
_parent.sellCost = 75;
}
Symbol 454 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 2
if (_root.sfx) {
_root.sfxDad.start(0, 1);
}
Symbol 460 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 1
function shoot() {
if (!_root.gamepaused) {
shooted = false;
pissss = false;
i = 0;
while (i < _root.monsID) {
if (!_root.Monsters[i].dead) {
if (((!shooted) || (towName == "Dad")) || (effectsFSP == "Slow")) {
if (((towName == "Pico") && (_root.Monsters[i].mtype == "Air")) && (_root.Monsters[i].hitTest(_root.ranges[num]))) {
_root.Monsters[i].hp = _root.Monsters[i].hp - attack;
if (_root.sfx) {
lev.play();
_root.sfxPico.start(0, 1);
}
if (_root.Monsters[i].hp <= 0) {
kills++;
if (_root.selectedUnit == _root.cells[num]) {
_root.statPage.kills = kills;
}
}
rotate(_root.Monsters[i], lev);
shooted = true;
}
if (_root.Monsters[i].mtype == "Ground") {
if (_root.Monsters[i].hitTest(_root.ranges[num])) {
if (_root.Monsters[i].mimmune == "Invulnerable") {
willAttack = true;
} else if (_root.Monsters[i].mimmune == "All") {
willAttack = false;
} else if (_root.Monsters[i].mimmune == towName) {
willAttack = false;
} else {
_root.Monsters[i].hp = _root.Monsters[i].hp - attack;
if (_root.Monsters[i].hp <= 0) {
if (_root.selectedUnit == _root.cells[num]) {
_root.statPage.kills = kills;
}
}
shooted = true;
willAttack = true;
kills++;
lev.play();
if (towName == "Salad Fingers") {
_root.salads[num].play();
}
}
if (willAttack && (_root.sfx)) {
if (towName == "Pico") {
_root.sfxPico.start(0, 1);
} else if (towName == "AH") {
_root.sfxAH.start(0, 1);
} else if (towName == "Salad Fingers") {
_root.sfxSalad.start(0, 1);
}
}
if ((towName != "Dad") && (willAttack)) {
if (towName != "Salad Fingers") {
rotate(_root.Monsters[i], lev);
} else {
rotate2(_root.Monsters[i], _root.salads[num]);
}
}
if ((effectsFSP == "Slow") && (willAttack)) {
if (!pissss) {
pissss = true;
if (_root.sfx) {
_root.sfxSteve.start(0, 1);
}
}
_root.Monsters[i].slowMe();
} else if ((towName == "Dad") && (willAttack)) {
if (random(100) < stunChance) {
_root.Monsters[i].stunMe();
}
} else if ((towName == "Salad Fingers") && willAttack) {
_root.Monsters[i].poisonMe(poisonDmg);
}
}
}
}
}
i++;
}
}
}
function airshoot() {
if (!_root.gamepaused) {
shooted = false;
i = 0;
while (i < _root.monsID) {
if (!_root.Monsters[i].dead) {
if (!shooted) {
if (_root.Monsters[i].mtype == "Air") {
if (_root.Monsters[i].hitTest(_root.ranges[num])) {
lev.play();
if (_root.sfx) {
_root.sfxPbot.start(0, 1);
}
_root.Monsters[i].hp = _root.Monsters[i].hp - attack;
shooted = true;
rotate(_root.Monsters[i], lev);
}
}
}
}
i++;
}
}
}
function rotate(k, l) {
Xd = (k._x + 15) - (l._x + _root.cells[num]._x);
Yd = (k._y + 15) - (l._y + _root.cells[num]._y);
radAngle = Math.atan2(Yd, Xd);
l._rotation = ((radAngle * 360) / (Math.PI*2)) + 90;
}
function rotate2(k, l) {
Xd = (k._x + 15) - l._x;
Yd = (k._y + 15) - l._y;
radAngle = Math.atan2(Yd, Xd);
l._rotation = ((radAngle * 360) / (Math.PI*2)) + 90;
}
stop();
walkable = false;
buildable = true;
tower = false;
towName = "";
mygood.gotoAndStop(random(11) + 1);
Symbol 464 MovieClip Frame 2
stop();
walkable = true;
buildable = false;
tower = false;
Symbol 464 MovieClip Frame 3
stop();
walkable = false;
buildable = false;
tower = false;
Symbol 464 MovieClip Frame 4
stop();
walkable = true;
finish = true;
buildable = false;
tower = false;
Symbol 464 MovieClip Frame 5
stop();
walkable = false;
buildable = false;
tower = false;
medgo2.gotoAndStop(random(5) + 1);
Symbol 464 MovieClip Frame 6
stop();
walkable = false;
buildable = false;
tower = true;
atkspeed = 7;
effectsFSP = "Normal";
desc = "He is the master of guns and is ready for any enemy!";
var shootTimer = setInterval(shoot, 5000 / atkspeed);
Symbol 464 MovieClip Frame 7
stop();
walkable = false;
buildable = false;
tower = true;
atkspeed = 10;
effectsFSP = "Normal";
desc = "This cute alien is ready to bust some NG crooks!";
var shootTimer = setInterval(shoot, 5000 / atkspeed);
Symbol 464 MovieClip Frame 8
stop();
walkable = false;
buildable = false;
tower = true;
atkspeed = 5;
effectsFSP = ri.myEff;
desc = "Be afraid! Dad and his son is angry!";
var shootTimer = setInterval(shoot, 5000 / atkspeed);
Symbol 464 MovieClip Frame 9
stop();
walkable = false;
buildable = false;
tower = true;
atkspeed = 4;
effectsFSP = "Slow";
desc = "Get ready to be pissed by Steve!";
var shootTimer = setInterval(shoot, 5000 / atkspeed);
Symbol 464 MovieClip Frame 10
stop();
walkable = false;
buildable = false;
tower = true;
atkspeed = 10;
effectsFSP = "Anti-air";
desc = "P-bot is the defender of his homeland portal!";
var shootTimer = setInterval(airshoot, 5000 / atkspeed);
Symbol 464 MovieClip Frame 11
stop();
walkable = false;
buildable = false;
tower = true;
atkspeed = 5;
effectsFSP = ri.myEff2;
desc = "Salad fingers likes rust and poisons the enemy";
var shootTimer = setInterval(shoot, 5000 / atkspeed);
_root.createSalad(num);
Symbol 473 MovieClip Frame 12
stop();
Symbol 526 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 2
stop();
Symbol 526 MovieClip Frame 3
stop();
Symbol 526 MovieClip Frame 4
stop();
Symbol 526 MovieClip Frame 5
stop();
Symbol 526 MovieClip Frame 6
stop();
Symbol 526 MovieClip Frame 7
stop();
Symbol 526 MovieClip Frame 8
stop();
Symbol 526 MovieClip Frame 9
stop();
Symbol 526 MovieClip Frame 10
stop();
Symbol 526 MovieClip Frame 11
stop();
Symbol 526 MovieClip Frame 12
stop();
Symbol 526 MovieClip Frame 13
stop();
Symbol 526 MovieClip Frame 14
stop();
Symbol 526 MovieClip Frame 15
stop();
Symbol 526 MovieClip Frame 16
stop();
Symbol 526 MovieClip Frame 17
stop();
Symbol 526 MovieClip Frame 18
stop();
Symbol 526 MovieClip Frame 19
stop();
Symbol 526 MovieClip Frame 20
stop();
Symbol 526 MovieClip Frame 21
stop();
Symbol 526 MovieClip Frame 22
stop();
Symbol 526 MovieClip Frame 23
stop();
Symbol 526 MovieClip Frame 24
stop();
Symbol 526 MovieClip Frame 25
stop();
Symbol 526 MovieClip Frame 26
stop();
Symbol 526 MovieClip Frame 27
stop();
Symbol 529 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 1
stop();
if (!_root.bgm) {
_root.bgm02.start(0, 100);
_root.bgm = true;
}
Symbol 554 MovieClip Frame 2
stop();
_root.bgm02.stop();
_root.bgm = false;
Symbol 557 MovieClip Frame 1
stop();
_root.sfx = true;
Symbol 557 MovieClip Frame 2
stop();
_root.sfx = false;
Symbol 574 MovieClip Frame 1
stop();
_root.gamepaused = false;
Symbol 574 MovieClip Frame 2
stop();
_root.gamepaused = true;
b1.onPress = function () {
gotoAndStop (1);
};
b2.onPress = function () {
gotoAndStop (3);
};
b3.onPress = function () {
gotoAndStop (4);
};
b4.onPress = function () {
gotoAndStop (5);
};
b5.onPress = function () {
gotoAndStop (6);
};
b6.onPress = function () {
gotoAndStop (7);
};
whites.onPress = function () {
};
Symbol 574 MovieClip Frame 3
stop();
if (!_root.bgm) {
btnBGM.gotoAndStop(2);
}
if (!_root.sfx) {
btnSFX.gotoAndStop(2);
}
whites.onPress = function () {
};
btnBGM.onPress = function () {
btnBGM.play();
};
btnSFX.onPress = function () {
btnSFX.play();
};
btnOK.onPress = function () {
gotoAndStop (2);
};
btnCANCEL.onPress = function () {
if (oldBGM && (!_root.bgm)) {
_root.bgm02.start(0, 100);
}
if ((!oldBGM) && (_root.bgm)) {
_root.bgm02.stop();
}
_root.bgm = oldBGM;
_root.sfx = oldSFX;
_quality = oldQUA;
gotoAndStop (2);
};
btnQ1.onPress = function () {
_quality = "HIGH";
};
btnQ2.onPress = function () {
_quality = "MEDIUM";
};
btnQ3.onPress = function () {
_quality = "LOW";
};
oldBGM = _root.bgm;
oldSFX = _root.sfx;
oldQUA = _quality;
Symbol 574 MovieClip Frame 4
stop();
whites.onPress = function () {
gotoAndStop (2);
};
Symbol 574 MovieClip Frame 5
stop();
whites.onPress = function () {
gotoAndStop (2);
};
Symbol 574 MovieClip Frame 6
stop();
whites.onPress = function () {
};
btnYes.onPress = function () {
_root.restartGame();
gotoAndStop (1);
};
btnNo.onPress = function () {
gotoAndStop (2);
};
Symbol 574 MovieClip Frame 7
stop();
whites.onPress = function () {
};
btnYes.onPress = function () {
_root.restartGame();
_root.gotoAndStop("mainscreen");
};
btnNo.onPress = function () {
gotoAndStop (2);
};
Symbol 578 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 1
piss._visible = false;
stop();
_parent.mname = "Angry Faic";
_parent.mdesc = "This angry emoticon stars on many NG Games";
_parent.mmaxHP = (5 * _root.multiplier) * _root.difMul;
_parent.hp = _parent.mmaxHP;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 1 * _root.multiplier2;
_parent.mscore = 2 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 2;
_parent.boss = false;
Symbol 619 MovieClip Frame 2
piss._visible = false;
stop();
_parent.mname = "Strawberry Clock";
_parent.mdesc = "Famous for his 'B' submission and gained an army: Clock crew";
_parent.hp = (10 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (10 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 1 * _root.multiplier2;
_parent.mscore = 3 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 3;
_parent.boss = false;
Symbol 619 MovieClip Frame 3
piss._visible = false;
stop();
_parent.mname = "Madness Zombie";
_parent.mdesc = "These are Scary Zombies from the Madness Series by Krinkels";
_parent.hp = (15 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (15 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 2 * _root.multiplier2;
_parent.mscore = 5 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 4;
_parent.boss = false;
Symbol 619 MovieClip Frame 4
piss._visible = false;
stop();
_parent.mname = "Creepy Fliers";
_parent.mdesc = "Creepy White Bats! (These are rare!)";
_parent.hp = (40 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (40 * _root.multiplier) * _root.difMul;
_parent.mtype = "Air";
_parent.mimmune = "None";
_parent.mgold = 3 * _root.multiplier2;
_parent.mscore = 10 * (_root.multiplier * 2);
_parent.mwave = "Flying";
_parent.picid = 5;
_parent.boss = false;
Symbol 619 MovieClip Frame 5
piss._visible = false;
stop();
_parent.origSpeed = 4;
_parent.speed = 4;
_parent.mname = "Blamformers";
_parent.mdesc = "Transformers ready to be blammed! These are fast!";
_parent.hp = (25 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (25 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 3 * _root.multiplier2;
_parent.mscore = 15 * (_root.multiplier * 2);
_parent.mwave = "Speed";
_parent.picid = 6;
_parent.boss = false;
Symbol 619 MovieClip Frame 6
piss._visible = false;
stop();
_parent.mname = "Star Syndicate";
_parent.mdesc = "These are outlaws and now have its own NG page!";
_parent.hp = (35 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (35 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 4 * _root.multiplier2;
_parent.mscore = 12 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 7;
_parent.boss = false;
Symbol 619 MovieClip Frame 7
piss._visible = false;
stop();
_parent.mname = "Goth Kids";
_parent.mdesc = "Pico's rivals from their school! B3rzek3rz!";
_parent.hp = (50 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (50 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 5 * _root.multiplier2;
_parent.mscore = 20 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 8;
_parent.boss = false;
Symbol 619 MovieClip Frame 8
piss._visible = false;
stop();
_parent.mname = "Nene";
_parent.mdesc = "Pico's sweetheart! Pico towers won't hit her!";
_parent.hp = 400 * _root.difMul;
_parent.mmaxHP = 400 * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "Pico";
_parent.mgold = 30;
_parent.mscore = 300;
_parent.mwave = "Boss";
_parent.picid = 9;
_parent.boss = true;
Symbol 619 MovieClip Frame 9
piss._visible = false;
stop();
_parent.origSpeed = 5;
_parent.speed = 5;
_parent.mname = "Line Runner";
_parent.mdesc = "A very fast character!!!";
_parent.hp = 750 * _root.difMul;
_parent.mmaxHP = 750 * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 50;
_parent.mscore = 500;
_parent.mwave = "Boss (Speed)";
_parent.picid = 10;
_parent.boss = true;
Symbol 619 MovieClip Frame 10
piss._visible = false;
stop();
_parent.mname = "The Mouse Pointer";
_parent.mdesc = "Stars in a flash game where the enemies are stickmen";
_parent.hp = 1000 * _root.difMul;
_parent.mmaxHP = 1000 * _root.difMul;
_parent.mtype = "Air";
_parent.mimmune = "None";
_parent.mgold = 60;
_parent.mscore = 850;
_parent.mwave = "Boss (Flying)";
_parent.picid = 11;
_parent.boss = true;
Symbol 619 MovieClip Frame 11
piss._visible = false;
stop();
_parent.mname = "Indestrukto Tank";
_parent.mdesc = "A tank which cannot be destroyed! You know how to kill it :)";
_parent.hp = 1;
_parent.mmaxHP = 1;
_parent.mtype = "Ground";
_parent.mimmune = "Invulnerable";
_parent.mgold = 80;
_parent.mscore = 1500;
_parent.mwave = "Boss";
_parent.picid = 12;
_parent.boss = true;
setInterval(function () {
_root.score = _root.score + 3000;
_root.stageMonsters = _root.stageMonsters - 1;
_parent.Me.removeMovieClip();
}, 42500);
Symbol 619 MovieClip Frame 12
piss._visible = false;
stop();
_parent.mname = "TOM FULP";
_parent.mdesc = "The creator of newgrounds, no one wants to attack him!";
_parent.hp = 1;
_parent.mmaxHP = 1;
_parent.mtype = "Ground";
_parent.mimmune = "All";
_parent.mgold = 0;
_parent.mscore = 3000;
_parent.mwave = "GODLIKE";
_parent.picid = 13;
_parent.boss = true;
Symbol 619 MovieClip Frame 13
piss._visible = false;
stop();
_parent.mname = "UberKids";
_parent.mdesc = "The original enemies of Pico!";
_parent.hp = (60 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (60 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 5;
_parent.mscore = 25 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 14;
Symbol 619 MovieClip Frame 14
piss._visible = false;
stop();
_parent.mname = "Tankmen enemies";
_parent.mdesc = "These gays are the enemies of tankmen!";
_parent.hp = (70 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (70 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 6;
_parent.mscore = 20 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 15;
Symbol 619 MovieClip Frame 15
piss._visible = false;
stop();
_parent.origSpeed = 4;
_parent.speed = 4;
_parent.mname = "1000 Cats";
_parent.mdesc = "From the animation House of 1000 cats!";
_parent.hp = (70 * _root.multiplier) * _root.difMul;
_parent.mmaxHP = (70 * _root.multiplier) * _root.difMul;
_parent.mtype = "Ground";
_parent.mimmune = "None";
_parent.mgold = 6;
_parent.mscore = 18 * (_root.multiplier * 2);
_parent.mwave = "Normal";
_parent.picid = 16;
Symbol 637 MovieClip Frame 1
function newCell() {
if (moveDir == "DOWN") {
myCell = myCell + 1;
}
if (moveDir == "UP") {
myCell = myCell - 1;
}
if (moveDir == "RIGHT") {
myCell = myCell + 14;
}
if (moveDir == "LEFT") {
myCell = myCell - 14;
}
}
function findNext() {
if (_root.cells[myCell + 1].walkable && (IAmFrom != "DOWN")) {
targetx = _root.cells[myCell + 1]._x;
targety = _root.cells[myCell + 1]._y;
IAmFrom = "UP";
moveDir = "DOWN";
} else if (_root.cells[myCell - 1].walkable && (IAmFrom != "UP")) {
targetx = _root.cells[myCell - 1]._x;
targety = _root.cells[myCell - 1]._y;
IAmFrom = "DOWN";
moveDir = "UP";
} else if (_root.cells[myCell + 14].walkable && (IAmFrom != "RIGHT")) {
targetx = _root.cells[myCell + 14]._x;
targety = _root.cells[myCell + 14]._y;
IAmFrom = "LEFT";
moveDir = "RIGHT";
} else if (_root.cells[myCell - 14].walkable && (IAmFrom != "LEFT")) {
targetx = _root.cells[myCell - 14]._x;
targety = _root.cells[myCell - 14]._y;
IAmFrom = "RIGHT";
moveDir = "LEFT";
}
}
function slowMe() {
statSlow = true;
ent.piss._visible = true;
if (statSlow) {
clearInterval(slowInt);
}
slowInt = setInterval(function () {
ent.piss._visible = false;
statSlow = false;
clearInterval(slowInt);
}, 4000);
}
function stunMe() {
statStun = true;
stune._visible = true;
if (statStun) {
clearInterval(stunInt);
}
stunInt = setInterval(function () {
stune._visible = false;
statStun = false;
clearInterval(stunInt);
}, 3000);
}
function poisonMe(ouch) {
if ((!poisoned) && (mname != "Indestrukto Tank")) {
poisoned = true;
poicount = 0;
poisonVal = ouch;
var poisonInt = setInterval(function () {
hp = hp - poisonVal;
poicount++;
if (poicount >= 5) {
bonez._visible = false;
poisoned = false;
clearInterval(poisonInt);
}
}, 1000);
}
}
speed = 3;
origSpeed = 3;
delete onEnterFrame;
statStun = false;
var stunInt;
statSlow = false;
var slowInt;
poisoned = false;
var poisonInt;
stune._visible = false;
dead = false;
bonez._visible = false;
Symbol 637 MovieClip Frame 10
stop();
ent.gotoAndStop(mtype);
stune._visible = false;
findNext();
IAmFrom = "";
var targetx;
var targety;
onEnterFrame = function () {
if (!_root.gamepaused) {
if (poisoned) {
bonez._visible = true;
} else {
bonez._visible = false;
}
hpbar._xscale = Math.round((hp / mmaxHP) * 100);
if (hp <= 0) {
if (_root.selectedUnit == Me) {
_root.selectedUnit = null;
_root.statPage.gotoAndStop(1);
}
_root.stageMonsters = _root.stageMonsters - 1;
gotoAndPlay (11);
}
if (statStun) {
speed = 0;
} else if (statSlow) {
speed = 2;
if (mname == "Line Runner") {
speed = 3;
}
if ((mname == "Blamformers") || (mname == "1000 Cats")) {
speed = 2;
}
} else {
speed = origSpeed;
}
if (moveDir == "DOWN") {
Me._y = Me._y + speed;
if (Me._y >= targety) {
Me._y = targety;
newCell();
findNext();
}
}
if (moveDir == "UP") {
Me._y = Me._y - speed;
if (Me._y <= targety) {
Me._y = targety;
newCell();
findNext();
}
}
if (moveDir == "RIGHT") {
Me._x = Me._x + speed;
if (Me._x >= targetx) {
Me._x = targetx;
newCell();
findNext();
}
}
if (moveDir == "LEFT") {
Me._x = Me._x - speed;
if (Me._x <= targetx) {
Me._x = targetx;
newCell();
findNext();
}
}
if (_root.cells[myCell].finish) {
_root.stageMonsters = _root.stageMonsters - 1;
if (boss) {
_root.lives = _root.lives - 3;
} else {
_root.lives = _root.lives - 1;
}
if (mname == "TOM FULP") {
_root.gotoAndStop("loser");
}
if (_root.lives <= 0) {
_root.gotoAndStop("loser");
}
if (_root.selectedUnit == Me) {
_root.selectedUnit = null;
_root.statPage.gotoAndStop(1);
}
Me.removeMovieClip();
}
}
};
rush = false;
ent.onRollOver = function () {
if ((mname == "TOM FULP") && (_root.draggin)) {
origSpeed = 10;
speed = 10;
rush = true;
if (!rush) {
var rTkm = setInterval(function () {
rush = false;
origSpeed = 3;
speed = 3;
clearInterval(rTkm);
}, 3000);
}
}
};
ent.onPress = function () {
if ((mname == "TOM FULP") && (_root.draggin)) {
_root.score = _root.score + 3000;
_root.gotoAndStop(94);
Me.removeMovieClip();
} else {
_root.statPage.gotoAndStop(3);
_root.statPage.mname = mname;
_root.statPage.mhp = (hp + " / ") + mmaxHP;
_root.statPage.mdesc = mdesc;
_root.statPage.mtype = mtype;
_root.statPage.mimmune = mimmune;
_root.statPage.mgold = mgold;
_root.statPage.mscore = mscore;
_root.statPage.mwave = mwave;
_root.statPage.redPic.gotoAndStop(picid);
_root.selectedUnit = Me;
}
};
Symbol 637 MovieClip Frame 11
delete onEnterFrame;
speed = 0;
poisoned = false;
statStun = false;
statSlow = false;
_root.gold = _root.gold + parseInt(mgold);
_root.score = _root.score + parseInt(mscore);
dead = true;
if (_root.itemOK) {
if (random(100) < 7) {
_root.item._x = Me._x;
_root.item._y = Me._y;
if (random(100) < 25) {
_root.itemOK = false;
_root.item.gotoAndStop(2);
} else {
_root.itemOK = false;
_root.item.gotoAndStop(1);
}
}
}
Symbol 637 MovieClip Frame 20
Me.removeMovieClip();
stop();
Symbol 637 MovieClip Frame 21
gotoAndPlay (1);
Symbol 639 MovieClip Frame 1
stop();
tankid = 1;
Symbol 639 MovieClip Frame 2
stop();
tankid = 2;
Symbol 639 MovieClip Frame 3
stop();
tankid = 3;
Symbol 639 MovieClip Frame 4
stop();
tankid = 4;
Symbol 639 MovieClip Frame 5
stop();
tankid = 5;
Symbol 639 MovieClip Frame 6
stop();
tankid = 6;
Symbol 647 MovieClip Frame 1
stop();
Symbol 647 MovieClip Frame 2
stop();
Symbol 647 MovieClip Frame 3
stop();
Symbol 647 MovieClip Frame 4
stop();
Symbol 651 MovieClip Frame 31
_parent.gotoAndStop(1);
Symbol 653 MovieClip Frame 31
_parent.gotoAndStop(1);
Symbol 655 MovieClip Frame 60
_parent.gotoAndStop(1);
Symbol 657 MovieClip Frame 60
_parent.gotoAndStop(1);
Symbol 659 MovieClip Frame 60
_parent.gotoAndStop(1);
Symbol 661 MovieClip Frame 80
_parent.gotoAndStop(1);
Symbol 663 MovieClip Frame 80
_parent.gotoAndStop(1);
Symbol 664 MovieClip Frame 1
stop();
Symbol 664 MovieClip Frame 2
stop();
if (_root.sfx) {
_root.buzzer.start(0, 1);
}
Symbol 664 MovieClip Frame 3
stop();
if (_root.sfx) {
_root.buzzer.start(0, 1);
}
Symbol 664 MovieClip Frame 4
stop();
Symbol 664 MovieClip Frame 5
stop();
Symbol 664 MovieClip Frame 6
stop();
Symbol 664 MovieClip Frame 7
stop();
Symbol 664 MovieClip Frame 8
stop();
Symbol 673 MovieClip Frame 1
stop();
Symbol 673 MovieClip Frame 2
_root.gold = _root.gold + 10;
Symbol 673 MovieClip Frame 11
stop();
_parent.gotoAndStop(3);
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 2
_root.lives++;
Symbol 675 MovieClip Frame 12
stop();
_parent.gotoAndStop(3);
Symbol 676 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 2
stop();
Symbol 676 MovieClip Frame 3
stop();
_root.itemOK = true;