STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/27883617?noj=FRM27883617-22DC" width="1" height="1"></div>

Space Invasion Tower Defense 2 - 10 level tower Defense game.swf

This is the info page for
Flash #90999

(Click the ID number above for more basic data on this flash file.)


Text
PLAY

PLAY

PLAY

First off, the usual commands. M to mute, N to unmute.
P to pause and U to unpause. Don't complain that these
commands don't exist, because they do.

In this game you must protect your path using 12 unique
towers to kill the creeps before they reach the end of the
path. To build a tower, click on the tower panel and then
click on the map where you want to build a tower.
Some of the towers will require you to go up in tech
level  in order to build. The ultimate tower requires 1 gem
each to be built. Tech level and gems can be obtained via
the skills shop. After beating each level, you will obtain
skill points to spend at the skills shop. The skills shop
is located above the level selet panel with a sign like this:

Programming/design - Flashgamesnexus.com
Artwork- Rushvision, heavycat
Music - Symphony of Spectres

K

O

K

O

In the course of their galactic expansion, humanity has come across
an intelligent alien race that is determined to stop the spread of
humanity across the galaxy. They see the human outposts at various
positions as the greatest threat to other sentient species in the galaxy
and so have sent squadrons of fighters to destroy these outposts.
These outposts are critical to humanity's expansion, you must defend
them at all costs to ensure humanity's dominance throughout the
galaxy. The future of the human race depends on your success.
Your gold and gems to build towers are at the bottom right. Many towers
require skills points in tech levels to build.
The first few levels are easy. Game starts to get challenging on level 4.

Level 1

Level 2

Level 3

Level 4

Level 5

The challenge level has infinite
levels. This is the only map with
global highscores.  Unlocks
after level 5.

bEST Score:

Best Score:

Skills points earned:

Max:

Level 6

Level 7

Level 8

Level 9

Level 10

Challenge

M = mute
N = unmute
P = pause
U = unpause

Space to De-select

XP Left:

Attack sKILL:

/5

Range Skill:

/5

Start money Skill:

Creep kill money:

+5% ATTACK PER LEVEL

+5% RANGE PER LEVEL

More money to start

/5

+5% more Gold per lEVEL

Gems:

/5

For ultimate towers

Tech Level:

fOR aDVANCED tOWERS

NEXT WAVE

NEXT WAVE

W

Upgrade [**]

$50

$150

$400

$500

$650

$700

$20000

$1000

NOW

NEXT

TIME :

GOLD :

LIVES :

WAVE :

/

60

HP:

SPEED:

Gems:

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

Go back to main menu?

Yes

o

N

game over

<p align="left"></p>

Score:

More tower defense games:

You WIN

Score:

<p align="left"></p>

XP:

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

Congradulations! You have defeated all the
alien hordes and allowed the the human fleet
to lay waste to their homeworld. The aliens
have now been conquered and are being
farmed for meat back on earth and across
the human colonies. With no one to stop
humanity's spreadthrough the galaxy, all
inhabitable planets shall soon be turned
into industrial wastelands like Earth. Soon
there will be no paradise in the entire
galaxy. Have a nice day.

60

<p align="left"><font face="Arial" size="12" color="#5083d1" letterSpacing="0.000000" kerning="1">Score:</font></p>

<p align="left"></p>

<p align="left"></p>

ActionScript [AS1/AS2]

Frame 1
mochi.as2.MochiServices.connect("5647d8cb9668d8a9"); stop(); var CPMStarPoolID = 1649; var CPMStarSubPoolID = 120; System.security.allowDomain("server.cpmstar.com"); adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
Instance of Symbol 32 MovieClip in Frame 1
onClipEvent (enterFrame) { if (_root.loading.loadingComplete == true) { this._visible = true; } else { this._visible = false; } } on (press) { _root.adBox.swapDepths(9999); _root.adBox.removeMovieClip(); _root.gotoAndPlay("theintro"); }
Frame 2
stop();
Frame 3
stopAllSounds(); stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
_root.challengescore.swapDepths(9988); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.challengescore.removeMovieClip(); stop();
Frame 7
stop(); storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.xpleft == undefined) { _global.xpleft = 0; } else { _global.xpleft = storedskills.data.xpleft; } if (storedskills.data.attackskill == undefined) { _global.attackskill = 0; } else { _global.attackskill = storedskills.data.attackskill; } if (storedskills.data.rangeskill == undefined) { _global.rangeskill = 0; } else { _global.rangeskill = storedskills.data.rangeskill; } if (storedskills.data.startmoneylevel == undefined) { _global.startmoneylevel = 0; } else { _global.startmoneylevel = storedskills.data.startmoneylevel; } if (storedskills.data.killbounty == undefined) { _global.killbounty = 0; } else { _global.killbounty = storedskills.data.killbounty; } if (storedskills.data.gems == undefined) { _global.gems = 0; } else { _global.gems = storedskills.data.gems; } if (storedskills.data.techlevel == undefined) { _global.techlevel = 0; } else { _global.techlevel = storedskills.data.techlevel; } if (storedskills.data.maxlevelbeat == undefined) { _root.maxlevelbeat = 0; } else { _root.maxlevelbeat = storedskills.data.maxlevelbeat; } if (storedskills.data.level1gain == undefined) { _root.level1gain = 0; } else { _root.level1gain = storedskills.data.level1gain; } if (storedskills.data.level1score == undefined) { _root.level1score = 0; } else { _root.level1score = storedskills.data.level1score; } if (storedskills.data.level2gain == undefined) { _root.level2gain = 0; } else { _root.level2gain = storedskills.data.level2gain; } if (storedskills.data.level2score == undefined) { _root.level2score = 0; } else { _root.level2score = storedskills.data.level2score; } if (storedskills.data.level3gain == undefined) { _root.level3gain = 0; } else { _root.level3gain = storedskills.data.level3gain; } if (storedskills.data.level3score == undefined) { _root.level3score = 0; } else { _root.level3score = storedskills.data.level3score; } if (storedskills.data.level4gain == undefined) { _root.level4gain = 0; } else { _root.level4gain = storedskills.data.level4gain; } if (storedskills.data.level4score == undefined) { _root.level4score = 0; } else { _root.level4score = storedskills.data.level4score; } if (storedskills.data.level5gain == undefined) { _root.level5gain = 0; } else { _root.level5gain = storedskills.data.level5gain; } if (storedskills.data.level5score == undefined) { _root.level5score = 0; } else { _root.level5score = storedskills.data.level5score; } if (storedskills.data.level6gain == undefined) { _root.level6gain = 0; } else { _root.level6gain = storedskills.data.level6gain; } if (storedskills.data.level6score == undefined) { _root.level6score = 0; } else { _root.level6score = storedskills.data.level6score; } if (storedskills.data.level7gain == undefined) { _root.level7gain = 0; } else { _root.level7gain = storedskills.data.level7gain; } if (storedskills.data.level7score == undefined) { _root.level7score = 0; } else { _root.level7score = storedskills.data.level7score; } if (storedskills.data.level8gain == undefined) { _root.level8gain = 0; } else { _root.level8gain = storedskills.data.level8gain; } if (storedskills.data.level8score == undefined) { _root.level8score = 0; } else { _root.level8score = storedskills.data.level8score; } if (storedskills.data.level9gain == undefined) { _root.level9gain = 0; } else { _root.level9gain = storedskills.data.level9gain; } if (storedskills.data.level9score == undefined) { _root.level9score = 0; } else { _root.level9score = storedskills.data.level9score; } if (storedskills.data.level10gain == undefined) { _root.level10gain = 0; } else { _root.level10gain = storedskills.data.level10gain; } if (storedskills.data.level10score == undefined) { _root.level10score = 0; } else { _root.level10score = storedskills.data.level10score; } if (storedskills.data.level11score == undefined) { _root.level11score = 0; } else { _root.level11score = storedskills.data.level11score; }
Instance of Symbol 109 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level1gain; _root.lvlscore = _root.level1score; _root.lvlmax = 2; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); _root.gotoAndPlay("level1"); }
Instance of Symbol 113 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level2gain; _root.lvlscore = _root.level2score; _root.lvlmax = 2; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9091); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 1) { _root.gotoAndPlay("level2"); } }
Instance of Symbol 117 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level3gain; _root.lvlscore = _root.level3score; _root.lvlmax = 3; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9092); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 2) { _root.gotoAndPlay("level3"); } }
Instance of Symbol 122 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level4gain; _root.lvlscore = _root.level4score; _root.lvlmax = 3; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9093); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 3) { _root.gotoAndPlay("level4"); } }
Instance of Symbol 126 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level5gain; _root.lvlscore = _root.level5score; _root.lvlmax = 3; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9094); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 4) { _root.gotoAndPlay("level5"); } }
Instance of Symbol 140 MovieClip "skillstats" in Frame 7
onClipEvent (load) { this.swapDepths(9999); this._visible = false; }
Instance of Symbol 144 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level6gain; _root.lvlscore = _root.level6score; _root.lvlmax = 3; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9095); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 5) { _root.gotoAndPlay("level6"); } }
Instance of Symbol 148 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level7gain; _root.lvlscore = _root.level7score; _root.lvlmax = 3; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9096); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 6) { _root.gotoAndPlay("level7"); } }
Instance of Symbol 152 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level8gain; _root.lvlscore = _root.level8score; _root.lvlmax = 3; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9097); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 7) { _root.gotoAndPlay("level8"); } }
Instance of Symbol 156 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level9gain; _root.lvlscore = _root.level9score; _root.lvlmax = 4; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9098); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 8) { _root.gotoAndPlay("level9"); } }
Instance of Symbol 160 MovieClip in Frame 7
on (rollOver) { _root.skillstats._x = this._x; _root.skillstats._y = this._y; _root.skillstats._visible = true; _root.lvlgain = _root.level10gain; _root.lvlscore = _root.level10score; _root.lvlmax = 4; } on (rollOut) { _root.lvlgain = ""; _root.lvlscore = ""; _root.lvlmax = ""; _root.skillstats._x = 1000; _root.skillstats._y = 1000; } on (press) { _root.skillstats.swapDepths(9099); _root.skillstats.removeMovieClip(); _root.challengescore.removeMovieClip(); if (_root.maxlevelbeat >= 9) { _root.gotoAndPlay("level10"); } }
Instance of Symbol 164 MovieClip in Frame 7
on (rollOver) { _root.lvlscore = _root.level11score; _root.challengescore._x = this._x; _root.challengescore._y = this._y; _root.challengescore.swapDepths(9988); _root.challengescore._visible = true; _root.lvl11score = _root.level11score; } on (rollOut) { _root.lvl11score = ""; _root.challengescore._x = 2000; _root.challengescore._y = 2000; } on (press) { _root.challengescore.swapDepths(9988); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.challengescore.removeMovieClip(); _root.skillstats.removeMovieClip(); if (_root.maxlevelbeat >= 9) { _root.gotoAndPlay("level11"); } }
Frame 8
_root.challengescore.swapDepths(9988); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.challengescore.removeMovieClip(); storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.xpleft == undefined) { _global.xpleft = 0; } else { _global.xpleft = storedskills.data.xpleft; } _root.xpleft = _global.xpleft; if (storedskills.data.attackskill == undefined) { _global.attackskill = 0; } else { _global.attackskill = storedskills.data.attackskill; } _root.attackskill = _global.attackskill; if (storedskills.data.rangeskill == undefined) { _global.rangeskill = 0; } else { _global.rangeskill = storedskills.data.rangeskill; } _root.rangeskill = _global.rangeskill; if (storedskills.data.startmoneylevel == undefined) { _global.startmoneylevel = 0; } else { _global.startmoneylevel = storedskills.data.startmoneylevel; } _root.startmoneylevel = _global.startmoneylevel; if (storedskills.data.killbounty == undefined) { _global.killbounty = 0; } else { _global.killbounty = storedskills.data.killbounty; } _root.killbounty = _global.killbounty; if (storedskills.data.gems == undefined) { _global.gems = 0; } else { _global.gems = storedskills.data.gems; } _root.gems = _global.gems; if (storedskills.data.techlevel == undefined) { _global.techlevel = 0; } else { _global.techlevel = storedskills.data.techlevel; } _root.techlevel = _global.techlevel;
Frame 9
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 10) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 20; _root.wavemax = _global.maxwaves; _root.waves = [[20, 81, 3.75, 667], [20, 90, 4.5, 600], [20, 103, 2.75, 400], [20, 120, 3.75, 667], [20, 141, 4.05, 600], [20, 164, 3.75, 667], [20, 192, 1.5, 266], [2, 800, 5.25, 600], [20, 263, 3, 667], [20, 308, 3.75, 667], [20, 361, 3, 667], [20, 422, 2.75, 400], [20, 494, 3, 650], [20, 577, 5, 700], [20, 676, 3.25, 550], [2, 4000, 2.75, 800], [20, 925, 3.75, 600], [20, 1082, 4, 700], [20, 1266, 4.25, 650], [20, 1481, 3.5, 580], [20, 1737, 3.25, 500], [20, 2036, 3.4, 525], [20, 2387, 2.8, 475], [20, 2799, 3, 600], [2, 13000, 3.141592, 620], [20, 3848, 3.5, 650], [20, 4512, 4, 700], [20, 5290, 3.3, 600], [20, 6203, 3.4, 590], [20, 7273, 3.12, 550], [20, 8546, 3.3, 600], [20, 10041, 3.2, 570], [2, 45000, 2.5, 800], [20, 13863, 3, 600], [20, 16290, 3.15, 577], [20, 19140, 3.2, 500], [20, 22490, 3.35, 600], [20, 26426, 3.4, 620], [20, 31050, 3.5, 630], [20, 36484, 3.75, 670], [2, 200000, 3, 700], [20, 50800, 3.2, 650], [20, 59946, 3.3, 660], [20, 70734, 3.4, 675], [20, 83466, 3.5, 690], [20, 98490, 4, 800], [20, 116218, 3, 650], [20, 137137, 3.5, 700], [2, 800000, 4, 1000], [20, 190950, 3.5, 700], [20, 229140, 3.4, 600], [20, 274968, 3.33, 590], [20, 329962, 4.5, 750], [20, 395954, 4, 700], [20, 475145, 3.4, 600], [20, 570174, 3.6, 625], [2, 3500000, 3.7, 700], [20, 821050, 3.8, 710], [20, 985261, 4, 650], [20, 1182313, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp1" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 9
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 9
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 9
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 9
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, Tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Requires Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Requires Tech level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Requires Tech level 2"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 9
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Requires Tech level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 9
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Requires Tech level 5."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 9
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 9
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 9
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 9
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 9
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 9
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 9
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 9
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 9
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 9
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 9
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 9
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 9
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 9
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 9
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 9
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 9
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 9
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 9
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 9
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 9
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { trace(_root.techlevel); if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose1"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win1"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 9
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 9
onClipEvent (load) { this._visible = false; }
Frame 10
stop(); stopAllSounds();
Frame 11
stop(); stopAllSounds(); _root.gameover = 1; if (_root.levelwin == 0) { _root.gotoAndPlay("lose1"); } if (_root.lives == 20) { _root.skillgained = 2; } else { _root.skillgained = 1; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level1gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level1gain = _root.skillgained; } else { xplast = storedskills.data.level1gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level1gain = storedskills.data.level1gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 1) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 1; } if ((storedskills.data.level1score == undefined) || (_root.score > storedskills.data.level1score)) { storedskills.data.level1score = _root.score; }
Frame 12
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 14) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); trace(staticchance); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 26; _root.wavemax = _global.maxwaves; _root.waves = [[20, 76, 3.75, 667], [20, 90, 4.5, 600], [20, 103, 2.75, 400], [20, 120, 3.75, 667], [20, 141, 4.05, 600], [20, 164, 3.75, 667], [20, 192, 1.5, 266], [2, 800, 5.25, 600], [20, 263, 3, 667], [20, 308, 3.75, 667], [20, 361, 3, 667], [20, 422, 2.75, 400], [20, 494, 3, 650], [20, 577, 5, 700], [20, 676, 3.25, 550], [2, 4000, 2.75, 800], [20, 925, 3.75, 600], [20, 1082, 4, 700], [20, 1266, 4.25, 650], [20, 1481, 3.5, 580], [20, 1737, 3.25, 500], [20, 2036, 3.4, 525], [20, 2387, 2.8, 475], [20, 2799, 3, 600], [2, 13000, 3.141592, 620], [20, 3848, 3.5, 650], [20, 4512, 4, 700], [20, 5290, 3.3, 600], [20, 6203, 3.4, 590], [20, 7273, 3.12, 550], [20, 8546, 3.3, 600], [20, 10041, 3.2, 570], [2, 45000, 2.5, 800], [20, 13863, 3, 600], [20, 16290, 3.15, 577], [20, 19140, 3.2, 500], [20, 22490, 3.35, 600], [20, 26426, 3.4, 620], [20, 31050, 3.5, 630], [20, 36484, 3.75, 670], [2, 200000, 3, 700], [20, 50800, 3.2, 650], [20, 59946, 3.3, 660], [20, 70734, 3.4, 675], [20, 83466, 3.5, 690], [20, 98490, 4, 800], [20, 116218, 3, 650], [20, 137137, 3.5, 700], [2, 800000, 4, 1000], [20, 190950, 3.5, 700], [20, 229140, 3.4, 600], [20, 274968, 3.33, 590], [20, 329962, 4.5, 750], [20, 395954, 4, 700], [20, 475145, 3.4, 600], [20, 570174, 3.6, 625], [2, 3500000, 3.7, 700], [20, 821050, 3.8, 710], [20, 985261, 4, 650], [20, 1182313, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp11" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp1" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 12
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 12
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 12
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 12
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 12
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500. Tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 12
on (press) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech Level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 12
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech Level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 12
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Tech Level 3 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 12
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech level 3 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 12
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech level 2 Required"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 12
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 12
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech Level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 12
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 12
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 12
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 12
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 12
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 12
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 12
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 12
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 12
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 12
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 12
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 12
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 12
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 12
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 12
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 12
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 12
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 12
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 12
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 12
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 12
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { trace(_root.techlevel); if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose2"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win2"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 12
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 12
onClipEvent (load) { this._visible = false; }
Frame 13
stop(); stopAllSounds();
Frame 14
stop(); stopAllSounds(); _root.gameover = 1; if (_root.levelwin == 0) { _root.gotoAndPlay("lose2"); } if (_root.lives == 20) { _root.skillgained = 2; } else { _root.skillgained = 1; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level2gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level2gain = _root.skillgained; } else { xplast = storedskills.data.level2gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level2gain = storedskills.data.level2gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 2) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 2; } if ((storedskills.data.level2score == undefined) || (_root.score > storedskills.data.level2score)) { storedskills.data.level2score = _root.score; }
Frame 15
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 12) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); trace(staticchance); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 30; _root.wavemax = _global.maxwaves; _root.waves = [[20, 93, 3.75, 667], [20, 109, 4.5, 600], [20, 128, 2.75, 400], [20, 149, 3.75, 667], [20, 176, 4.05, 600], [20, 204, 3.75, 667], [20, 239, 1.5, 266], [2, 900, 5.25, 600], [20, 328, 3, 667], [20, 384, 3.75, 667], [20, 450, 3, 667], [20, 526, 4, 250], [20, 616, 3, 650], [20, 720, 5, 700], [20, 843, 3.25, 550], [2, 4900, 2.75, 800], [20, 1154, 3.75, 600], [20, 1350, 4, 250], [20, 1580, 4.25, 650], [20, 1848, 3.5, 580], [20, 2159, 3.25, 500], [20, 2530, 3.4, 525], [20, 2967, 2.8, 475], [20, 3494, 3, 600], [2, 15600, 3.141592, 620], [20, 4783, 3.5, 200], [20, 5608, 4, 700], [20, 6575, 3.3, 600], [20, 7710, 3.4, 590], [20, 9040, 3.12, 550], [20, 10623, 3.3, 600], [20, 12481, 3.2, 570], [2, 55000, 2.5, 800], [20, 17232, 3, 600], [20, 20249, 3.15, 577], [20, 23792, 3.2, 500], [20, 27957, 3.35, 600], [20, 32849, 3.4, 620], [20, 38597, 3.5, 630], [20, 45352, 3.75, 670], [20, 53516, 3, 700], [20, 63148, 3.2, 650], [20, 74515, 3.3, 660], [20, 87928, 3.4, 675], [20, 103755, 3.5, 690], [20, 122437, 4, 800], [20, 144469, 3, 650], [20, 170473, 3.5, 700], [2, 976000, 4, 1000], [20, 238375, 3.5, 700], [20, 284841, 3.4, 600], [20, 341809, 3.33, 590], [20, 410171, 4.5, 750], [20, 492205, 4, 700], [20, 593155, 3.4, 600], [20, 708776, 3.6, 625], [2, 4300000, 3.7, 700], [20, 1020637, 3.8, 710], [20, 1224766, 4, 650], [20, 1469719, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp11" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp1" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 15
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 15
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 15
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 15
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 15
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 15
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 15
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 15
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 15
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 15
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 15
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 15
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 15
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 15
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 15
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 15
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 15
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 15
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 15
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 15
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 15
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 15
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 15
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 15
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 15
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 15
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 15
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { trace(_root.techlevel); if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose3"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win3"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 15
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 15
onClipEvent (load) { this._visible = false; }
Frame 16
stop(); stopAllSounds();
Frame 17
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose3"); } if (_root.lives == 20) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level3gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level3gain = _root.skillgained; } else { xplast = storedskills.data.level3gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level3gain = storedskills.data.level3gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 3) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 3; } if ((storedskills.data.level3score == undefined) || (_root.score > storedskills.data.level3score)) { storedskills.data.level3score = _root.score; }
Frame 18
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 12) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 38; _root.wavemax = _global.maxwaves; _root.waves = [[20, 93, 3.75, 667], [20, 109, 4.5, 600], [20, 128, 2.75, 400], [20, 149, 3.75, 667], [20, 176, 4.05, 600], [20, 204, 3.75, 667], [20, 239, 3, 266], [2, 900, 5.25, 600], [20, 328, 3, 667], [20, 384, 3.75, 667], [20, 450, 3, 667], [20, 526, 2.75, 400], [20, 616, 3, 650], [20, 720, 5, 700], [20, 843, 3.25, 550], [2, 4900, 2.75, 150], [20, 1154, 3.75, 600], [20, 1350, 4, 700], [20, 1580, 4.25, 650], [20, 1848, 3.5, 580], [20, 2159, 3.25, 170], [20, 2530, 3.4, 525], [20, 2967, 2.8, 475], [20, 3494, 3, 600], [2, 15600, 3.141592, 620], [20, 4783, 3.5, 650], [20, 5608, 4, 700], [20, 6575, 3.3, 200], [20, 7710, 3.4, 590], [20, 9040, 3.12, 550], [20, 10623, 3.3, 600], [20, 12481, 3.2, 570], [2, 55000, 2.5, 800], [20, 17232, 3, 600], [20, 20249, 3.15, 177], [20, 23792, 3.2, 500], [20, 27957, 3.35, 600], [20, 32849, 3.4, 620], [20, 38597, 3.5, 630], [20, 45352, 3.75, 670], [20, 53516, 3, 700], [20, 63148, 3.2, 650], [20, 74515, 3.3, 660], [20, 87928, 3.4, 675], [20, 103755, 3.5, 690], [20, 122437, 4, 800], [20, 144469, 3, 650], [20, 170473, 3.5, 700], [2, 976000, 4, 1000], [20, 238375, 3.5, 700], [20, 284841, 3.4, 600], [20, 341809, 3.33, 590], [20, 410171, 4.5, 750], [20, 492205, 4, 700], [20, 593155, 3.4, 600], [20, 708776, 3.6, 625], [2, 4300000, 3.7, 700], [20, 1020637, 3.8, 710], [20, 1224766, 4, 650], [20, 1469719, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp11" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp1" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 18
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 18
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 18
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 18
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 18
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 18
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 18
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 18
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 18
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 18
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 18
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 18
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 18
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 18
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 18
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 18
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 18
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 18
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 18
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 18
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 18
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 18
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 18
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 18
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 18
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 18
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 18
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { trace(_root.techlevel); if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose4"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win4"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 18
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 18
onClipEvent (load) { this._visible = false; }
Frame 19
stop(); stopAllSounds();
Frame 20
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose4"); } if (_root.lives == 20) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level4gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level4gain = _root.skillgained; } else { xplast = storedskills.data.level4gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level4gain = storedskills.data.level4gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 4) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 4; } if ((storedskills.data.level4score == undefined) || (_root.score > storedskills.data.level4score)) { storedskills.data.level4score = _root.score; }
Frame 21
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 14) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 47; _root.wavemax = _global.maxwaves; _root.waves = [[20, 93, 3.75, 667], [20, 109, 4.5, 600], [20, 128, 2.75, 400], [20, 149, 3.75, 667], [20, 176, 4.05, 600], [20, 204, 3.75, 667], [20, 239, 3, 266], [2, 900, 5.25, 600], [20, 328, 3, 667], [20, 384, 3.75, 667], [20, 450, 3, 667], [20, 526, 2.75, 400], [20, 616, 3, 250], [20, 720, 5, 700], [20, 843, 3.25, 550], [2, 4900, 2.75, 800], [20, 1154, 3.75, 250], [20, 1350, 4, 700], [20, 1580, 4.25, 650], [20, 1848, 3.5, 580], [20, 2159, 3.25, 150], [20, 2530, 3.4, 525], [20, 2967, 2.8, 475], [20, 3494, 3, 600], [2, 15600, 3.141592, 620], [20, 4783, 3.5, 650], [20, 5608, 4, 700], [20, 6575, 3.3, 600], [20, 7710, 3.4, 190], [20, 9040, 3.12, 550], [20, 10623, 3.3, 600], [20, 12481, 3.2, 570], [2, 55000, 2.5, 800], [20, 17232, 3, 600], [20, 20249, 3.15, 577], [20, 23792, 3.2, 500], [20, 27957, 3.35, 600], [20, 32849, 3.4, 220], [20, 38597, 3.5, 630], [20, 45352, 3.75, 670], [20, 53516, 3, 200], [20, 63148, 3.2, 650], [20, 74515, 3.3, 660], [20, 87928, 3.4, 675], [20, 103755, 3.5, 690], [20, 122437, 4, 800], [20, 144469, 3, 650], [20, 170473, 3.5, 700], [2, 976000, 4, 1000], [20, 238375, 3.5, 170], [20, 284841, 3.4, 600], [20, 341809, 3.33, 590], [20, 410171, 4.5, 750], [20, 492205, 4, 700], [20, 593155, 3.4, 600], [20, 708776, 3.6, 625], [2, 4300000, 3.7, 700], [20, 1020637, 3.8, 710], [20, 1224766, 4, 650], [20, 1469719, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp11" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp1" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 21
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 21
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 21
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 21
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 21
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 21
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 21
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 21
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 21
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 21
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 21
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 21
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 21
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 21
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 21
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 21
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 21
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 21
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 21
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 21
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 21
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 21
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 21
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 21
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 21
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 21
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 21
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose5"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win5"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 21
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 21
onClipEvent (load) { this._visible = false; }
Frame 22
stop(); stopAllSounds();
Frame 23
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose5"); } if (_root.lives == 20) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level5gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level5gain = _root.skillgained; } else { xplast = storedskills.data.level5gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level5gain = storedskills.data.level5gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 5) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 5; } if ((storedskills.data.level5score == undefined) || (_root.score > storedskills.data.level5score)) { storedskills.data.level5score = _root.score; }
Frame 24
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 10) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 53; _root.wavemax = _global.maxwaves; _root.waves = [[20, 93, 3.75, 667], [20, 109, 4.5, 600], [20, 128, 2.75, 400], [20, 149, 3.75, 667], [20, 176, 4.05, 600], [20, 204, 3.75, 667], [20, 239, 3, 266], [2, 900, 5.25, 600], [20, 328, 3, 667], [20, 384, 3.75, 667], [20, 450, 3, 667], [20, 526, 2.75, 400], [20, 616, 3, 250], [20, 720, 5, 700], [20, 843, 3.25, 550], [2, 4900, 2.75, 800], [20, 1154, 3.75, 250], [20, 1350, 4, 700], [20, 1580, 4.25, 650], [20, 1848, 3.5, 580], [20, 2159, 3.25, 150], [20, 2530, 3.4, 525], [20, 2967, 2.8, 475], [20, 3494, 3, 600], [2, 15600, 3.141592, 620], [20, 4783, 3.5, 650], [20, 5608, 4, 700], [20, 6575, 3.3, 600], [20, 7710, 3.4, 190], [20, 9040, 3.12, 550], [20, 10623, 3.3, 600], [20, 12481, 3.2, 570], [2, 55000, 2.5, 800], [20, 17232, 3, 600], [20, 20249, 3.15, 577], [20, 23792, 3.2, 500], [20, 27957, 3.35, 600], [20, 32849, 3.4, 220], [20, 38597, 3.5, 630], [20, 45352, 3.75, 670], [20, 53516, 3, 200], [20, 63148, 3.2, 650], [20, 74515, 3.3, 660], [20, 87928, 3.4, 675], [20, 103755, 3.5, 690], [20, 122437, 4, 800], [20, 144469, 3, 650], [20, 170473, 3.5, 700], [2, 976000, 4, 1000], [20, 238375, 3.5, 170], [20, 284841, 3.4, 600], [20, 341809, 3.33, 590], [20, 410171, 4.5, 750], [20, 492205, 4, 700], [20, 593155, 3.4, 600], [20, 708776, 3.6, 625], [2, 4300000, 3.7, 700], [20, 1020637, 3.8, 710], [20, 1224766, 4, 650], [20, 1469719, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp1" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 24
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 24
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 24
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 24
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 24
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 24
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 24
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 24
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 24
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 24
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 24
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 24
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 24
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 24
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 24
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 24
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 24
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 24
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 24
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 24
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 24
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 24
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 24
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 24
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 24
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 24
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 24
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose6"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win6"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 24
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 24
onClipEvent (load) { this._visible = false; }
Frame 25
stop(); stopAllSounds();
Frame 26
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose6"); } if (_root.lives == 20) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level6gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level6gain = _root.skillgained; } else { xplast = storedskills.data.level6gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level6gain = storedskills.data.level6gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 6) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 6; } if ((storedskills.data.level6score == undefined) || (_root.score > storedskills.data.level6score)) { storedskills.data.level6score = _root.score; }
Frame 27
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 14) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 60; _root.wavemax = _global.maxwaves; _root.waves = [[20, 110, 3.75, 667], [20, 129, 4.5, 600], [20, 151, 2.75, 400], [20, 176, 3.75, 667], [20, 207, 4.05, 600], [20, 241, 3.75, 667], [20, 282, 1.5, 266], [2, 1050, 5.25, 600], [20, 387, 3, 667], [20, 453, 3.75, 117], [20, 531, 3, 667], [20, 621, 2.75, 400], [20, 727, 3, 650], [20, 850, 5, 700], [20, 996, 3.25, 550], [2, 5800, 2.75, 800], [20, 1363, 3.75, 600], [20, 1594, 4, 700], [20, 1865, 4.25, 650], [20, 2182, 3.5, 580], [20, 2559, 3.25, 100], [20, 3000, 3.4, 525], [20, 3517, 2.8, 475], [20, 4124, 3, 600], [2, 18600, 3.141592, 620], [20, 5670, 3.5, 650], [20, 6648, 4, 700], [20, 7795, 3.3, 600], [20, 9140, 3.4, 130], [20, 10654, 3.12, 550], [20, 12593, 3.3, 600], [20, 14796, 3.2, 570], [2, 64000, 2.5, 800], [20, 20428, 3, 600], [20, 24004, 3.15, 577], [20, 28204, 3.2, 500], [20, 33141, 3.35, 600], [20, 38941, 3.4, 620], [20, 45755, 3.5, 630], [20, 53762, 3.75, 130], [20, 63439, 3, 700], [20, 74858, 3.2, 650], [20, 88333, 3.3, 660], [20, 104233, 3.4, 675], [20, 122995, 3.5, 690], [20, 145134, 4, 800], [20, 171258, 3, 650], [20, 20285, 3.5, 700], [2, 1151680, 4, 1000], [20, 281383, 3.5, 110], [20, 337660, 3.4, 600], [20, 405192, 3.33, 590], [20, 486232, 4.5, 750], [20, 583477, 4, 700], [20, 700137, 3.4, 150], [20, 840208, 3.6, 625], [2, 5100000, 3.7, 700], [20, 1209899, 3.8, 710], [20, 1451880, 4, 250], [20, 1742256, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp1" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp11" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 27
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 27
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 27
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 27
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 27
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 27
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 27
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 27
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 27
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 27
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 27
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 27
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 27
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 27
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 27
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 27
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 27
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 27
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 27
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 27
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 27
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 27
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 27
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 27
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 27
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 27
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 27
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose7"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win7"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 27
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 27
onClipEvent (load) { this._visible = false; }
Frame 28
stop(); stopAllSounds();
Frame 29
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose7"); } if (_root.lives == 20) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level7gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level7gain = _root.skillgained; } else { xplast = storedskills.data.level7gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level7gain = storedskills.data.level7gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 7) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 7; } if ((storedskills.data.level7score == undefined) || (_root.score > storedskills.data.level7score)) { storedskills.data.level7score = _root.score; }
Frame 30
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25; _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 50, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 14) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 60; _root.wavemax = _global.maxwaves; _root.waves = [[20, 110, 3.75, 667], [20, 129, 4.5, 600], [20, 151, 2.75, 400], [20, 176, 3.75, 667], [20, 207, 4.05, 600], [20, 241, 3.75, 667], [20, 282, 1.5, 266], [2, 1050, 5.25, 600], [20, 387, 3, 127], [20, 453, 3.75, 667], [20, 531, 3, 667], [20, 621, 2.75, 400], [20, 727, 3, 650], [20, 850, 5, 700], [20, 996, 3.25, 550], [2, 5800, 2.75, 800], [20, 1363, 3.75, 110], [20, 1594, 4, 700], [20, 1865, 4.25, 650], [20, 2182, 3.5, 580], [20, 2559, 3.25, 500], [20, 3000, 3.4, 525], [20, 3517, 2.8, 475], [20, 4124, 3, 600], [2, 18600, 3.141592, 620], [20, 5670, 3.5, 150], [20, 6648, 4, 700], [20, 7795, 3.3, 600], [20, 9140, 3.4, 590], [20, 10654, 3.12, 550], [20, 12593, 3.3, 600], [20, 14796, 3.2, 570], [2, 64000, 2.5, 500], [20, 20428, 3, 150], [20, 24004, 3.15, 577], [20, 28204, 3.2, 500], [20, 33141, 3.35, 600], [20, 38941, 3.4, 620], [20, 45755, 3.5, 630], [20, 53762, 3.75, 670], [20, 63439, 3, 700], [20, 74858, 3.2, 170], [20, 88333, 3.3, 660], [20, 104233, 3.4, 675], [20, 122995, 3.5, 690], [20, 145134, 4, 800], [20, 171258, 3, 650], [20, 20285, 3.5, 110], [2, 1151680, 4, 1000], [20, 281383, 3.5, 700], [20, 337660, 3.4, 600], [20, 405192, 3.33, 590], [20, 486232, 4.5, 200], [20, 583477, 4, 700], [20, 700137, 3.4, 600], [20, 840208, 3.6, 625], [2, 5100000, 3.7, 700], [20, 1209899, 3.8, 710], [20, 1451880, 4, 180], [20, 1742256, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp1" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp11" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 30
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 30
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 30
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 30
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 30
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 30
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 30
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 30
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 30
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 30
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 30
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 30
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 30
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 30
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 30
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 30
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 30
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 30
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 30
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 30
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 30
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 30
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 30
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 30
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 30
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 30
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 30
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose8"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win8"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 30
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 30
onClipEvent (load) { this._visible = false; }
Frame 31
stop(); stopAllSounds();
Frame 32
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose8"); } if (_root.lives == 20) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level8gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level8gain = _root.skillgained; } else { xplast = storedskills.data.level8gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level8gain = storedskills.data.level8gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 8) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 8; } if ((storedskills.data.level8score == undefined) || (_root.score > storedskills.data.level8score)) { storedskills.data.level8score = _root.score; }
Frame 33
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.5 + random(3); _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 200, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 14) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; if (_root.wave < _global.maxwaves) { _root.newLevel(); } } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music2"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 67; _root.wavemax = _global.maxwaves; _root.waves = [[20, 116, 3.75, 667], [20, 136, 4.5, 600], [20, 159, 2.75, 400], [20, 184, 3.75, 667], [20, 218, 4.05, 600], [20, 253, 3.75, 667], [20, 296, 1.5, 266], [2, 1102, 5.25, 600], [20, 406, 3, 667], [20, 453, 3.75, 137], [20, 476, 3, 667], [20, 652, 2.75, 400], [20, 763, 3, 650], [20, 892, 5, 700], [20, 1045, 3.25, 550], [2, 6090, 2.75, 200], [20, 1431, 3.75, 600], [20, 1673, 4, 700], [20, 1958, 4.25, 650], [20, 2291, 3.5, 580], [20, 2686, 3.25, 500], [20, 3150, 3.4, 125], [20, 3692, 2.8, 475], [20, 4330, 3, 600], [2, 19530, 3.141592, 620], [20, 5953, 3.5, 650], [20, 6980, 4, 700], [20, 8184, 3.3, 600], [20, 9597, 3.4, 590], [20, 11186, 3.12, 150], [20, 13222, 3.3, 600], [20, 15535, 3.2, 570], [2, 67200, 2.5, 800], [20, 21449, 3, 600], [20, 25204, 3.15, 577], [20, 29614, 3.2, 110], [20, 34798, 3.35, 600], [20, 38941, 3.4, 620], [20, 48042, 3.5, 630], [20, 56450, 3.75, 670], [20, 66610, 3, 700], [20, 78600, 3.2, 650], [20, 92749, 3.3, 120], [20, 109444, 3.4, 675], [20, 129144, 3.5, 690], [20, 152390, 4, 200], [20, 179820, 3, 650], [20, 212999, 3.5, 700], [2, 1209264, 4, 1000], [20, 295452, 3.5, 700], [20, 354543, 3.4, 600], [20, 425451, 3.33, 190], [20, 510543, 4.5, 750], [20, 612650, 4, 700], [20, 735143, 3.4, 600], [20, 882218, 3.6, 625], [2, 5355000, 3.7, 700], [20, 1270393, 3.8, 710], [20, 1524474, 4, 650], [20, 1829368, 5, 280]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp1" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp11" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 33
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 33
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 33
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 33
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 33
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 33
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 33
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 33
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 33
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 33
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 33
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 33
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 33
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 33
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 33
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 33
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 33
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 33
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 33
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 33
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 33
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 33
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 33
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 33
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 33
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 33
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 33
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose9"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win9"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 33
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 33
onClipEvent (load) { this._visible = false; }
Frame 34
stop(); stopAllSounds();
Frame 35
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose9"); } if (_root.lives == 20) { _root.skillgained = 4; } else if (_root.lives >= 10) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level9gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level9gain = _root.skillgained; } else { xplast = storedskills.data.level9gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level9gain = storedskills.data.level9gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 9) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 9; } if ((storedskills.data.level9score == undefined) || (_root.score > storedskills.data.level9score)) { storedskills.data.level9score = _root.score; }
Frame 36
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 1.25 + random(3); _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 250, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 18) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; if (_root.wave < _global.maxwaves) { _root.newLevel(); } } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music2"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 74; _root.wavemax = _global.maxwaves; _root.waves = [[20, 125, 3.75, 667], [20, 146, 4.5, 600], [20, 171, 2.75, 400], [20, 198, 3.75, 667], [20, 228, 4.05, 600], [20, 273, 3.75, 667], [20, 319, 1.5, 266], [2, 1190, 5.25, 600], [20, 438, 3, 667], [20, 469, 3.75, 200], [20, 514, 3, 667], [20, 704, 2.75, 400], [20, 824, 3, 650], [20, 963, 5, 700], [20, 1128, 3.25, 150], [2, 6577, 2.75, 800], [20, 1545, 3.75, 600], [20, 1806, 4, 700], [20, 2114, 4.25, 650], [20, 2474, 3.5, 180], [20, 2900, 3.25, 500], [20, 3402, 3.4, 525], [20, 3987, 2.8, 475], [20, 4676, 3, 600], [2, 21092, 3.141592, 620], [20, 6429, 3.5, 150], [20, 7538, 4, 700], [20, 8838, 3.3, 600], [20, 10364, 3.4, 590], [20, 12080, 3.12, 550], [20, 14279, 3.3, 600], [20, 16777, 3.2, 570], [2, 72576, 2.5, 800], [20, 23164, 3, 600], [20, 27220, 3.15, 177], [20, 31983, 3.2, 500], [20, 37581, 3.35, 600], [20, 42056, 3.4, 620], [20, 51896, 3.5, 630], [20, 60966, 3.75, 670], [20, 71938, 3, 700], [20, 84888, 3.2, 650], [20, 100168, 3.3, 160], [20, 118199, 3.4, 675], [20, 139475, 3.5, 690], [20, 164581, 4, 800], [20, 194205, 3, 650], [20, 230038, 3.5, 700], [2, 1306005, 4, 1000], [20, 319088, 3.5, 700], [20, 382906, 3.4, 150], [20, 459487, 3.33, 590], [20, 551386, 4.5, 750], [20, 661662, 4, 200], [20, 793954, 3.4, 600], [20, 952795, 3.6, 625], [2, 5783400, 3.7, 700], [20, 1372024, 3.8, 710], [20, 1646431, 4, 650], [20, 1975717, 5, 250]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 228 MovieClip "wp1" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp11" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp15" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp16" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp17" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp18" in Frame 36
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 236 MovieClip in Frame 36
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 36
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 36
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 36
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 36
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 36
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 36
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 36
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 36
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 36
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 36
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 36
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 36
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 36
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 36
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 36
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 36
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 36
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 36
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 36
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 36
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 36
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 36
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 36
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 36
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 36
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { if (_root.wave < _global.maxwaves) { _root.newLevel(); } _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose10"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win10"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 36
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 36
onClipEvent (load) { this._visible = false; }
Frame 37
stop(); stopAllSounds();
Frame 38
stop(); _root.gameover = 1; stopAllSounds(); if (_root.levelwin == 0) { _root.gotoAndPlay("lose10"); } if (_root.lives == 20) { _root.skillgained = 4; } else if (_root.lives >= 10) { _root.skillgained = 3; } else { _root.skillgained = 2; } storedskills = SharedObject.getLocal("flashskill"); if (storedskills.data.level10gain == undefined) { _global.xpleft = _global.xpleft + _root.skillgained; storedskills.data.xpleft = _global.xpleft; storedskills.data.level10gain = _root.skillgained; } else { xplast = storedskills.data.level10gain; skilldifferent = _root.skillgained - xplast; if (skilldifferent > 0) { _global.xpleft = _global.xpleft + skilldifferent; storedskills.data.xpleft = _global.xpleft; storedskills.data.level10gain = storedskills.data.level10gain + skilldifferent; } } if ((storedskills.data.maxlevelbeat < 10) || (storedskills.data.maxlevelbeat == undefined)) { storedskills.data.maxlevelbeat = 10; } if ((storedskills.data.level10score == undefined) || (_root.score > storedskills.data.level10score)) { storedskills.data.level10score = _root.score; }
Frame 39
stop();
Frame 40
function TowerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; } function towerInfo(tower) { _root.selectedTower = tower; _root.range._x = tower._x; _root.range._y = tower._y; _root.range._width = tower.range * 2; _root.range._height = tower.range * 2; _root.UpgradeTowerInfo._visible = true; if (tower.maxtier >= tower.tier) { _root.UpgradeTowerInfo.UpgradeInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 1][2]) + "\rRange: ") + tower.upgrades[tower.tier - 1][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 1][4]) + "\rEffect: ") + tower.desc; if (tower.tier == 1) { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rCoolDown: ") + tower.rate) + "\rEffect: ") + tower.desc; } else { _root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.upgrades[tower.tier - 2][2]) + "\rRange: ") + tower.upgrades[tower.tier - 2][3]) + "\rCoolDown: ") + tower.upgrades[tower.tier - 2][4]) + "\rEffect: ") + tower.desc; } _root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.tier - 1][1]) + "]"; _root.UpgradeTowerInfo.UpgradeButton._visible = true; sellprice = Math.floor(tower.cost * 0.85); _root.UpgradeTowerInfo.sellbutton.UpgradeButtonText.text = ("Sell [$" + sellprice) + "]"; if (tower.maxtier > tower.tier) { _root.UpgradeTowerInfo.UpgradeButton._visible = true; } else { _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; } } else { _root.UpgradeTowerInfo.f.text = ""; _root.UpgradeTowerInfo.UpgradeButton._visible = false; _root.UpgradeTowerInfo.UpgradeInfoText.text = "Maximum Level reached"; _root.UpgradeTowerInfo.h.text = ""; } } function newLevel() { if (_root.wave < 59) { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.02 * _root.gold); _root.nowspeed = _root.waves[_root.wave - 1][2]; _root.nextspeed = _root.waves[_root.wave][2]; _root.nowhp = _root.waves[_root.wave - 1][1]; _root.nexthp = _root.waves[_root.wave][1]; _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = _root.goldworth * 1.7; _root.goldworth = _root.goldworth * (1 + (0.05 * _global.killbounty)); _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.goldworth); _root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0]; } else { _root.levelnew = 1; _root.kills = 0; _root.wave++; _root.gold = Math.floor(1.03 * _root.gold); _root.goldworth = Math.pow(1.108, _root.wave); _root.goldworth = Math.floor(_root.goldworth); _root.goldworth = _root.goldworth * 1.2; _root.goldworth = Math.floor(_root.goldworth); if (_root.waves[_root.wave - 1][0] == 2) { _root.goldworth = _root.goldworth * 10; } randspeed = 2.25 + random(3); _root.nowspeed = randspeed; _root.nextspeed = "???"; wavessince = _root.wave - 60; hpmultiplier = Math.pow(1.2, wavessince); _root.nowhp = Math.floor(_root.waves[59][1] * hpmultiplier); _root.nexthp = Math.floor(_root.nowhp * 1.2); _root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", 200, _root.wave, "creep1", _root.nowspeed, _root.nowhp, _root.goldworth); _root["spawned" + _root.wave] = 30; } } function spawn(level, creep, speed, health, gold) { if (_root["spawned" + level] == 0) { clearInterval(_root["spawnInterval" + level]); } else { _root["spawned" + level]--; playanim = (level % 5) + 1; _root.creepcount++; _root[creep].duplicateMovieClip("c" + _root.creepcount, 20000 + _root.creepcount); if (_root.creepcount > 10000) { _root.creepcount = 1; } c = _root["c" + _root.creepcount]; c.creep.gotoAndStop(playanim); c._x = _root.wp1._x; c._y = _root.wp1._y; c.health = health; c.slowcount = 1; c.isslow = 0; c.maxhealth = health; c.speed = speed; c.maxspeed = c.speed; c.ispoisoned = 0; c.poisonedlevel = 0; c.poisoncount = 0; c.fullmax = c.maxspeed; c.targ = 2; c.rnd = 5; c.shocked = 0; c.shockcount = 1; c.gold = gold; c.iscorrode = 0; c.isstunned = 0; c.stuncount = 1; c.splashslowed = 0; c.splashslowedcount = 1; _root.creepArray[_root.creepArray.length] = c; c.onEnterFrame = function () { if (_root.pauses == 0) { this.health_bar.health._width = 30 * (this.health / this.maxhealth); this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd; this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd; this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this.rads = (this.dir * 3.141593) / 180; if ((this.isstunned != 0) || (this.shocked == 1)) { this.stuncount++; if ((this.stuncount % 2) == 1) { this._x = this._x + 2; } else { this._x = this._x - 2; } } if (this.stuncount > 160) { this.isstunned = 0; this.stuncount = 1; } if (this.isslow != 0) { this.speed = this.isslow * this.fullmax; this.slowcount++; } if (this.slowcount > 160) { this.speed = this.fullmax; this.isslow = 0; this.slowcount = 1; } if (this.splashslowed != 0) { this.fullmax = this.maxspeed * this.splashslowed; this.speed = this.fullmax; if (this.isslow != 0) { this.speed = this.fullmax * this.isslow; } this.splashslowedcount++; } if (this.splashslowedcount > 100) { this.splashslowed = 0; this.fullmax = this.maxspeed; this.speed = this.fullmax; this.splashslowedcount = 1; } if (this.iscorrode != 0) { this.corrodecount++; } if (this.corrodecount > 200) { this.iscorrode = 0; this.corrdecount = 1; } if (this.ispoisoned == 1) { if ((this.poisoncount % 40) == 0) { this.health = this.health - this.poisonedlevel; } this.poisoncount++; } if (this.shocked == 1) { this.shockcount++; } if (this.shockcount >= 80) { this.shocked = 0; this.shockcount = 1; } if (this.poisoncount > 200) { this.ispoisoned = 0; this.poisoncount = 0; } if ((this.isstunned == 0) && (this.shocked == 0)) { this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); } d = Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2); if (d < 25) { this.targ++; if (this.targ > 14) { _root.leak(this); this._x = _root.wp1._x; this._y = _root.wp1._y; this.targ = 2; } } this.r = this.dir; if ((this._rotation + 10) < this.r) { this._rotation = this._rotation + 10; } else if ((this._rotation - 10) > this.r) { this._rotation = this._rotation - 10; } else { this._rotation = r; } } }; } } function fire(from, to, speed, acc, maxpeed, projectile, damage, towerid) { _root.particlecount++; _root[projectile].duplicateMovieClip("p" + _root.particlecount, 2000 + _root.particlecount); r = _root["p" + _root.particlecount]; r._x = from._x; r._y = from._y; r.tier = from.tier; r.type = from.type; r.targ = to; r.speed = speed; r.acc = acc; r.maxspeed = maxspeed; r.damage = damage; r.projectile = projectile; r.towerid = towerid; if (_root.particlecount > 300) { _root.particlecount = 0; } r.onEnterFrame = function () { if (_root.pauses == 0) { if (("" + this.targ) != "") { this.targX = this.targ._x; this.targY = this.targ._y; } else { this._rotation = (Math.atan2(this.targ._y - this._y, this.targ._x - this._x) * 180) / 3.141593; if (_root.creepArray.length <= 0) { this.removeMovieClip(); } else { w = 0; if (w <= _root.creepArray.length) { this.targ = _root.creepArray[w]; } } } this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593; this._rotation = this.dir + 90; this.rads = (this.dir * 3.141593) / 180; this._x = this._x + (Math.cos(this.rads) * this.speed); this._y = this._y + (Math.sin(this.rads) * this.speed); if (this.speed < this.maxspeed) { this.speed = this.speed + this.acc; } d = ((this._x - this.targX) * (this._x - this.targX)) + ((this._y - this.targY) * (this._y - this.targY)); if (d < 25) { if (this.towerid == 10) { randcrit = random(100); if ((this.tier == 1) && (randcrit < 11)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 2) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 3) && (randcrit < 16)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 4) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } if ((this.tier == 5) && (randcrit < 21)) { this.damage = this.damage * 3; _root.triple.duplicateMovieClip("triple" + _root.triplecount, 6750 + _root.triplecount); _root["triple" + _root.triplecount]._x = this._x; _root["triple" + _root.triplecount]._y = this._y; _root.triplecount++; if (_root.triplecount > 20) { _root.triplecount = 1; } } } else if (this.towerid == 4) { this.targ.corrodecount = 1; if (this.tier == 1) { this.targ.iscorrode = 0.06; } else if (this.tier == 2) { this.targ.iscorrode = 0.12; } else if (this.tier == 3) { this.targ.iscorrode = 0.2; } else if (this.tier == 4) { this.targ.iscorrode = 0.32; } else if (this.tier == 5) { this.targ.iscorrode = 0.45; } } this.targ.health = this.targ.health - (this.damage * (1 + this.targ.iscorrode)); if (this.towerid == 7) { randstun = random(100); if ((this.tier == 1) && (randstun < 10)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 2) && (randstun < 14)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 3) && (randstun < 17)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } else if ((this.tier == 4) && (randstun < 20)) { this.targ.isstunned = 1; this.targ.stuncount = 1; } } else if (this.towerid == 5) { this.targ.ispoisoned = 1; this.targ.poisoncount = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < 4225) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[i].ispoisoned = 1; _root.creepArray[i].poisoncount = 1; } i++; } if (this.tier == 1) { this.targ.poisonedlevel = 150; } else if (this.tier == 2) { this.targ.poisonedlevel = 600; } else if (this.tier == 3) { this.targ.poisonedlevel = 2700; } else if (this.tier == 4) { this.targ.poisonedlevel = 10000; } _root.poisonball.duplicateMovieClip("poisonball" + _root.splashct, 6300 + _root.splashct); _root["poisonball" + _root.splashct]._x = this._x; _root["poisonball" + _root.splashct]._y = this._y; _root["poisonball" + _root.splashct]._width = 80; _root["poisonball" + _root.splashct]._height = 80; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 6) { if (this.targ.health < (0.35 * this.targ.maxhealth)) { randdeath = random(100); if ((this.tier == 1) && (randdeath < 8)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 2) && (randdeath < 12)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 3) && (randdeath < 16)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } else if ((this.tier == 4) && (randdeath < 20)) { this.targ.health = 0; _root.skull.duplicateMovieClip("skull" + _root.pwncount, 5750 + _root.pwncount); _root["skull" + _root.pwncount]._x = this._x; _root["skull" + _root.pwncount]._y = this._y; _root.pwncount++; if (_root.pwncount > 20) { _root.pwncount = 1; } } } } else if (this.towerid == 8) { k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < 10000) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; if (this.tier == 1) { _root.creepArray[k].splashslowed = 0.6; } else if (this.tier == 2) { _root.creepArray[k].splashslowed = 0.55; } else if (this.tier == 3) { _root.creepArray[k].splashslowed = 0.5; } else if (this.tier == 4) { _root.creepArray[k].splashslowed = 0.4; } _root.creepArray[k].splashslowedcount = 0; } k++; } _root.explodingshot.duplicateMovieClip("explodingshot" + _root.explodecount, 5100 + _root.explodecount); _root["explodingshot" + _root.explodecount]._x = this._x; _root["explodingshot" + _root.explodecount]._y = this._y; _root.explodecount++; if (_root.explodecount > 20) { _root.explodecount = 1; } } else if (this.towerid == 26) { if (this.tier == 1) { shockwidth = 75; shockchance = 8; } else if (this.tier == 2) { shockwidth = 80; shockchance = 10; } else if (this.tier == 3) { shockwidth = 85; shockchance = 12; } else if (this.tier == 4) { shockwidth = 90; shockchance = 14; } k = 0; while (k <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[k]._x, 2) + Math.pow(this._y - _root.creepArray[k]._y, 2); if (d < (shockwidth * shockwidth)) { _root.creepArray[k].health = _root.creepArray[k].health - this.damage; shockper = random(100); if (shockper < shockchance) { if (_root.creepArray[k].shocked == 0) { _root.creepArray[k].shocked = 1; _root.creepArray[k].splashslowedcount = 1; } } } k++; } _root.shockshot.duplicateMovieClip("shockshot" + _root.shockct, 26500 + _root.shockct); _root["shockshot" + _root.shockct]._x = this._x; _root["shockshot" + _root.shockct]._y = this._y; _root["shockshot" + _root.shockct]._width = 2 * shockwidth; _root["shockshot" + _root.shockct]._height = 2 * shockwidth; _root.shockct++; if (_root.shockct > 20) { _root.shockct = 1; } } else if (this.towerid == 22) { if (this.tier == 1) { staticval = 5; } else if (this.tier == 2) { staticval = 7; } else if (this.tier == 3) { staticval = 10; } staticchance = random(100); if (staticchance < staticval) { damagetaken = this.targ.maxhealth - this.targ.health; (this.health - this.health) - (0.5 * damagetaken); _root.lighteffect.duplicateMovieClip("lighteffect" + _root.staticcount, 23000 + _root.staticcount); _root["lighteffect" + _root.staticcount]._x = this._x; _root["lighteffect" + _root.staticcount]._y = this._y; _root.staticcount++; if (_root.staticcount > 50) { _root.staticcount = 1; } } } else if (this.towerid == 25) { stealval = random(100); if (this.tier == 1) { this.stealmax = 6; } else if (this.tier == 2) { this.stealmax = 9; } else if (this.tier == 3) { this.stealmax = 10; } else if (this.tier == 4) { this.stealmax = 12; } if (stealval < this.stealmax) { _root.gold = _root.gold + this.targ.gold; _root.goldeffect.duplicateMovieClip("goldeffect" + _root.goldeffectct, 26000 + _root.goldeffectct); _root["goldeffect" + _root.goldeffectct]._x = this._x; _root["goldeffect" + _root.goldeffectct]._y = this._y; _root.goldeffectct++; if (_root.goldeffectct > 20) { _root.goldeffectct = 1; } } } else if (this.towerid == 999) { if (this.targ.health < (0.65 * this.targ.maxhealth)) { randteleport = random(100); if ((this.tier == 1) && (randteleport < 8)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; _root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 2) && (randteleport < 9)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 3) && (randteleport < 10)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 4) && (randteleport < 11)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } else if ((this.tier == 5) && (randteleport < 13)) { this.targ._x = _root.wp1._x; this.targ._y = _root.wp1._y; this.targ.targ = 2; root.tele.duplicateMovieClip("tele" + _root.telecount, 5700 + _root.telecount); _root["tele" + _root.telecount]._x = this._x; _root["tele" + _root.telecount]._y = this._y; _root.telecount++; if (_root.telecount > 20) { _root.telecount = 1; } } } } else if (this.towerid == 100) { if (this.tier == 1) { spradius = 1225; spwidth = 35; } else if (this.tier == 2) { spradius = 1600; spwidth = 40; } else if (this.tier == 3) { spradius = 2025; spwidth = 45; } else if (this.tier == 4) { spradius = 2500; spwidth = 50; } else if (this.tier == 5) { spradius = 3600; spwidth = 60; } j = 0; while (j <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[j]._x, 2) + Math.pow(this._y - _root.creepArray[j]._y, 2); if (d < spradius) { if ((("" + _root.creepArray[j]) != "") && (_root.creepArray[j] != this.targ)) { _root.creepArray[j].health = _root.creepArray[j].health - (this.damage * (1 - (d / 3600))); } _root.creepArray[j].splashslowed = 1; _root.creepArray[j].splashslowedcount = 1; } j++; } _root.iceball.duplicateMovieClip("iceball" + _root.splashct, 5200 + _root.splashct); _root["iceball" + _root.splashct]._x = this._x; _root["iceball" + _root.splashct]._y = this._y; _root["iceball" + _root.splashct]._width = spwidth; _root["iceball" + _root.splashct]._height = spwidth; _root.splashct++; if (_root.splashct > 20) { _root.splashct = 1; } } else if (this.towerid == 3) { if (this.tier == 1) { this.targ.isslow = 0.6; } if (this.tier == 2) { this.targ.isslow = 0.5; } if (this.tier == 3) { this.targ.isslow = 0.4; } if (this.tier == 4) { this.targ.isslow = 0.35; } if (this.tier == 5) { this.targ.isslow = 0.3; } this.targ.slowcount = 1; } else if (this.towerid == 2) { _root.explosion.duplicateMovieClip("explosion" + _root.explosioncount, 5000 + _root.explosioncount); _root["explosion" + _root.explosioncount]._x = this._x; _root["explosion" + _root.explosioncount]._y = this._y; _root["explosion" + _root.explosioncount]._width = 100; _root["explosion" + _root.explosioncount]._height = 100; _root.explosioncount++; if (_root.explosioncount > 40) { _root.explosioncount = 1; } splashrad = 50; splashrad2 = splashrad * splashrad; i = 0; while (i <= _root.creepArray.length) { if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < splashrad2) { _root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / 6000))); } } i++; } } if (this.targ.health <= 0) { this.targ.isDead = 1; } this.removeMovieClip(); } } }; } function checkkill() { n = 0; while (n < _root.creepArray.length) { if ((_root.creepArray[n].health <= 0) || (_root.creepArray[n] == "undefined")) { _root.kills++; _root.aftereffect.duplicateMovieClip("aftereffect" + _root.effectcount, 50000 + _root.effectcount); _root["aftereffect" + _root.effectcount]._x = _root.creepArray[n]._x; _root["aftereffect" + _root.effectcount]._y = _root.creepArray[n]._y; _root.effectcount++; if (_root.effectcount > 50) { _root.effectcount = 1; } if (((_root.creepArray[n].gold != "undefined") && (_root.creepArray[n].gold != "null")) && (_root.creepArray[n].gold > 0)) { _root.gold = _root.gold + _root.creepArray[n].gold; _root.score = _root.score + _root.creepArray[n].maxhealth; } _root.creepArray[n].removeMovieClip(); _root.creepArray.splice(n, 1); } n++; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } function kill(creep) { _root.kills++; if (_root.kills >= _root.waves[_root.wave - 1][0]) { _root.kills = 0; _root.newLevel(); } creep.onEnterFrame = function () { this.removeMovieClip(); }; } function upgrade() { a = _root.selectedTower; b = a.tier - 1; if (int(a.upgrades[b][1]) <= _root.gold) { a.damage = int(a.upgrades[b][2]); a.range = a.upgrades[b][3]; a.rate = a.upgrades[b][4]; a.splash = a.upgrades[b][5]; a.slow = a.upgrades[b][6]; a.cost = a.cost + int(a.upgrades[b][1]); a.tier++; _root.towerInfo(a); _root.gold = _root.gold - int(a.upgrades[b][1]); updateInfoBar(); } } function sell() { tower = _root.selectedTower; if (((tower != "undefined") && (tower != "null")) && (tower != "")) { sellprice = Math.floor(tower.cost * 0.85); if (sellprice != "undefined") { _root.gold = _root.gold + sellprice; } _root.range._x = 1000; _root.range._height = 0; _root.range._width = 0; if (tower.maxtier == 2) { _root.gems++; } tower.removeMovieClip(); _root.UpgradeTowerInfo._visible = false; } } function leak(creep) { _root.creepLeaks++; _root.lives--; creep._x = _root.wp1._x; creep._y = _root.wp1._y; creep.targ = 1; } stop(); _root.skillstats.swapDepths(9090); _root.skillstats.removeMovieClip(); _root.challengescore._x = 2000; _root.challengescore._y = 2000; _root.levelwin = 0; _root.gold = 100; _root.gems = _global.gems; _root.attackskill = _global.attackskill; _root.rangeskill = _global.rangeskill; _root.killbounty = _global.killbounty; _root.techlevel = _global.techlevel; if (_global.startmoneylevel == 1) { _root.gold = 150; } else if (_global.startmoneylevel == 2) { _root.gold = 200; } else if (_global.startmoneylevel == 3) { _root.gold = 250; } else if (_global.startmoneylevel == 4) { _root.gold = 400; } else if (_global.startmoneylevel == 5) { _root.gold = 600; } _root.wave = 0; _root.levelnew = 1; _root.effectcount = 1; _root.staticcount = 1; _root.shockct = 1; _root.gameover = 0; _root.towerCount = 0; _root.creepcount = 1; _root.goldeffectct = 1; _root.kills = 0; _root.pauses = 0; _root.creepleaks = 0; _root.timer = 45; _root.lives = 20; _root.goldworth = 0; _root.creepArray = []; _global.sound = 1; _root.particlecount = 1; _root.splashct = 1; _root.pwncount = 1; _root.explodecount = 1; _root.score = 0; _root.playsound = new Sound(this); _root.playsound.attachSound("music2"); if (_global.sound == 1) { _root.playsound.start(0, 100000); } _root.playsound1 = new Sound(this); _root.playsound1.attachSound("sndplasma"); _root.playsound2 = new Sound(this); _root.playsound2.attachSound("sndrocket"); _root.playsound3 = new Sound(this); _root.playsound3.attachSound("sndbullet"); _root.playsound4 = new Sound(this); _root.playsound4.attachSound("sndbullet1"); _root.playsound5 = new Sound(this); _root.playsound5.attachSound("sndexplode"); _root.playsound6 = new Sound(this); _root.playsound6.attachSound("sndlaser"); _global.maxwaves = 10000; _root.wavemax = _global.maxwaves; _root.waves = [[20, 125, 3.75, 667], [20, 146, 4.5, 600], [20, 171, 2.75, 400], [20, 198, 3.75, 667], [20, 228, 4.05, 600], [20, 273, 3.75, 667], [20, 319, 1.5, 266], [2, 1190, 5.25, 600], [20, 438, 3, 667], [20, 469, 3.75, 667], [20, 514, 3, 667], [20, 704, 2.75, 400], [20, 824, 3, 650], [20, 963, 5, 700], [20, 1128, 3.25, 550], [2, 6577, 2.75, 800], [20, 1545, 3.75, 600], [20, 1806, 4, 700], [20, 2114, 4.25, 650], [20, 2474, 3.5, 580], [20, 2900, 3.25, 500], [20, 3402, 3.4, 525], [20, 3987, 2.8, 475], [20, 4676, 3, 600], [2, 21092, 3.141592, 620], [20, 6429, 3.5, 650], [20, 7538, 4, 700], [20, 8838, 3.3, 600], [20, 10364, 3.4, 590], [20, 12080, 3.12, 550], [20, 14279, 3.3, 600], [20, 16777, 3.2, 570], [2, 72576, 2.5, 800], [20, 23164, 3, 600], [20, 27220, 3.15, 577], [20, 31983, 3.2, 500], [20, 37581, 3.35, 600], [20, 42056, 3.4, 620], [20, 51896, 3.5, 630], [20, 60966, 3.75, 670], [20, 71938, 3, 700], [20, 84888, 3.2, 650], [20, 100168, 3.3, 660], [20, 118199, 3.4, 675], [20, 139475, 3.5, 690], [20, 164581, 4, 800], [20, 194205, 3, 650], [20, 230038, 3.5, 700], [2, 1306005, 4, 1000], [20, 319088, 3.5, 700], [20, 382906, 3.4, 600], [20, 459487, 3.33, 590], [20, 551386, 4.5, 750], [20, 661662, 4, 700], [20, 793954, 3.4, 600], [20, 952795, 3.6, 625], [2, 5783400, 3.7, 700], [20, 1372024, 3.8, 710], [20, 1646431, 4, 650], [20, 1975717, 5, 700]]; _root.nowhp = 0; _root.nowspeed = 0; _root.nexthp = _root.waves[0][1]; _root.nextspeed = 2.5;
Instance of Symbol 236 MovieClip in Frame 40
on (press) { _root.marker.active = 1; _root.marker.tower = "basic"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Tower. Shoots bullets at enemies. 80 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 238 MovieClip in Frame 40
on (press) { _root.marker.active = 1; _root.marker.tower = "splash"; _root.marker.cost = 50; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Basic Splash Tower. Shoots Exploding bullets at enemies. 29 base damage. Cost: $50"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 240 MovieClip in Frame 40
on (press) { _root.marker.active = 1; _root.marker.tower = "slow"; _root.marker.cost = 150; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Slow Tower. Shoots shots that slow the enemy. 100 base damage. Cost: $150"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 242 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "poison"; _root.marker.cost = 500; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Splash Poison Tower. Splashes Poison(150/sec for level 1) to hurt the enemy. 300 base damage. Cost: $500, tech level 1 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 244 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 1) { _root.marker.active = 1; _root.marker.tower = "static"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Static tower. 6% chance to make target take 50% of the damage that is has lost so far. 500 base damage. Cost: $650. Tech level 1."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 246 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "shock"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Shock tower. Has the ability to random stun any enemy within its radius. Enemies cannot be stunned if already under effect of stun. 500 base damage. Cost: $1000. Tech level 4 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 248 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "stun"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Stun Tower. Has a 10% chance of stunning enemies. 500 base damage. Cost: $700. Requires Tech level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 252 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 3) { _root.marker.active = 1; _root.marker.tower = "death"; _root.marker.cost = 650; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Instant death tower. 8% chance to instantly kill if target is under 35% HP. 500 base damage. Cost: $650. Tech Level 3."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 254 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 2) { _root.marker.active = 1; _root.marker.tower = "money"; _root.marker.cost = 700; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Money Tower. Has a 5% chance of stealing money from creeps it hits at level 1. 500 Damage. Cost: $700. Tech Level 2."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 256 MovieClip in Frame 40
on (press) { if (_root.techlevel >= 4) { _root.marker.active = 1; _root.marker.tower = "explode"; _root.marker.cost = 1000; _root.tinfo._visible = false; } } on (rollOver) { _root.buyinfo = "Exploding Tower. Damages and slows all enemies in a radius of itself. 500 base damage. Cost: $1000. Tech Level 4."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 258 MovieClip in Frame 40
on (press) { if (_root.gems > 0) { if (_root.techlevel >= 5) { _root.marker.active = 1; _root.marker.tower = "ultimate"; _root.marker.cost = 20000; _root.tinfo._visible = false; } } } on (rollOver) { _root.buyinfo = "Ultimate Tower. Extreme Damage and splash. 100000 damage. Cost: $20000 and 1 Gem. Tech level 5 required."; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 236 MovieClip "tower_basic" in Frame 40
onClipEvent (load) { title = "Basic Damage Tower"; desc = "Basic Damage Tower"; cost = 50; this.range = 65 * (1 + (0.05 * _global.rangeskill)); this.range2 = 66 * (1 + (0.05 * _global.rangeskill)); this.range3 = 67 * (1 + (0.05 * _global.rangeskill)); this.range4 = 68 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 80; damage = 80 * (1 + (0.05 * _global.attackskill)); this.damage2 = 240 * (1 + (0.05 * _global.attackskill)); this.damage3 = 720 * (1 + (0.05 * _global.attackskill)); this.damage4 = 2160 * (1 + (0.05 * _global.attackskill)); rate = 19; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 240\rRange: 66\rCooldown: 18\rEffect: None", 120, this.damage2, this.range2, 18], ["Damage: 720\rRange: 67\rCooldown: 17\rEffect: None", 300, this.damage3, this.range3, 17], ["Damage: 2160\rRange: 68\rCooldown: 17\rEffect: None", 880, this.damage4, this.range4, 17]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_basic")) { if (target == undefined) { target = 0; } lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 1); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 264 MovieClip "range" in Frame 40
onClipEvent (enterFrame) { if ((_root.selectedTower == "") && (_root.marker.active == 0)) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 267 MovieClip "marker" in Frame 40
onClipEvent (load) { active = 0; inpath = 0; this.swapDepths(9998); } onClipEvent (enterFrame) { if (active == 1) { this.startDrag(true); maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((maphit == 1) && (inpath == 0)) { this.gotoAndStop(1); _root.range.gotoAndStop(1); } else { this.gotoAndStop(2); _root.range.gotoAndStop(2); } _root.range._x = _x; _root.range._y = _y; _root.range._width = _root["tower_" + tower].range * 2; _root.range._height = _root["tower_" + tower].range * 2; } if (Key.isDown(32)) { active = 0; trace(1); _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } } on (press) { maphit = _root.background.hitTest(_x, _y, 1); inpath = 0; i = 1; while (i <= 20) { if (this.hitTest(_root["track" + i])) { inpath = 1; } if (inpath == 1) { break; } i++; } if (inpath == 0) { j = 0; while (j <= _root.towerCount) { if (this.hitTest(_root["t" + j])) { inpath = 1; } if (inpath == 1) { break; } j++; } } if ((((maphit == 1) && (inpath == 0)) && (_root.gold >= this.cost)) && (_root.pauses == 0)) { if (this.hitTest(_root.nextwave) == false) { if (_root.marker.tower == "ultimate") { if (_root.gems > 0) { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gems--; _root.gold = _root.gold - this.cost; } } else { _root.towerCount++; _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 10000 + _root.towerCount); a = _root["t" + _root.towerCount]; a._x = _x; a._y = _y; a.active = 1; _root.gold = _root.gold - this.cost; } } } if (maphit == 0) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } if (this.hitTest(_root.nextwave)) { active = 0; _x = 1000; _root.selectedTower = ""; _root.range._x = 1000; _root.range._width = 10; _root.range._height = 10; _root.UpgradeTowerInfo._visible = false; this.stopDrag(); } }
Instance of Symbol 238 MovieClip "tower_splash" in Frame 40
onClipEvent (load) { title = "Splash Tower"; desc = "Splash Tower"; cost = 50; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 73 * (1 + (0.05 * _global.rangeskill)); this.range4 = 75 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 34 * (1 + (0.05 * _global.attackskill)); this.damage2 = 102 * (1 + (0.05 * _global.attackskill)); this.damage3 = 306 * (1 + (0.05 * _global.attackskill)); this.damage4 = 918 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 102\rRange: 72\rCooldown: 21\rEffect: Splash", 120, this.damage2, this.range2, 21], ["Damage: 306\rRange: 73\rCooldown: 21\rEffect: Splash", 300, this.damage3, this.range3, 21], ["Damage: 918\rRange: 75\rCooldown: 20\rEffect: Splash", 880, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_splash")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > ((range * range) + 81)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "redbullet", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 289 MovieClip "explosion" in Frame 40
onClipEvent (load) { if (this._name == "explosion") { this._visible = false; } }
Instance of Symbol 240 MovieClip "tower_slow" in Frame 40
onClipEvent (load) { title = "Slow tower"; desc = "Slow tower"; cost = 150; this.range = 68 * (1 + (0.05 * _global.rangeskill)); this.range2 = 69 * (1 + (0.05 * _global.rangeskill)); this.range3 = 70 * (1 + (0.05 * _global.rangeskill)); this.range4 = 71 * (1 + (0.05 * _global.rangeskill)); this.range5 = 72 * (1 + (0.05 * _global.rangeskill)); damage = 100 * (1 + (0.05 * _global.attackskill)); this.damage2 = 500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2200 * (1 + (0.05 * _global.attackskill)); this.damage4 = 10500 * (1 + (0.05 * _global.attackskill)); this.damage5 = 33000 * (1 + (0.05 * _global.attackskill)); rate = 22; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 500\rRange: 69\rCooldown: 22\rEffect: Slow", 500, this.damage2, this.range2, 22], ["Damage: 2200\rRange: 70\rCooldown: 21\rEffect: Slow", 1250, this.damage3, this.range3, 21], ["Damage: 10500\rRange: 71\rCooldown: 21\rEffect: Slow", 3150, this.damage4, this.range4, 21], ["Damage: 33000\rRange: 72\rColldown:19\rEffect: Slow", 8000, this.damage5, this.range5, 19]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_slow")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "snowflake", this.damage, 3); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 314 MovieClip in Frame 40
on (press) { _root.marker.active = 1; _root.marker.tower = "rust"; _root.marker.cost = 400; _root.tinfo._visible = false; } on (rollOver) { _root.buyinfo = "Rust Tower. Shoots shots that rust the enemy, causing them to take more damage. 300 base damage. Ultra Fast. Cost: $400"; _root.tinfo._x = this._x; _root.tinfo._y = this._y; _root.tinfo._visible = true; } on (rollOut) { _root.buyinfo = ""; _root.tinfo._visible = false; }
Instance of Symbol 314 MovieClip "tower_rust" in Frame 40
onClipEvent (load) { title = "Rust Tower"; desc = "Rust Tower"; cost = 400; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range5 = 80 * (1 + (0.05 * _global.rangeskill)); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 930 * (1 + (0.05 * _global.attackskill)); this.damage3 = 2000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 5000 * (1 + (0.05 * _global.attackskill)); this.damage5 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 9; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 5; upgrades = [["Damage: 930\rRange: 76\rCooldown: 9\rEffect: Rust", 1200, this.damage2, this.range2, 9], ["Damage: 2000\rRange: 77\rCooldown: 8\rEffect: Rust", 3000, this.damage3, this.range3, 8], ["Damage: 5000\rRange: 78\rCooldown: 8\rEffect: Rust", 6000, this.damage4, this.range4, 8], ["Damage: 15000\rRange: 80\rCooldown: 7\rEffect:Rust", 13500, this.damage5, this.range5, 7]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "yellowshot", this.damage, 4); lastChecked = 0; if (_global.sound == 1) { _root.playsound3.start(0, 1); } } } } } }
Instance of Symbol 242 MovieClip "tower_poison" in Frame 40
onClipEvent (load) { title = "Splash Poison"; desc = "Splash Poison"; cost = 500; this.range = 70; this.range2 = 72 * (1 + (0.05 * _global.rangeskill)); this.range3 = 75 * (1 + (0.05 * _global.rangeskill)); this.range4 = 78 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 12000 * (1 + (0.05 * _global.attackskill)); rate = 23; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 72\rCooldown: 22\rEffect:Poison(600)", 1500, this.damage2, this.range2, 22], ["Damage: 4000\rRange: 75\rCooldown: 21\rEffect:Poison(2700)", 5000, this.damage3, this.range3, 21], ["Damage: 12000\rRange:78\rCooldown: 20\rEffect:Poison(10000)", 11500, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "shot", this.damage, 5); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 244 MovieClip "tower_static" in Frame 40
onClipEvent (load) { title = "Static"; desc = "Static"; cost = 500; this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 80 * (1 + (0.05 * _global.rangeskill)); this.range4 = 85 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 300 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 4000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 15000 * (1 + (0.05 * _global.attackskill)); rate = 25; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1000\rRange: 77\rCooldown: 24\rEffect:Static(7)", 1500, this.damage2, this.range2, 24], ["Damage: 4000\rRange: 80\rCooldown: 23\rEffect:Static(10)", 5000, this.damage3, this.range3, 23], ["Damage: 15000\rRange: 85\rCooldown:22\rEffect:Static(12)", 11000, this.damage4, this.range4, 22]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "light", this.damage, 22); lastChecked = 0; if (_global.sound == 1) { _root.playsound5.start(0, 1); } } } } } }
Instance of Symbol 252 MovieClip "tower_death" in Frame 40
onClipEvent (load) { title = "Instant Death"; desc = "Instant Death"; cost = 650; this.range = 75 * (1 + (0.05 * _global.rangeskill)); this.range2 = 77 * (1 + (0.05 * _global.rangeskill)); this.range3 = 79 * (1 + (0.05 * _global.rangeskill)); this.range4 = 82 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 650 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3000 * (1 + (0.05 * _global.attackskill)); this.damage3 = 15000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 35000 * (1 + (0.05 * _global.attackskill)); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3000)\rRange: 77\rCooldown: 28\rEffect:Death(12%)", 2000, this.damage2, this.range2, 28], ["Damage: 15000\rRange: 79\rCooldown: 26\rEffect:Death(16%)", 7000, this.damage3, this.range3, 26], ["Damage: 35000\rRange:82\rCooldown: 23 \rEffect:Death(19%)", 13500, this.damage4, this.range4, 23]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "deathbullet", this.damage, 6); lastChecked = 0; if (_global.sound == 1) { _root.playsound6.start(0, 1); } } } } } }
Instance of Symbol 248 MovieClip "tower_stun" in Frame 40
onClipEvent (load) { title = "Stun Tower"; desc = "Stun Tower"; cost = 700; rate = 22; this.range = 73 * (1 + (0.05 * _global.rangeskill)); this.range2 = 74 * (1 + (0.05 * _global.rangeskill)); this.range3 = 76 * (1 + (0.05 * _global.rangeskill)); this.range4 = 79 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 45000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 74\rCooldown: 22\rEffect:Stun(13%)", 2500, this.damage2, this.range2, 22], ["Damage: 17000\rRange: 76\rCooldown: 21\rEffect:Stun(16%)", 9000, this.damage3, this.range3, 21], ["Damage: 45000\rRange: 79\rCooldown: 20\rEffect:Stun(18%)", 18000, this.damage4, this.range4, 20]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "blueshot", this.damage, 7); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 254 MovieClip "tower_money" in Frame 40
onClipEvent (load) { title = "Money Tower"; desc = "Money Tower"; cost = 700; rate = 25; this.range = 75; this.range2 = 76 * (1 + (0.05 * _global.rangeskill)); this.range3 = 78 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 3500 * (1 + (0.05 * _global.attackskill)); this.damage3 = 17000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 40000 * (1 + (0.05 * _global.attackskill)); lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 3500\rRange: 76\rCooldown: 24\rEffect:Steal Money(8)", 2500, this.damage2, this.range2, 24], ["Damage: 17000\rRange: 78\rCooldown: 23\rEffect:Steal(9)", 9000, this.damage3, this.range3, 23], ["Damage: 40000\rRange: 80\rCooldown:21\rEffect:Steal(11)", 18000, this.damage4, this.range4, 21]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if (((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "moneyshot", this.damage, 25); lastChecked = 0; if (_global.sound == 1) { _root.playsound4.start(0, 1); } } } } } }
Instance of Symbol 256 MovieClip "tower_explode" in Frame 40
onClipEvent (load) { title = "Explosion"; desc = "Explosion"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 80 * (1 + (0.05 * _global.rangeskill)); this.range2 = 82 * (1 + (0.05 * _global.rangeskill)); this.range3 = 84 * (1 + (0.05 * _global.rangeskill)); this.range4 = 86 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 30; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 82\rCooldown: 28\rEffect:Slow", 3000, this.damage2, this.range2, 28], ["Damage: 8000\rRange: 84\rCooldown: 27\rEffect:Slow", 10000, this.damage3, this.range3, 27], ["Damage: 25000\rRange: 86\rCooldown:25\rEffect:Slow", 25000, this.damage4, this.range4, 25]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 8); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 336 MovieClip "shockshot" in Frame 40
onClipEvent (enterFrame) { this._rotation = this._rotation + 30; }
Instance of Symbol 246 MovieClip "tower_shock" in Frame 40
onClipEvent (load) { title = "Shock"; desc = "Shock"; cost = 1000; damage = 500 * (1 + (0.05 * _global.attackskill)); this.damage2 = 1800 * (1 + (0.05 * _global.attackskill)); this.damage3 = 8000 * (1 + (0.05 * _global.attackskill)); this.damage4 = 25000 * (1 + (0.05 * _global.attackskill)); this.range = 70 * (1 + (0.05 * _global.rangeskill)); this.range2 = 75 * (1 + (0.05 * _global.rangeskill)); this.range3 = 77 * (1 + (0.05 * _global.rangeskill)); this.range4 = 80 * (1 + (0.05 * _global.rangeskill)); this.range = Math.floor(this.range); rate = 35; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 4; upgrades = [["Damage: 1800\rRange: 75\rCooldown: 33\rEffect:Shock", 3000, this.damage2, this.range2, 33], ["Damage: 8000\rRange: 77\rCooldown: 30\rEffect:Shock", 10000, this.damage3, this.range3, 30], ["Damage: 25000\rRange: 80\rCooldown: 27\rEffect:Shock", 25000, this.damage4, this.range4, 27]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_explode")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _root.fire(this, this, 10, 1, 10, "redbullet", this.damage, 26); lastChecked = 0; if (_global.sound == 1) { _root.playsound1.start(0, 1); } } } } } }
Instance of Symbol 258 MovieClip "tower_ultimate" in Frame 40
onClipEvent (load) { title = "Ultimate Tower"; desc = "Ultimate Tower"; cost = 20000; damage = 100000 * (1 + (0.05 * _global.attackskill)); this.damage2 = 200000 * (1 + (0.05 * _global.attackskill)); this.range = 85 * (1 + (0.05 * _global.rangeskill)); this.range2 = 95 * (1 + (0.05 * _global.rangeskill)); rate = 27; lastFire = rate; lastChecked = rate; creep = ""; target = 0; tier = 1; maxtier = 2; upgrades = [["Damage: 200000\rRange: 95\rCooldown: 33\rEffect:Splash", 40000, this.damage2, this.range2, 24]]; } on (press) { _root.towerInfo(this); _root.TowerInfo(this); } onClipEvent (enterFrame) { if ((((active == 1) && (_root.creepArray.length > 0)) && (_root.pauses == 0)) && (this._name != "tower_ultimate")) { lastChecked++; if (lastChecked >= rate) { if (target == 0) { i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else if (("" + creep) == "") { target = 0; i = 0; while (i <= _root.creepArray.length) { d = Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2); if (d < ((range * range) + 81)) { target = 1; creep = _root.creepArray[i]; _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } break; } i++; } } else { d = Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2); if (d > (range * range)) { lastChecked = 999; target = 0; } else { _rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593); _root.fire(this, creep, 10, 1, 10, "bigbomb", this.damage, 2); lastChecked = 0; if (_global.sound == 1) { _root.playsound2.start(0, 1); } } } } } }
Instance of Symbol 353 MovieClip "UpgradeTowerInfo" in Frame 40
onClipEvent (load) { _visible = false; swapDepths(100000); }
Instance of Symbol 378 MovieClip "creep1" in Frame 40
onClipEvent (load) { this._rotation = this._rotation + 45; }
Instance of Symbol 380 MovieClip in Frame 40
onClipEvent (enterFrame) { if (_root.timer > 50) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 381 MovieClip in Frame 40
onClipEvent (load) { this._visible = false; this.startDrag(true); this.count = 0; } onClipEvent (enterFrame) { if (Key.isDown(77) && (_global.sound == 1)) { _global.sound = 0; stopAllSounds(); } if (Key.isDown(78) && (_global.sound == 0)) { _global.sound = 1; _root.playsound.start(0, 100000); } if (Key.isDown(80) && (_root.pauses == 0)) { _root.pauses = 1; } if (Key.isDown(85) && (_root.pauses == 1)) { _root.pauses = 0; } if (_root.pauses == 0) { _root.levelnew++; _root.checkkill(); this.count++; if ((this.count % 30) == 0) { _root.timer--; } if (_root.timer <= 0) { _root.newLevel(); _root.timer = 60; } if ((_root.lives <= 0) && (_root.gameover == 0)) { _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("lose11"); } } if (((((_root.wave >= _global.maxwaves) && (_root.creepArray.length <= 0)) && (_root.gameover == 0)) && (_root.kills >= 20)) && (_root.levelnew > 120)) { _root.levelwin = 1; i = 0; while (i < _root.creepArray.length) { _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.gotoAndPlay("win11"); } } }
Instance of Symbol 387 MovieClip "tinfo" in Frame 40
onClipEvent (load) { this.swapDepths(99999); }
Instance of Symbol 421 MovieClip "quitbox" in Frame 40
onClipEvent (load) { this._visible = false; }
Instance of Symbol 228 MovieClip "wp1" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp2" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp3" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp4" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp5" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp6" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp7" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp8" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp9" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp10" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp11" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp12" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp13" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Instance of Symbol 228 MovieClip "wp14" in Frame 40
onClipEvent (enterFrame) { _root.checkkill(); }
Frame 41
stop(); stopAllSounds(); var o = {n:[12, 10, 4, 3, 12, 9, 4, 10, 9, 2, 1, 12, 12, 2, 8, 0], f:function (i, s) { if (s.length == 16) { return(s); } return(this.f(i + 1, s + this.n[i].toString(16))); }}; var boardID = o.f(0, ""); mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:_root.score});
Frame 42
_root.gotoAndPlay("levelselect");
Symbol 27 Button
on (release) { getURL ("http://www.flashgamesnexus.com/", "_blank"); }
Symbol 28 MovieClip Frame 1
function timerHandler() { if (!loadingComplete) { var _local4 = _root.getBytesLoaded() / _root.getBytesTotal(); bar._xscale = 200 * _local4; if (_local4 == 1) { loadingComplete = true; if (AUTO_PLAY) { startMovie(); } else { gotoAndStop ("loaded"); } return(undefined); } } dt = getTimer() - time; time = time + dt; frameAccum = frameAccum + dt; var _local3 = 0; while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) { advanceFrame(tankLogo, true, true); advanceFrame(loadingText, false, true); advanceFrame(barGfx, false, true); if (loadingComplete) { advanceFrame(this, false, false); } (frameAccum = frameAccum - FRAME_TIME); _local3++; } updateAfterEvent(); } function advanceFrame(clip, recurse, loop) { if (!clip) { return(undefined); } clip.stop(); if (clip._currentframe == clip._totalframes) { if (loop) { clip.gotoAndStop(1); } } else { clip.nextFrame(); } if (recurse) { for (childName in clip) { if (typeof(clip[childName]) == "movieclip") { advanceFrame(clip[childName], recurse, loop); } } } } function startMovie() { clearInterval(intervalId); _root.play(); } _root.stop(); stop(); var FRAME_TIME = 33.3333333333333; var AUTO_PLAY = false; var MAX_FRAME_SKIP = 5; var loadingComplete; var intervalId; var time; var frameAccum; loadingComplete = false; intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2); frameAccum = 0; time = getTimer(); timerHandler();
Symbol 594 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync { var _syncContainer; function MochiSync () { _syncContainer = {}; } function getProp(name) { return(_syncContainer[name]); } function setProp(name, value) { if (_syncContainer[name] == value) { return(undefined); } _syncContainer[name] = value; mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value}); } function triggerEvent(eventType, args) { switch (eventType) { case SYNC_REQUEST : mochi.as2.MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY : _syncContainer[args.name] = args.value; } } static var SYNC_REQUEST = "SyncRequest"; static var SYNC_PROPERTY = "UpdateProperty"; }
Symbol 595 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices { static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel; function MochiServices () { } static function get id() { return(_id); } static function get clip() { return(_container); } static function get childClip() { return(_clip); } static function getVersion() { return("3.8 as2"); } static function allowDomains(server) { var _local1 = server.split("/")[2].split(":")[0]; if (System.security) { if (System.security.allowDomain) { System.security.allowDomain("*"); System.security.allowDomain(_local1); } if (System.security.allowInsecureDomain) { System.security.allowInsecureDomain("*"); System.security.allowInsecureDomain(_local1); } } return(_local1); } static function get isNetworkAvailable() { if (System.security) { var _local1 = System.security; if (_local1.sandboxType == "localWithFile") { return(false); } } return(true); } static function set comChannelName(val) { if (val != undefined) { if (val.length > 3) { _sendChannelName = val + "_fromgame"; initComChannels(); } } //return(__get__comChannelName()); } static function get connected() { return(_connected); } static function connect(id, clip, onError) { warnID(id, false); if ((!_connected) && (_clip == undefined)) { trace("MochiServices Connecting..."); _connecting = true; init(id, clip); } if (onError != undefined) { mochi.as2.MochiServices.onError = onError; } else if (mochi.as2.MochiServices.onError == undefined) { mochi.as2.MochiServices.onError = function (errorCode) { trace(errorCode); }; } } static function disconnect() { if (_connected || (_connecting)) { _connecting = (_connected = false); flush(true); if (_clip != undefined) { _clip.removeMovieClip(); delete _clip; } _listenChannel.close(); } } static function init(id, clip) { _id = id; if (clip != undefined) { _container = clip; } else { _container = _root; } loadCommunicator(id, _container); } static function loadCommunicator(id, clip) { var _local6 = "_mochiservices_com_" + id; var _local5 = new MovieClipLoader(); var _local3 = {}; if (_clip != null) { return(_clip); } if (!isNetworkAvailable) { return(null); } if (urlOptions().servURL) { _servURL = urlOptions().servURL; } var _local4 = _servURL + _services; if (urlOptions().servicesURL) { _local4 = urlOptions().servicesURL; } allowDomains(_local4); _clip = clip.createEmptyMovieClip(_local6, 10336, false); _listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999)); listen(); if (_local3.waitInterval != null) { clearInterval(_local3.waitInterval); } _local3.onLoadError = loadError; _local3.onLoadStart = function (target_mc) { this.isLoading = true; }; _local3.onLoadComplete = function (target_mc) { target_mc.MochiServices = mochi.as2.MochiServices; }; _local3.startTime = getTimer(); _local3.wait = function () { if ((getTimer() - this.startTime) > 10000) { if (!this.isLoading) { mochi.as2.MochiServices.disconnect(); mochi.as2.MochiServices.onError.apply(null, ["IOError"]); } clearInterval(this.waitInterval); } }; _local3.waitInterval = setInterval(_local3, "wait", 1000); _local5.addListener(_local3); _local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip); _sendChannel = new LocalConnection(); _sendChannel._queue = []; return(_clip); } static function loadError(target_mc, errorCode, httpStatus) { trace("MochiServices could not load."); disconnect(); onError.apply(null, [errorCode]); } static function onStatus(infoObject) { if (!(infoObject.level === "error")) { } else { _connected = false; _listenChannel.connect(_listenChannelName); } } static function listen() { _listenChannel = new LocalConnection(); _listenChannel.handshake = function (args) { mochi.as2.MochiServices.__set__comChannelName(args.newChannel); }; _listenChannel.allowDomain = function (d) { return(true); }; _listenChannel.allowInsecureDomain = _listenChannel.allowDomain; _listenChannel._nextcallbackID = 0; _listenChannel._callbacks = {}; _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } static function initComChannels() { if (!_connected) { _sendChannel.onStatus = function (infoObject) { mochi.as2.MochiServices.onStatus(infoObject); }; _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()}); _listenChannel.onStatus = function (infoObject) { mochi.as2.MochiServices.onStatus(infoObject); }; _listenChannel.onReceive = function (pkg) { var _local5 = pkg.callbackID; var _local4 = this._callbacks[_local5]; if (!_local4) { return(undefined); } var _local2 = _local4.callbackMethod; var _local3 = _local4.callbackObject; if (_local3 && (typeof(_local2) == "string")) { _local2 = _local3[_local2]; } if (_local2 != undefined) { _local2.apply(_local3, pkg.args); } delete this._callbacks[_local5]; }; _listenChannel.onEvent = function (pkg) { switch (pkg.target) { case "events" : mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args); break; case "coins" : mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args); break; case "sync" : mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args); } }; _listenChannel.onError = function () { mochi.as2.MochiServices.onError.apply(null, ["IOError"]); }; trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; while (_sendChannel._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift()); } } } static function updateCopy(args) { send("coins_updateCopy", args, null, null); } static function flush(error) { var _local1; var _local2; while (_sendChannel._queue.length > 0) { _local1 = _sendChannel._queue.shift(); if (_local1.callbackID != null) { _local2 = _listenChannel._callbacks[_local1.callbackID]; } delete _listenChannel._callbacks[_local1.callbackID]; if (error) { handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod); } } } static function handleError(args, callbackObject, callbackMethod) { if (args != null) { if (args.onError != null) { args.onError.apply(null, ["NotConnected"]); } if ((args.options != null) && (args.options.onError != null)) { args.options.onError.apply(null, ["NotConnected"]); } } if (callbackMethod != null) { args = {}; args.error = true; args.errorCode = "NotConnected"; if ((callbackObject != null) && (typeof(callbackMethod) == "string")) { callbackObject[callbackMethod](args); } else if (callbackMethod != null) { callbackMethod.apply(args); } } } static function send(methodName, args, callbackObject, callbackMethod) { if (_connected) { _sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID}); } else { if ((_clip == undefined) || (!_connecting)) { trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName); handleError(args, callbackObject, callbackMethod); flush(true); return(undefined); } _sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID}); } _listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod}; _listenChannel._nextcallbackID++; } static function urlOptions() { var _local5 = {}; var _local6; if (_root._url.indexOf("mochiad_options") != -1) { var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1; _local6 = _root._url.substr(_local2, _root._url.length); } else if (_root.mochiad_options) { _local6 = _root.mochiad_options; } if (_local6) { var _local4 = _root.mochiad_options.split("&"); var _local2 = 0; while (_local2 < _local4.length) { var _local3 = _local4[_local2].split("="); _local5[unescape(_local3[0])] = unescape(_local3[1]); _local2++; } } return(_local5); } static function warnID(bid, leaderboard) { bid = bid.toLowerCase(); if (bid.length != 16) { trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length"); return(undefined); } if (bid == "1e113c7239048b3f") { if (leaderboard) { trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); } return(undefined); } if (bid == "84993a1de4031cd8") { if (leaderboard) { trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); } return(undefined); } var _local1 = 0; while (_local1 < bid.length) { switch (bid.charAt(_local1)) { case "0" : case "1" : case "2" : case "3" : case "4" : case "5" : case "6" : case "7" : case "8" : case "9" : case "a" : case "b" : case "c" : case "d" : case "e" : case "f" : break; default : trace("WARNING: Board ID contains illegal characters: " + bid); return(undefined); } _local1++; } } static function addLinkEvent(url, burl, btn, onClick) { var timeout = 1500; var t0 = getTimer(); var _local2 = new Object(); _local2.mav = getVersion(); _local2.swfv = btn.getSWFVersion() || 6; _local2.swfurl = btn._url; _local2.fv = System.capabilities.version; _local2.os = System.capabilities.os; _local2.lang = System.capabilities.language; _local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY; var s = "?"; var _local3 = 0; for (var _local6 in _local2) { if (_local3 != 0) { s = s + "&"; } _local3++; s = ((s + _local6) + "=") + escape(_local2[_local6]); } if (!(netupAttempted || (_connected))) { var ping = btn.createEmptyMovieClip("ping", 777); var _local7 = btn.createEmptyMovieClip("nettest", 778); netupAttempted = true; ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer()); _local7.onEnterFrame = function () { if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) { delete this.onEnterFrame; } else if ((getTimer() - t0) > timeout) { delete this.onEnterFrame; mochi.as2.MochiServices.netup = false; } }; } var _local4 = btn.createEmptyMovieClip("clk", 1001); _local4._alpha = 0; _local4.beginFill(1044735); _local4.moveTo(0, 0); _local4.lineTo(0, btn._height); _local4.lineTo(btn._width, btn._height); _local4.lineTo(btn._width, 0); _local4.lineTo(0, 0); _local4.endFill(); _local4.onRelease = function () { if (mochi.as2.MochiServices.netup) { getURL (url + s, "_blank"); } else { getURL (burl, "_blank"); } if (onClick != undefined) { onClick(); } }; } static function setContainer(clip) { } static function stayOnTop(clip) { } static var _servURL = "http://www.mochiads.com/static/lib/services/"; static var _services = "services.swf"; static var _mochiLC = "MochiLC.swf"; static var _listenChannelName = "__ms_"; static var _connecting = false; static var _connected = false; static var netup = true; static var netupAttempted = false; static var servicesSync = new mochi.as2.MochiSync(); }
Symbol 596 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher { var eventTable; function MochiEventDispatcher () { eventTable = {}; } function buildDelegate(thisObject, thatObject) { var _local2 = {thisObject:thisObject, thatObject:thatObject}; if (thatObject != undefined) { var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject)); _local2.delegate = function (args) { funct.call(thisObject, args); }; } else { _local2.delegate = thisObject; } return(_local2); } function compareDelegate(d_A, d_B) { if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) { return(false); } return(true); } function addEventListener(event, thisObject, thatObject) { removeEventListener(event, thisObject, thatObject); eventTable[event].push(buildDelegate(thisObject, thatObject)); } function removeEventListener(event, thisObject, thatObject) { var _local3 = buildDelegate(thisObject, thatObject); if (eventTable[event] == undefined) { eventTable[event] = []; return(undefined); } for (var _local4 in eventTable[event]) { if (!compareDelegate(eventTable[event][_local4], _local3)) { continue; } eventTable[event].splice(Number(_local4), 1); } } function triggerEvent(event, args) { if (eventTable[event] == undefined) { return(undefined); } for (var _local4 in eventTable[event]) { eventTable[event][_local4].delegate(args); } } }
Symbol 597 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents { function MochiEvents () { } static function getVersion() { return(mochi.as2.MochiServices.getVersion()); } static function startSession(achievementID) { mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null); } static function setNotifications(clip, style) { var _local2 = {}; for (var _local3 in style) { _local2[_local3] = style[_local3]; } _local2.clip = clip; mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null); } static function addEventListener(eventType, thisObject, thatObject) { _dispatcher.addEventListener(eventType, thisObject, thatObject); } static function triggerEvent(eventType, args) { _dispatcher.triggerEvent(eventType, args); } static function removeEventListener(eventType, thisObject, thatObject) { _dispatcher.removeEventListener(eventType, thisObject, thatObject); } static function startPlay(tag) { if (tag == undefined) { tag = "gameplay"; } mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null); } static function endPlay() { mochi.as2.MochiServices.send("events_clearRoundID", null, null, null); } static function trackEvent(tag, value) { mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null); } static var ACHIEVEMENT_RECEIVED = "AchievementReceived"; static var ALIGN_TOP_LEFT = "ALIGN_TL"; static var ALIGN_TOP = "ALIGN_T"; static var ALIGN_TOP_RIGHT = "ALIGN_TR"; static var ALIGN_LEFT = "ALIGN_L"; static var ALIGN_CENTER = "ALIGN_C"; static var ALIGN_RIGHT = "ALIGN_R"; static var ALIGN_BOTTOM_LEFT = "ALIGN_BL"; static var ALIGN_BOTTOM = "ALIGN_B"; static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR"; static var FORMAT_SHORT = "ShortForm"; static var FORMAT_LONG = "LongForm"; static var _dispatcher = new mochi.as2.MochiEventDispatcher(); }
Symbol 598 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial { function MochiSocial () { } static function getVersion() { return(mochi.as2.MochiServices.getVersion()); } static function showLoginWidget(options) { mochi.as2.MochiServices.setContainer(); mochi.as2.MochiServices.stayOnTop(); mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options}); } static function hideLoginWidget() { mochi.as2.MochiServices.send("coins_hideLoginWidget"); } static function requestLogin() { mochi.as2.MochiServices.send("coins_requestLogin"); } static function getUserInfo() { mochi.as2.MochiServices.send("coins_getUserInfo"); } static function saveUserProperties(properties) { mochi.as2.MochiServices.send("coins_saveUserProperties", properties); } static function addEventListener(eventType, delegate) { _dispatcher.addEventListener(eventType, delegate); } static function triggerEvent(eventType, args) { _dispatcher.triggerEvent(eventType, args); } static function removeEventListener(eventType, delegate) { _dispatcher.removeEventListener(eventType, delegate); } static var LOGGED_IN = "LoggedIn"; static var LOGGED_OUT = "LoggedOut"; static var LOGIN_SHOW = "LoginShow"; static var LOGIN_HIDE = "LoginHide"; static var LOGIN_SHOWN = "LoginShown"; static var PROFILE_SHOW = "ProfileShow"; static var PROFILE_HIDE = "ProfileHide"; static var PROPERTIES_SAVED = "PropertySaved"; static var WIDGET_LOADED = "WidgetLoaded"; static var USER_INFO = "UserInfo"; static var ERROR = "Error"; static var IO_ERROR = "IOError"; static var NO_USER = "NoUser"; static var PROPERTIES_SIZE = "PropertiesSize"; static var _dispatcher = new mochi.as2.MochiEventDispatcher(); }
Symbol 599 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores { static var boardID, onClose, onError; function MochiScores () { } static function setBoardID(boardID) { mochi.as2.MochiServices.warnID(boardID, true); mochi.as2.MochiScores.boardID = boardID; mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID}); } static function showLeaderboard(options) { options.clip = mochi.as2.MochiServices.clip; if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) { mochi.as2.MochiServices.disconnect(); trace("WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!"); trace("make sure MochiServices.connect is called as early in the application runtime as possible."); mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip); } delete options.clip; if (options.name != null) { if (typeof(options.name) == "object") { if (options.name.text != undefined) { options.name = options.name.text; } } } if (options.score != null) { if (options.score instanceof TextField) { if (options.score.text != undefined) { options.score = options.score.text; } } else if (options.score instanceof mochi.as2.MochiDigits) { options.score = options.score.value; } var _local1 = Number(options.score); if (isNaN(_local1)) { trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"); } else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) { trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"); } else { if (Math.floor(_local1) != _local1) { trace(("WARNING: Submitted score '" + options.score) + "' will be truncated"); } options.score = _local1; } } if (options.onDisplay != null) { options.onDisplay(); } else { mochi.as2.MochiServices.__get__clip().stop(); } if (options.onClose != null) { onClose = options.onClose; } else { onClose = function () { mochi.as2.MochiServices.__get__clip().play(); }; } if (options.onError != null) { onError = options.onError; } else { onError = onClose; } if (options.boardID == null) { if (boardID != null) { options.boardID = boardID; } } mochi.as2.MochiServices.warnID(options.boardID, true); trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose); } static function closeLeaderboard() { mochi.as2.MochiServices.send("scores_closeLeaderboard"); } static function getPlayerInfo(callbackObj, callbackMethod) { mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod); } static function submit(score, name, callbackObj, callbackMethod) { score = Number(score); if (isNaN(score)) { trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'"); } else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) { trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite"); } else { if (Math.floor(score) != score) { trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated"); } score = Number(score); } mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod); } static function requestList(callbackObj, callbackMethod) { mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod); } static function scoresArrayToObjects(scores) { var _local5 = {}; var _local1; var _local4; var _local2; var _local6; for (var _local8 in scores) { if (typeof(scores[_local8]) == "object") { if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) { _local5[_local8] = []; _local2 = scores[_local8]; _local4 = 0; while (_local4 < _local2.rows.length) { _local6 = {}; _local1 = 0; while (_local1 < _local2.cols.length) { _local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1]; _local1++; } _local5[_local8].push(_local6); _local4++; } } else { _local5[_local8] = {}; for (var _local7 in scores[_local8]) { _local5[_local8][_local7] = scores[_local8][_local7]; } } } else { _local5[_local8] = scores[_local8]; } } return(_local5); } static function doClose(args) { if (args.error == true) { if (args.errorCode == undefined) { args.errorCode = "IOError"; } onError.apply(null, [args.errorCode]); } else { onClose.apply(); } } }
Symbol 600 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits { var Encoder, Fragment, Sibling; function MochiDigits (digit, index) { Encoder = 0; setValue(digit, index); } function get value() { return(Number(toString())); } function set value(v) { setValue(v); //return(value); } function addValue(v) { value = value + v; } function setValue(digit, index) { var _local3 = digit.toString(); if ((index == undefined) || (isNaN(index))) { index = 0; } Fragment = _local3.charCodeAt(index++) ^ Encoder; if (index < _local3.length) { Sibling = new mochi.as2.MochiDigits(digit, index); } else { Sibling = null; } reencode(); } function reencode() { var _local2 = int(2147483647 * Math.random()); Fragment = Fragment ^ (_local2 ^ Encoder); Encoder = _local2; } function toString() { var _local2 = String.fromCharCode(Fragment ^ Encoder); return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2))); } }
Symbol 53 MovieClip Frame 109
_root.gotoAndPlay("mainmenu");
Symbol 55 Button
on (release) { _root.gotoAndPlay("instr"); }
Symbol 57 Button
on (release) { _root.gotoAndPlay("instr"); }
Symbol 59 Button
on (release) { getURL ("http://www.flashgamesnexus.com", "_blank"); }
Symbol 61 Button
on (release) { _root.gotoAndPlay("credits"); }
Symbol 63 Button
on (release) { getURL ("http://www.flashninjaclan.com/fncgames.php", "_blank"); }
Symbol 67 Button
on (release) { getURL ("http://www.flashgamesnexus.com", "_blank"); }
Symbol 70 Button
on (release) { getURL ("http://www.flashninjaclan.com", "_blank"); }
Symbol 82 Button
on (release) { _root.gotoAndStop("story"); }
Symbol 92 Button
on (release) { _root.gotoAndStop("mainmenu"); }
Symbol 95 Button
on (release) { _root.gotoAndStop("levelselect"); }
Symbol 103 Button
on (release) { _root.gotoAndStop("skillshop"); }
Instance of Symbol 100 MovieClip in Symbol 113 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 1) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 2) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 122 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 3) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 126 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 4) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 144 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 5) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 148 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 6) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 152 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 7) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 156 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 8) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 160 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 9) { this._visible = true; } else { this._visible = false; } }
Instance of Symbol 100 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) { if (_root.maxlevelbeat < 5) { this._visible = true; } else { this._visible = false; } }
Symbol 176 Button
on (release) { if ((_global.xpleft > 0) && (_global.attackskill < 5)) { _global.attackskill++; _global.xpleft--; _root.attackskill = _global.attackskill; _root.xpleft = _global.xpleft; } }
Symbol 179 Button
on (release) { if (_global.attackskill > 0) { _global.attackskill--; _global.xpleft++; _root.attackskill = _global.attackskill; _root.xpleft = _global.xpleft; } }
Symbol 183 Button
on (release) { if ((_global.xpleft > 0) && (_global.rangeskill < 5)) { _global.rangeskill++; _global.xpleft--; _root.rangeskill = _global.rangeskill; _root.xpleft = _global.xpleft; } }
Symbol 184 Button
on (release) { if (_global.rangeskill > 0) { _global.rangeskill--; _global.xpleft++; _root.rangeskill = _global.rangeskill; _root.xpleft = _global.xpleft; } }
Symbol 187 Button
on (release) { if ((_global.xpleft > 0) && (_global.startmoneylevel < 5)) { _global.startmoneylevel++; _global.xpleft--; _root.startmoneylevel = _global.startmoneylevel; _root.xpleft = _global.xpleft; } }
Symbol 188 Button
on (release) { if (_global.startmoneylevel > 0) { _global.startmoneylevel--; _global.xpleft++; _root.startmoneylevel = _global.startmoneylevel; _root.xpleft = _global.xpleft; } }
Symbol 195 Button
on (release) { if ((_global.xpleft > 0) && (_global.killbounty < 5)) { _global.killbounty++; _global.xpleft--; _root.killbounty = _global.killbounty; _root.xpleft = _global.xpleft; } }
Symbol 196 Button
on (release) { if (_global.killbounty > 0) { _global.killbounty--; _global.xpleft++; _root.killbounty = _global.killbounty; _root.xpleft = _global.xpleft; } }
Symbol 201 Button
on (release) { if ((_global.xpleft > 0) && (_global.gems < 5)) { _global.gems++; _global.xpleft--; _root.gems = _global.gems; _root.xpleft = _global.xpleft; } }
Symbol 202 Button
on (release) { if (_global.gems > 0) { _global.gems--; _global.xpleft++; _root.gems = _global.gems; _root.xpleft = _global.xpleft; } }
Symbol 206 Button
on (release) { storedskills = SharedObject.getLocal("flashskill"); storedskills.data.attackskill = _global.attackskill; storedskills.data.xpleft = _global.xpleft; storedskills.data.rangeskill = _global.rangeskill; storedskills.data.startmoneylevel = _global.startmoneylevel; storedskills.data.killbounty = _global.killbounty; storedskills.data.gems = _global.gems; storedskills.data.techlevel = _global.techlevel; if (storedskills.data.techlevel == undefined) { storedskills.data.techlevel = 0; } if (storedskills.data.attackskill == undefined) { storedskills.data.attackskill = 0; } if (storedskills.data.xpleft == undefined) { storedskills.data.xpleft = 0; } if (storedskills.data.rangeskill == undefined) { storedskills.data.rangeskill = 0; } if (storedskills.data.startmoneylevel == undefined) { storedskills.data.startmoneylevel = 0; } if (storedskills.data.killbounty == undefined) { storedskills.data.killbounty = 0; } if (storedskills.data.gems == undefined) { storedskills.data.gems = 0; } _root.gotoAndPlay("levelselect"); }
Symbol 209 Button
on (release) { if ((_global.xpleft > 0) && (_global.techlevel < 5)) { _global.techlevel++; _global.xpleft--; _root.techlevel = _global.techlevel; _root.xpleft = _global.xpleft; } }
Symbol 210 Button
on (release) { if (_global.techlevel > 0) { _global.techlevel--; _global.xpleft++; _root.techlevel = _global.techlevel; _root.xpleft = _global.xpleft; } }
Symbol 228 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 235 MovieClip Frame 4
stop();
Symbol 235 MovieClip Frame 5
stop();
Instance of Symbol 235 MovieClip "levelicon" in Symbol 236 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 238 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 240 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 242 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 242 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 1) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 244 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 244 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 1) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 246 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 4) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 248 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 248 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 3) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 252 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 252 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 3) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 254 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 254 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 2) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 256 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 256 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 4) { this._visible = false; } else { this._visible = true; } }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 258 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Instance of Symbol 100 MovieClip in Symbol 258 MovieClip Frame 1
onClipEvent (load) { if (_root.techlevel >= 5) { this._visible = false; } else { this._visible = true; } }
Symbol 267 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 2
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 2
this.live = 0; _root.thescore = _root.thescore + 10; if (_global.sound == 1) { _root.playsound5.start(0, 1); }
Symbol 280 MovieClip Frame 6
this.reset();
Symbol 289 MovieClip Frame 5
if (this._name != "explosion") { this.removeMovieClip(); }
Symbol 310 MovieClip Frame 11
if (this._name != "aftereffect") { this.removeMovieClip(); }
Instance of Symbol 235 MovieClip "levelicon" in Symbol 314 MovieClip Frame 1
onClipEvent (enterFrame) { this.gotoAndStop(this._parent.tier); }
Symbol 322 MovieClip Frame 5
if (this._name != "iceball") { this.removeMovieClip(); }
Symbol 327 MovieClip Frame 7
if (this._name != "lighteffect") { this.removeMovieClip(); }
Symbol 333 MovieClip Frame 5
this.removeMovieClip();
Symbol 336 MovieClip Frame 9
if (this._name != "shockshot") { this.removeMovieClip(); }
Symbol 341 MovieClip Frame 5
this.removeMovieClip();
Instance of Symbol 350 MovieClip "UpgradeButton" in Symbol 353 MovieClip Frame 1
on (press) { a = _root.selectedTower; b = a.maxtier; c = a.tier; if (c < b) { _root.upgrade(); } }
Instance of Symbol 350 MovieClip "sellbutton" in Symbol 353 MovieClip Frame 1
on (press) { _root.sell(); }
Instance of Symbol 352 MovieClip "xsymbol" in Symbol 353 MovieClip Frame 1
on (release) { this._parent._visible = false; }
Symbol 362 Button
on (release) { if (((_root.wave < _global.maxwaves) && (_root.pauses == 0)) && (_root.timer < 50)) { _root.kills = 0; _root.newLevel(); _root.score = _root.score + (40 * _root.timer); addgold = Math.floor(_root.timer / 3); _root.gold = _root.gold + addgold; _root.timer = 60; } }
Symbol 371 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 2
stop();
Symbol 371 MovieClip Frame 3
stop();
Symbol 371 MovieClip Frame 4
stop();
Symbol 378 MovieClip Frame 1
stop(); stop();
Instance of Symbol 377 MovieClip in Symbol 378 MovieClip Frame 1
onClipEvent (enterFrame) { if (this._parent.iscorrode != 0) { this._visible = true; } else { this._visible = false; } }
Symbol 384 MovieClip Frame 10
if (this._name != "goldeffect") { this.removeMovieClip(); }
Symbol 412 Button
on (release) { _root.pauses = 1; _root.quitbox._visible = true; }
Symbol 417 Button
on (release) { stopAllSounds(); _root.pauses = 0; while (_root.creepArray.length > 0) { i = 0; while (i < _root.creepArray.length) { trace(i); _root.creepArray[i].removeMovieClip(); _root.creepArray.splice(i, 1); i++; } } _root.marker.swapDepths(9994); _root.marker.removeMovieClip(); _root.range.swapDepths(9993); _root.range.removeMovieClip(); _root.creep1.swapDepths(9992); _root.creep1.removeMovieClip(); _root.UpgradeTowerInfo.swapDepths(9991); _root.UpgradeTowerInfo.removeMovieClip(); _root.range.swapDepths(9999); _root.range.removeMovieClip(); j = 0; while (j <= _root.towerCount) { _root["t" + j].removeMovieClip(); j++; } if (_root.creepArray.length <= 0) { _root.gotoAndPlay("mainmenu"); } }
Symbol 420 Button
on (release) { _root.pauses = 0; _root.quitbox._visible = false; }
Symbol 426 Button
on (release) { _root.gotoAndPlay("levelselect"); }
Symbol 430 Button
on (release) { getURL ("http://www.flashgamesnexus.com/flash-games/Space-Invasion-Tower-Defense.php", "_blank"); }
Symbol 433 Button
on (release) { getURL ("http://www.flashgamesnexus.com/flash-games/Ninjas-vs-Pirates-TD.php", "_blank"); }
Symbol 436 Button
on (release) { getURL ("http://www.flashgamesnexus.com/flash-games/Highlord-TD.php", "_blank"); }

Library Items

Symbol 1 Sound [sndrocket]
Symbol 2 Sound [sndplasma]
Symbol 3 Sound [sndlaser]
Symbol 4 Sound [sndexplode]
Symbol 5 Sound [sndbullet1]
Symbol 6 Sound [sndbullet]
Symbol 7 Sound [explod04.wav]
Symbol 8 BitmapUsed by:9 93 575 579
Symbol 9 GraphicUses:8Used by:Timeline
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:Timeline
Symbol 12 GraphicUsed by:13 28
Symbol 13 MovieClipUses:12Used by:28
Symbol 14 GraphicUsed by:28
Symbol 15 GraphicUsed by:16 27 48
Symbol 16 MovieClipUses:15Used by:27
Symbol 17 GraphicUsed by:18 27
Symbol 18 MovieClipUses:17Used by:27
Symbol 19 GraphicUsed by:23
Symbol 20 GraphicUsed by:21 27 46 67
Symbol 21 MovieClipUses:20Used by:23 27 67
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:19 21 22Used by:27
Symbol 24 GraphicUsed by:27
Symbol 25 GraphicUsed by:27
Symbol 26 GraphicUsed by:27
Symbol 27 ButtonUses:16 18 23 24 21 25 26 15 17 20Used by:28
Symbol 28 MovieClipUses:13 14 27 12Used by:Timeline
Symbol 29 GraphicUsed by:32
Symbol 30 FontUsed by:31 77 78 88 89 90 91 423 424 425 427 437 438 439 440 455 456 470 471 485 486 500 501 515 516 530 531 545 546 560 561 576 577 593
Symbol 31 TextUses:30Used by:32
Symbol 32 MovieClipUses:29 31Used by:Timeline
Symbol 594 MovieClip [__Packages.mochi.as2.MochiSync]
Symbol 595 MovieClip [__Packages.mochi.as2.MochiServices]
Symbol 596 MovieClip [__Packages.mochi.as2.MochiEventDispatcher]
Symbol 597 MovieClip [__Packages.mochi.as2.MochiEvents]
Symbol 598 MovieClip [__Packages.mochi.as2.MochiSocial]
Symbol 599 MovieClip [__Packages.mochi.as2.MochiScores]
Symbol 600 MovieClip [__Packages.mochi.as2.MochiDigits]
Symbol 33 GraphicUsed by:53 381
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:53
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:53
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:38Used by:53
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:40Used by:53
Symbol 42 ShapeTweeningUsed by:53
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:53
Symbol 45 GraphicUsed by:53
Symbol 46 MovieClipUses:20Used by:47
Symbol 47 MovieClipUses:46Used by:53
Symbol 48 MovieClipUses:15Used by:53
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:53
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClipUses:51Used by:53
Symbol 53 MovieClipUses:33 35 37 39 41 42 44 45 47 48 50 52 SS1Used by:Timeline
Symbol 54 GraphicUsed by:55
Symbol 55 ButtonUses:54Used by:Timeline
Symbol 56 GraphicUsed by:57
Symbol 57 ButtonUses:56Used by:Timeline
Symbol 58 GraphicUsed by:59
Symbol 59 ButtonUses:58Used by:Timeline
Symbol 60 GraphicUsed by:61
Symbol 61 ButtonUses:60Used by:Timeline
Symbol 62 GraphicUsed by:63
Symbol 63 ButtonUses:62Used by:Timeline
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:Timeline
Symbol 66 GraphicUsed by:67
Symbol 67 ButtonUses:66 21 20Used by:Timeline
Symbol 68 BitmapUsed by:69
Symbol 69 GraphicUses:68Used by:70
Symbol 70 ButtonUses:69Used by:Timeline
Symbol 71 Sound [music2]Used by:Timeline
Symbol 72 Sound [music]Used by:Timeline
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClipUses:73Used by:Timeline
Symbol 75 BitmapUsed by:76 101 102
Symbol 76 GraphicUses:75Used by:Timeline
Symbol 77 TextUses:30Used by:82 95
Symbol 78 TextUses:30Used by:82 95
Symbol 79 GraphicUsed by:82 95
Symbol 80 GraphicUsed by:82 95
Symbol 81 GraphicUsed by:82 95
Symbol 82 ButtonUses:77 78 79 80 81Used by:Timeline
Symbol 83 FontUsed by:84 85 86 94 165 166 580
Symbol 84 TextUses:83Used by:Timeline
Symbol 85 TextUses:83Used by:Timeline
Symbol 86 TextUses:83Used by:Timeline
Symbol 87 GraphicUsed by:92
Symbol 88 TextUses:30Used by:92
Symbol 89 TextUses:30Used by:92
Symbol 90 TextUses:30Used by:92
Symbol 91 TextUses:30Used by:92
Symbol 92 ButtonUses:87 88 89 90 91Used by:Timeline
Symbol 93 GraphicUses:8Used by:Timeline
Symbol 94 TextUses:83Used by:Timeline
Symbol 95 ButtonUses:77 78 79 80 81Used by:Timeline
Symbol 96 BitmapUsed by:97 167 422 454
Symbol 97 GraphicUses:96Used by:Timeline
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:100
Symbol 100 MovieClipUses:99Used by:113 117 122 126 144 148 152 156 160 164 242 244 246 248 252 254 256 258  Timeline
Symbol 101 GraphicUses:75Used by:103
Symbol 102 GraphicUses:75Used by:103
Symbol 103 ButtonUses:101 102Used by:Timeline
Symbol 104 GraphicUsed by:109
Symbol 105 FontUsed by:106 112 116 119 123 141 145 149 153 157 163
Symbol 106 TextUses:105Used by:109
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:109
Symbol 109 MovieClipUses:104 106 108Used by:Timeline
Symbol 110 BitmapUsed by:111
Symbol 111 GraphicUses:110Used by:113
Symbol 112 TextUses:105Used by:113
Symbol 113 MovieClipUses:111 112 100Used by:Timeline
Symbol 114 BitmapUsed by:115
Symbol 115 GraphicUses:114Used by:117
Symbol 116 TextUses:105Used by:117
Symbol 117 MovieClipUses:115 116 100Used by:Timeline
Symbol 118 GraphicUsed by:122 126 144 148 152 156 160
Symbol 119 TextUses:105Used by:122
Symbol 120 BitmapUsed by:121
Symbol 121 GraphicUses:120Used by:122
Symbol 122 MovieClipUses:118 119 121 100Used by:Timeline
Symbol 123 TextUses:105Used by:126
Symbol 124 BitmapUsed by:125
Symbol 125 GraphicUses:124Used by:126
Symbol 126 MovieClipUses:118 123 125 100Used by:Timeline
Symbol 127 GraphicUsed by:132
Symbol 128 FontUsed by:129 130 131 134 135 136 137 138 139 346 347 354 355 356 357 358 359 360 361 386 441 457 472 487 502 517 532 547 562 578
Symbol 129 TextUses:128Used by:132
Symbol 130 TextUses:128Used by:132
Symbol 131 EditableTextUses:128Used by:132
Symbol 132 MovieClipUses:127 129 130 131Used by:Timeline
Symbol 133 GraphicUsed by:140
Symbol 134 EditableTextUses:128Used by:140
Symbol 135 TextUses:128Used by:140
Symbol 136 EditableTextUses:128Used by:140
Symbol 137 TextUses:128Used by:140
Symbol 138 EditableTextUses:128Used by:140
Symbol 139 TextUses:128Used by:140
Symbol 140 MovieClipUses:133 134 135 136 137 138 139Used by:Timeline
Symbol 141 TextUses:105Used by:144
Symbol 142 BitmapUsed by:143
Symbol 143 GraphicUses:142Used by:144
Symbol 144 MovieClipUses:118 141 143 100Used by:Timeline
Symbol 145 TextUses:105Used by:148
Symbol 146 BitmapUsed by:147
Symbol 147 GraphicUses:146Used by:148
Symbol 148 MovieClipUses:118 145 147 100Used by:Timeline
Symbol 149 TextUses:105Used by:152
Symbol 150 BitmapUsed by:151
Symbol 151 GraphicUses:150Used by:152
Symbol 152 MovieClipUses:118 149 151 100Used by:Timeline
Symbol 153 TextUses:105Used by:156
Symbol 154 BitmapUsed by:155
Symbol 155 GraphicUses:154Used by:156
Symbol 156 MovieClipUses:118 153 155 100Used by:Timeline
Symbol 157 TextUses:105Used by:160
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:160
Symbol 160 MovieClipUses:118 157 159 100Used by:Timeline
Symbol 161 BitmapUsed by:162
Symbol 162 GraphicUses:161Used by:164
Symbol 163 TextUses:105Used by:164
Symbol 164 MovieClipUses:162 100 163Used by:Timeline
Symbol 165 TextUses:83Used by:Timeline
Symbol 166 TextUses:83Used by:Timeline
Symbol 167 GraphicUses:96Used by:Timeline
Symbol 168 FontUsed by:169 170 171 172 173 180 181 182 185 186 189 190 191 192 193 194 197 198 199 200 203 207 208 211
Symbol 169 TextUses:168Used by:Timeline
Symbol 170 EditableTextUses:168Used by:Timeline
Symbol 171 TextUses:168Used by:Timeline
Symbol 172 EditableTextUses:168Used by:Timeline
Symbol 173 TextUses:168Used by:Timeline
Symbol 174 GraphicUsed by:176 183 187 195 201 209
Symbol 175 GraphicUsed by:176 183 187 195 201 209
Symbol 176 ButtonUses:174 175Used by:Timeline
Symbol 177 GraphicUsed by:179 184 188 196 202 210
Symbol 178 GraphicUsed by:179 184 188 196 202 210
Symbol 179 ButtonUses:177 178Used by:Timeline
Symbol 180 TextUses:168Used by:Timeline
Symbol 181 EditableTextUses:168Used by:Timeline
Symbol 182 TextUses:168Used by:Timeline
Symbol 183 ButtonUses:174 175Used by:Timeline
Symbol 184 ButtonUses:177 178Used by:Timeline
Symbol 185 TextUses:168Used by:Timeline
Symbol 186 EditableTextUses:168Used by:Timeline
Symbol 187 ButtonUses:174 175Used by:Timeline
Symbol 188 ButtonUses:177 178Used by:Timeline
Symbol 189 TextUses:168Used by:Timeline
Symbol 190 TextUses:168Used by:Timeline
Symbol 191 TextUses:168Used by:Timeline
Symbol 192 TextUses:168Used by:Timeline
Symbol 193 EditableTextUses:168Used by:Timeline
Symbol 194 TextUses:168Used by:Timeline
Symbol 195 ButtonUses:174 175Used by:Timeline
Symbol 196 ButtonUses:177 178Used by:Timeline
Symbol 197 TextUses:168Used by:Timeline
Symbol 198 TextUses:168Used by:Timeline
Symbol 199 EditableTextUses:168Used by:Timeline
Symbol 200 TextUses:168Used by:Timeline
Symbol 201 ButtonUses:174 175Used by:Timeline
Symbol 202 ButtonUses:177 178Used by:Timeline
Symbol 203 TextUses:168Used by:Timeline
Symbol 204 GraphicUsed by:206 426
Symbol 205 GraphicUsed by:206 426
Symbol 206 ButtonUses:204 205Used by:Timeline
Symbol 207 TextUses:168Used by:Timeline
Symbol 208 EditableTextUses:168Used by:Timeline
Symbol 209 ButtonUses:174 175Used by:Timeline
Symbol 210 ButtonUses:177 178Used by:Timeline
Symbol 211 TextUses:168Used by:Timeline
Symbol 212 GraphicUsed by:213
Symbol 213 MovieClipUses:212Used by:Timeline
Symbol 214 GraphicUsed by:220 362
Symbol 215 FontUsed by:216 217 388 395 396 397 398 399 400 403 404 405 406 407 408 409 410 442 449 450 451 452 453 458 465 466 467 468 469 473 480 481 482 483 484 488 495 496 497 498 499 503 510 511 512 513 514 518 525 526 527 528 529 533 540 541 542 543 544 548 555 556 557 558 559 563 570 571 572 573 574 581 588 589 590 591 592
Symbol 216 TextUses:215Used by:220 362
Symbol 217 TextUses:215Used by:220 362
Symbol 218 GraphicUsed by:220 362
Symbol 219 GraphicUsed by:220 362
Symbol 220 ButtonUses:214 216 217 218 219Used by:Timeline
Symbol 221 BitmapUsed by:222
Symbol 222 GraphicUses:221Used by:Timeline
Symbol 223 GraphicUsed by:224
Symbol 224 MovieClipUses:223Used by:Timeline
Symbol 225 GraphicUsed by:228
Symbol 226 FontUsed by:227
Symbol 227 EditableTextUses:226Used by:228
Symbol 228 MovieClipUses:225 227Used by:Timeline
Symbol 229 GraphicUsed by:236
Symbol 230 GraphicUsed by:235
Symbol 231 GraphicUsed by:235
Symbol 232 GraphicUsed by:235
Symbol 233 GraphicUsed by:235
Symbol 234 GraphicUsed by:235
Symbol 235 MovieClipUses:230 231 232 233 234Used by:236 238 240 242 244 246 248 252 254 256 258 314
Symbol 236 MovieClipUses:229 235Used by:Timeline
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClipUses:237 235Used by:Timeline
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClipUses:235 239Used by:Timeline
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClipUses:241 235 100Used by:Timeline
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClipUses:243 235 100Used by:Timeline
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClipUses:245 235 100Used by:Timeline
Symbol 247 GraphicUsed by:248
Symbol 248 MovieClipUses:247 235 100Used by:Timeline
Symbol 249 GraphicUsed by:252
Symbol 250 GraphicUsed by:252
Symbol 251 GraphicUsed by:252
Symbol 252 MovieClipUses:249 250 251 235 100Used by:Timeline
Symbol 253 GraphicUsed by:254
Symbol 254 MovieClipUses:253 235 100Used by:Timeline
Symbol 255 GraphicUsed by:256
Symbol 256 MovieClipUses:255 235 100Used by:Timeline
Symbol 257 GraphicUsed by:258
Symbol 258 MovieClipUses:257 235 100Used by:Timeline
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:261
Symbol 261 MovieClipUses:260Used by:262
Symbol 262 MovieClipUses:261Used by:Timeline
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClipUses:263Used by:Timeline
Symbol 265 GraphicUsed by:267
Symbol 266 GraphicUsed by:267
Symbol 267 MovieClipUses:265 266Used by:Timeline
Symbol 268 BitmapUsed by:269 343
Symbol 269 GraphicUses:268Used by:272
Symbol 270 BitmapUsed by:271
Symbol 271 GraphicUses:270Used by:272
Symbol 272 MovieClipUses:269 271Used by:280
Symbol 273 BitmapUsed by:274
Symbol 274 GraphicUses:273Used by:280
Symbol 275 GraphicUsed by:280
Symbol 276 GraphicUsed by:280
Symbol 277 GraphicUsed by:280
Symbol 278 GraphicUsed by:280
Symbol 279 GraphicUsed by:280
Symbol 280 MovieClipUses:272 274 275 276 277 278 279Used by:Timeline
Symbol 281 BitmapUsed by:282
Symbol 282 GraphicUses:281Used by:289
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:289
Symbol 285 BitmapUsed by:286
Symbol 286 GraphicUses:285Used by:289
Symbol 287 BitmapUsed by:288
Symbol 288 GraphicUses:287Used by:289
Symbol 289 MovieClipUses:282 284 286 288Used by:Timeline
Symbol 290 BitmapUsed by:291
Symbol 291 GraphicUses:290Used by:310
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:310
Symbol 294 BitmapUsed by:295
Symbol 295 GraphicUses:294Used by:310
Symbol 296 BitmapUsed by:297
Symbol 297 GraphicUses:296Used by:310
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:310
Symbol 300 BitmapUsed by:301
Symbol 301 GraphicUses:300Used by:310
Symbol 302 BitmapUsed by:303
Symbol 303 GraphicUses:302Used by:310
Symbol 304 BitmapUsed by:305
Symbol 305 GraphicUses:304Used by:310
Symbol 306 BitmapUsed by:307
Symbol 307 GraphicUses:306Used by:310
Symbol 308 BitmapUsed by:309
Symbol 309 GraphicUses:308Used by:310
Symbol 310 MovieClipUses:291 293 295 297 299 301 303 305 307 309Used by:Timeline
Symbol 311 GraphicUsed by:312
Symbol 312 MovieClipUses:311Used by:Timeline
Symbol 313 GraphicUsed by:314
Symbol 314 MovieClipUses:313 235Used by:Timeline
Symbol 315 GraphicUsed by:316
Symbol 316 MovieClipUses:315Used by:Timeline
Symbol 317 GraphicUsed by:322
Symbol 318 GraphicUsed by:322
Symbol 319 GraphicUsed by:322
Symbol 320 GraphicUsed by:322
Symbol 321 GraphicUsed by:322
Symbol 322 MovieClipUses:317 318 319 320 321Used by:Timeline
Symbol 323 GraphicUsed by:324
Symbol 324 MovieClipUses:323Used by:Timeline
Symbol 325 ShapeTweeningUsed by:327
Symbol 326 GraphicUsed by:327
Symbol 327 MovieClipUses:325 326Used by:Timeline
Symbol 328 BitmapUsed by:329
Symbol 329 GraphicUses:328Used by:330
Symbol 330 MovieClipUses:329Used by:Timeline
Symbol 331 ShapeTweeningUsed by:333
Symbol 332 GraphicUsed by:333
Symbol 333 MovieClipUses:331 332Used by:Timeline
Symbol 334 ShapeTweeningUsed by:336
Symbol 335 GraphicUsed by:336
Symbol 336 MovieClipUses:334 335Used by:Timeline
Symbol 337 GraphicUsed by:338
Symbol 338 MovieClipUses:337Used by:Timeline
Symbol 339 ShapeTweeningUsed by:341
Symbol 340 GraphicUsed by:341
Symbol 341 MovieClipUses:339 340Used by:Timeline
Symbol 342 BitmapUsed by:343
Symbol 343 GraphicUses:268 342Used by:344
Symbol 344 MovieClipUses:343Used by:Timeline
Symbol 345 GraphicUsed by:353
Symbol 346 EditableTextUses:128Used by:353
Symbol 347 EditableTextUses:128Used by:353
Symbol 348 FontUsed by:349 414 416 418 419
Symbol 349 EditableTextUses:348Used by:350
Symbol 350 MovieClipUses:349Used by:353
Symbol 351 GraphicUsed by:352
Symbol 352 MovieClipUses:351Used by:353
Symbol 353 MovieClipUses:345 346 347 350 352Used by:Timeline
Symbol 354 TextUses:128Used by:Timeline
Symbol 355 TextUses:128Used by:Timeline
Symbol 356 TextUses:128Used by:Timeline
Symbol 357 TextUses:128Used by:Timeline
Symbol 358 TextUses:128Used by:Timeline
Symbol 359 TextUses:128Used by:Timeline
Symbol 360 TextUses:128Used by:Timeline
Symbol 361 TextUses:128Used by:Timeline
Symbol 362 ButtonUses:214 216 217 218 219Used by:Timeline
Symbol 363 BitmapUsed by:364
Symbol 364 GraphicUses:363Used by:371
Symbol 365 BitmapUsed by:366
Symbol 366 GraphicUses:365Used by:371
Symbol 367 BitmapUsed by:368
Symbol 368 GraphicUses:367Used by:371
Symbol 369 BitmapUsed by:370
Symbol 370 GraphicUses:369Used by:371
Symbol 371 MovieClipUses:364 366 368 370Used by:378
Symbol 372 GraphicUsed by:375
Symbol 373 GraphicUsed by:374
Symbol 374 MovieClipUses:373Used by:375
Symbol 375 MovieClipUses:372 374Used by:378
Symbol 376 GraphicUsed by:377
Symbol 377 MovieClipUses:376Used by:378
Symbol 378 MovieClipUses:371 375 377Used by:Timeline
Symbol 379 GraphicUsed by:380
Symbol 380 MovieClipUses:379Used by:Timeline
Symbol 381 MovieClipUses:33Used by:Timeline
Symbol 382 GraphicUsed by:384
Symbol 383 GraphicUsed by:384
Symbol 384 MovieClipUses:382 383Used by:Timeline
Symbol 385 GraphicUsed by:387
Symbol 386 EditableTextUses:128Used by:387
Symbol 387 MovieClipUses:385 386Used by:Timeline
Symbol 388 EditableTextUses:215Used by:Timeline
Symbol 389 FontUsed by:390 391 392 393 394 401 402 443 444 445 446 447 448 459 460 461 462 463 464 474 475 476 477 478 479 489 490 491 492 493 494 504 505 506 507 508 509 519 520 521 522 523 524 534 535 536 537 538 539 549 550 551 552 553 554 564 565 566 567 568 569 582 583 584 585 586 587
Symbol 390 EditableTextUses:389Used by:Timeline
Symbol 391 EditableTextUses:389Used by:Timeline
Symbol 392 EditableTextUses:389Used by:Timeline
Symbol 393 EditableTextUses:389Used by:Timeline
Symbol 394 EditableTextUses:389Used by:Timeline
Symbol 395 TextUses:215Used by:Timeline
Symbol 396 TextUses:215Used by:Timeline
Symbol 397 TextUses:215Used by:Timeline
Symbol 398 TextUses:215Used by:Timeline
Symbol 399 TextUses:215Used by:Timeline
Symbol 400 TextUses:215Used by:Timeline
Symbol 401 TextUses:389Used by:Timeline
Symbol 402 EditableTextUses:389Used by:Timeline
Symbol 403 EditableTextUses:215Used by:Timeline
Symbol 404 EditableTextUses:215Used by:Timeline
Symbol 405 TextUses:215Used by:Timeline
Symbol 406 TextUses:215Used by:Timeline
Symbol 407 TextUses:215Used by:Timeline
Symbol 408 EditableTextUses:215Used by:Timeline
Symbol 409 EditableTextUses:215Used by:Timeline
Symbol 410 EditableTextUses:215Used by:Timeline
Symbol 411 GraphicUsed by:412
Symbol 412 ButtonUses:411Used by:Timeline
Symbol 413 GraphicUsed by:421
Symbol 414 TextUses:348Used by:421
Symbol 415 GraphicUsed by:417 420
Symbol 416 TextUses:348Used by:417
Symbol 417 ButtonUses:415 416Used by:421
Symbol 418 TextUses:348Used by:420
Symbol 419 TextUses:348Used by:420
Symbol 420 ButtonUses:418 419 415Used by:421
Symbol 421 MovieClipUses:413 414 417 420Used by:Timeline
Symbol 422 GraphicUses:96Used by:Timeline
Symbol 423 TextUses:30Used by:Timeline
Symbol 424 EditableTextUses:30Used by:Timeline
Symbol 425 TextUses:30Used by:Timeline
Symbol 426 ButtonUses:204 205Used by:Timeline
Symbol 427 TextUses:30Used by:Timeline
Symbol 428 BitmapUsed by:429
Symbol 429 GraphicUses:428Used by:430
Symbol 430 ButtonUses:429Used by:Timeline
Symbol 431 BitmapUsed by:432
Symbol 432 GraphicUses:431Used by:433
Symbol 433 ButtonUses:432Used by:Timeline
Symbol 434 BitmapUsed by:435
Symbol 435 GraphicUses:434Used by:436
Symbol 436 ButtonUses:435Used by:Timeline
Symbol 437 TextUses:30Used by:Timeline
Symbol 438 TextUses:30Used by:Timeline
Symbol 439 EditableTextUses:30Used by:Timeline
Symbol 440 TextUses:30Used by:Timeline
Symbol 441 EditableTextUses:128Used by:Timeline
Symbol 442 EditableTextUses:215Used by:Timeline
Symbol 443 EditableTextUses:389Used by:Timeline
Symbol 444 EditableTextUses:389Used by:Timeline
Symbol 445 EditableTextUses:389Used by:Timeline
Symbol 446 EditableTextUses:389Used by:Timeline
Symbol 447 EditableTextUses:389Used by:Timeline
Symbol 448 EditableTextUses:389Used by:Timeline
Symbol 449 EditableTextUses:215Used by:Timeline
Symbol 450 EditableTextUses:215Used by:Timeline
Symbol 451 EditableTextUses:215Used by:Timeline
Symbol 452 EditableTextUses:215Used by:Timeline
Symbol 453 EditableTextUses:215Used by:Timeline
Symbol 454 GraphicUses:96Used by:Timeline
Symbol 455 EditableTextUses:30Used by:Timeline
Symbol 456 EditableTextUses:30Used by:Timeline
Symbol 457 EditableTextUses:128Used by:Timeline
Symbol 458 EditableTextUses:215Used by:Timeline
Symbol 459 EditableTextUses:389Used by:Timeline
Symbol 460 EditableTextUses:389Used by:Timeline
Symbol 461 EditableTextUses:389Used by:Timeline
Symbol 462 EditableTextUses:389Used by:Timeline
Symbol 463 EditableTextUses:389Used by:Timeline
Symbol 464 EditableTextUses:389Used by:Timeline
Symbol 465 EditableTextUses:215Used by:Timeline
Symbol 466 EditableTextUses:215Used by:Timeline
Symbol 467 EditableTextUses:215Used by:Timeline
Symbol 468 EditableTextUses:215Used by:Timeline
Symbol 469 EditableTextUses:215Used by:Timeline
Symbol 470 EditableTextUses:30Used by:Timeline
Symbol 471 EditableTextUses:30Used by:Timeline
Symbol 472 EditableTextUses:128Used by:Timeline
Symbol 473 EditableTextUses:215Used by:Timeline
Symbol 474 EditableTextUses:389Used by:Timeline
Symbol 475 EditableTextUses:389Used by:Timeline
Symbol 476 EditableTextUses:389Used by:Timeline
Symbol 477 EditableTextUses:389Used by:Timeline
Symbol 478 EditableTextUses:389Used by:Timeline
Symbol 479 EditableTextUses:389Used by:Timeline
Symbol 480 EditableTextUses:215Used by:Timeline
Symbol 481 EditableTextUses:215Used by:Timeline
Symbol 482 EditableTextUses:215Used by:Timeline
Symbol 483 EditableTextUses:215Used by:Timeline
Symbol 484 EditableTextUses:215Used by:Timeline
Symbol 485 EditableTextUses:30Used by:Timeline
Symbol 486 EditableTextUses:30Used by:Timeline
Symbol 487 EditableTextUses:128Used by:Timeline
Symbol 488 EditableTextUses:215Used by:Timeline
Symbol 489 EditableTextUses:389Used by:Timeline
Symbol 490 EditableTextUses:389Used by:Timeline
Symbol 491 EditableTextUses:389Used by:Timeline
Symbol 492 EditableTextUses:389Used by:Timeline
Symbol 493 EditableTextUses:389Used by:Timeline
Symbol 494 EditableTextUses:389Used by:Timeline
Symbol 495 EditableTextUses:215Used by:Timeline
Symbol 496 EditableTextUses:215Used by:Timeline
Symbol 497 EditableTextUses:215Used by:Timeline
Symbol 498 EditableTextUses:215Used by:Timeline
Symbol 499 EditableTextUses:215Used by:Timeline
Symbol 500 EditableTextUses:30Used by:Timeline
Symbol 501 EditableTextUses:30Used by:Timeline
Symbol 502 EditableTextUses:128Used by:Timeline
Symbol 503 EditableTextUses:215Used by:Timeline
Symbol 504 EditableTextUses:389Used by:Timeline
Symbol 505 EditableTextUses:389Used by:Timeline
Symbol 506 EditableTextUses:389Used by:Timeline
Symbol 507 EditableTextUses:389Used by:Timeline
Symbol 508 EditableTextUses:389Used by:Timeline
Symbol 509 EditableTextUses:389Used by:Timeline
Symbol 510 EditableTextUses:215Used by:Timeline
Symbol 511 EditableTextUses:215Used by:Timeline
Symbol 512 EditableTextUses:215Used by:Timeline
Symbol 513 EditableTextUses:215Used by:Timeline
Symbol 514 EditableTextUses:215Used by:Timeline
Symbol 515 EditableTextUses:30Used by:Timeline
Symbol 516 EditableTextUses:30Used by:Timeline
Symbol 517 EditableTextUses:128Used by:Timeline
Symbol 518 EditableTextUses:215Used by:Timeline
Symbol 519 EditableTextUses:389Used by:Timeline
Symbol 520 EditableTextUses:389Used by:Timeline
Symbol 521 EditableTextUses:389Used by:Timeline
Symbol 522 EditableTextUses:389Used by:Timeline
Symbol 523 EditableTextUses:389Used by:Timeline
Symbol 524 EditableTextUses:389Used by:Timeline
Symbol 525 EditableTextUses:215Used by:Timeline
Symbol 526 EditableTextUses:215Used by:Timeline
Symbol 527 EditableTextUses:215Used by:Timeline
Symbol 528 EditableTextUses:215Used by:Timeline
Symbol 529 EditableTextUses:215Used by:Timeline
Symbol 530 EditableTextUses:30Used by:Timeline
Symbol 531 EditableTextUses:30Used by:Timeline
Symbol 532 EditableTextUses:128Used by:Timeline
Symbol 533 EditableTextUses:215Used by:Timeline
Symbol 534 EditableTextUses:389Used by:Timeline
Symbol 535 EditableTextUses:389Used by:Timeline
Symbol 536 EditableTextUses:389Used by:Timeline
Symbol 537 EditableTextUses:389Used by:Timeline
Symbol 538 EditableTextUses:389Used by:Timeline
Symbol 539 EditableTextUses:389Used by:Timeline
Symbol 540 EditableTextUses:215Used by:Timeline
Symbol 541 EditableTextUses:215Used by:Timeline
Symbol 542 EditableTextUses:215Used by:Timeline
Symbol 543 EditableTextUses:215Used by:Timeline
Symbol 544 EditableTextUses:215Used by:Timeline
Symbol 545 EditableTextUses:30Used by:Timeline
Symbol 546 EditableTextUses:30Used by:Timeline
Symbol 547 EditableTextUses:128Used by:Timeline
Symbol 548 EditableTextUses:215Used by:Timeline
Symbol 549 EditableTextUses:389Used by:Timeline
Symbol 550 EditableTextUses:389Used by:Timeline
Symbol 551 EditableTextUses:389Used by:Timeline
Symbol 552 EditableTextUses:389Used by:Timeline
Symbol 553 EditableTextUses:389Used by:Timeline
Symbol 554 EditableTextUses:389Used by:Timeline
Symbol 555 EditableTextUses:215Used by:Timeline
Symbol 556 EditableTextUses:215Used by:Timeline
Symbol 557 EditableTextUses:215Used by:Timeline
Symbol 558 EditableTextUses:215Used by:Timeline
Symbol 559 EditableTextUses:215Used by:Timeline
Symbol 560 EditableTextUses:30Used by:Timeline
Symbol 561 EditableTextUses:30Used by:Timeline
Symbol 562 EditableTextUses:128Used by:Timeline
Symbol 563 EditableTextUses:215Used by:Timeline
Symbol 564 EditableTextUses:389Used by:Timeline
Symbol 565 EditableTextUses:389Used by:Timeline
Symbol 566 EditableTextUses:389Used by:Timeline
Symbol 567 EditableTextUses:389Used by:Timeline
Symbol 568 EditableTextUses:389Used by:Timeline
Symbol 569 EditableTextUses:389Used by:Timeline
Symbol 570 EditableTextUses:215Used by:Timeline
Symbol 571 EditableTextUses:215Used by:Timeline
Symbol 572 EditableTextUses:215Used by:Timeline
Symbol 573 EditableTextUses:215Used by:Timeline
Symbol 574 EditableTextUses:215Used by:Timeline
Symbol 575 GraphicUses:8Used by:Timeline
Symbol 576 EditableTextUses:30Used by:Timeline
Symbol 577 EditableTextUses:30Used by:Timeline
Symbol 578 EditableTextUses:128Used by:Timeline
Symbol 579 GraphicUses:8Used by:Timeline
Symbol 580 TextUses:83Used by:Timeline
Symbol 581 EditableTextUses:215Used by:Timeline
Symbol 582 EditableTextUses:389Used by:Timeline
Symbol 583 EditableTextUses:389Used by:Timeline
Symbol 584 EditableTextUses:389Used by:Timeline
Symbol 585 EditableTextUses:389Used by:Timeline
Symbol 586 EditableTextUses:389Used by:Timeline
Symbol 587 EditableTextUses:389Used by:Timeline
Symbol 588 EditableTextUses:215Used by:Timeline
Symbol 589 EditableTextUses:215Used by:Timeline
Symbol 590 EditableTextUses:215Used by:Timeline
Symbol 591 EditableTextUses:215Used by:Timeline
Symbol 592 EditableTextUses:215Used by:Timeline
Symbol 593 EditableTextUses:30Used by:Timeline
Streaming Sound 1Used by:Symbol 53 MovieClip

Instance Names

"adBox"Frame 1Symbol 11 MovieClip
"loading"Frame 1Symbol 28 MovieClip
"mainmenu"Frame 3Symbol 55 Button
"challengescore"Frame 7Symbol 132 MovieClip
"skillstats"Frame 7Symbol 140 MovieClip
"xpleft"Frame 8Symbol 170 EditableText
"attackskill"Frame 8Symbol 172 EditableText
"rangeskill"Frame 8Symbol 181 EditableText
"startmoneylevel"Frame 8Symbol 186 EditableText
"killbounty"Frame 8Symbol 193 EditableText
"gems"Frame 8Symbol 199 EditableText
"techlevel"Frame 8Symbol 208 EditableText
"background"Frame 9Symbol 213 MovieClip
"track1"Frame 9Symbol 224 MovieClip
"track2"Frame 9Symbol 224 MovieClip
"track3"Frame 9Symbol 224 MovieClip
"track4"Frame 9Symbol 224 MovieClip
"track5"Frame 9Symbol 224 MovieClip
"track6"Frame 9Symbol 224 MovieClip
"track7"Frame 9Symbol 224 MovieClip
"track8"Frame 9Symbol 224 MovieClip
"track9"Frame 9Symbol 224 MovieClip
"wp1"Frame 9Symbol 228 MovieClip
"wp2"Frame 9Symbol 228 MovieClip
"wp3"Frame 9Symbol 228 MovieClip
"wp4"Frame 9Symbol 228 MovieClip
"wp5"Frame 9Symbol 228 MovieClip
"wp6"Frame 9Symbol 228 MovieClip
"wp7"Frame 9Symbol 228 MovieClip
"wp8"Frame 9Symbol 228 MovieClip
"wp9"Frame 9Symbol 228 MovieClip
"wp10"Frame 9Symbol 228 MovieClip
"tower_basic"Frame 9Symbol 236 MovieClip
"shot"Frame 9Symbol 262 MovieClip
"range"Frame 9Symbol 264 MovieClip
"marker"Frame 9Symbol 267 MovieClip
"tower_splash"Frame 9Symbol 238 MovieClip
"redbullet"Frame 9Symbol 280 MovieClip
"explosion"Frame 9Symbol 289 MovieClip
"aftereffect"Frame 9Symbol 310 MovieClip
"tower_slow"Frame 9Symbol 240 MovieClip
"snowflake"Frame 9Symbol 312 MovieClip
"tower_rust"Frame 9Symbol 314 MovieClip
"yellowshot"Frame 9Symbol 316 MovieClip
"poisonball"Frame 9Symbol 322 MovieClip
"tower_poison"Frame 9Symbol 242 MovieClip
"tower_static"Frame 9Symbol 244 MovieClip
"light"Frame 9Symbol 324 MovieClip
"lighteffect"Frame 9Symbol 327 MovieClip
"tower_death"Frame 9Symbol 252 MovieClip
"deathbullet"Frame 9Symbol 330 MovieClip
"skull"Frame 9Symbol 333 MovieClip
"tower_stun"Frame 9Symbol 248 MovieClip
"blueshot"Frame 9Symbol 336 MovieClip
"tower_money"Frame 9Symbol 254 MovieClip
"moneyshot"Frame 9Symbol 338 MovieClip
"explodingshot"Frame 9Symbol 341 MovieClip
"tower_explode"Frame 9Symbol 256 MovieClip
"shockshot"Frame 9Symbol 336 MovieClip
"tower_shock"Frame 9Symbol 246 MovieClip
"tower_ultimate"Frame 9Symbol 258 MovieClip
"bigbomb"Frame 9Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 9Symbol 353 MovieClip
"creep1"Frame 9Symbol 378 MovieClip
"goldeffect"Frame 9Symbol 384 MovieClip
"tinfo"Frame 9Symbol 387 MovieClip
"lives"Frame 9Symbol 388 EditableText
"wave"Frame 9Symbol 390 EditableText
"nowhp"Frame 9Symbol 391 EditableText
"nowspeed"Frame 9Symbol 392 EditableText
"nexthp"Frame 9Symbol 393 EditableText
"nextspeed"Frame 9Symbol 394 EditableText
"wavemax"Frame 9Symbol 402 EditableText
"gold"Frame 9Symbol 403 EditableText
"timer"Frame 9Symbol 404 EditableText
"gems"Frame 9Symbol 408 EditableText
"score"Frame 9Symbol 410 EditableText
"quitbox"Frame 9Symbol 421 MovieClip
"score"Frame 10Symbol 424 EditableText
"score"Frame 11Symbol 439 EditableText
"skillgained"Frame 11Symbol 441 EditableText
"background"Frame 12Symbol 213 MovieClip
"wp11"Frame 12Symbol 228 MovieClip
"wp12"Frame 12Symbol 228 MovieClip
"wp13"Frame 12Symbol 228 MovieClip
"wp14"Frame 12Symbol 228 MovieClip
"track1"Frame 12Symbol 224 MovieClip
"track2"Frame 12Symbol 224 MovieClip
"track3"Frame 12Symbol 224 MovieClip
"track4"Frame 12Symbol 224 MovieClip
"track5"Frame 12Symbol 224 MovieClip
"track6"Frame 12Symbol 224 MovieClip
"track7"Frame 12Symbol 224 MovieClip
"track8"Frame 12Symbol 224 MovieClip
"track9"Frame 12Symbol 224 MovieClip
"wp1"Frame 12Symbol 228 MovieClip
"wp2"Frame 12Symbol 228 MovieClip
"wp3"Frame 12Symbol 228 MovieClip
"wp4"Frame 12Symbol 228 MovieClip
"wp5"Frame 12Symbol 228 MovieClip
"wp6"Frame 12Symbol 228 MovieClip
"wp7"Frame 12Symbol 228 MovieClip
"wp8"Frame 12Symbol 228 MovieClip
"wp9"Frame 12Symbol 228 MovieClip
"wp10"Frame 12Symbol 228 MovieClip
"track10"Frame 12Symbol 224 MovieClip
"track11"Frame 12Symbol 224 MovieClip
"track12"Frame 12Symbol 224 MovieClip
"track13"Frame 12Symbol 224 MovieClip
"tower_basic"Frame 12Symbol 236 MovieClip
"shot"Frame 12Symbol 262 MovieClip
"range"Frame 12Symbol 264 MovieClip
"marker"Frame 12Symbol 267 MovieClip
"tower_splash"Frame 12Symbol 238 MovieClip
"redbullet"Frame 12Symbol 280 MovieClip
"explosion"Frame 12Symbol 289 MovieClip
"aftereffect"Frame 12Symbol 310 MovieClip
"tower_slow"Frame 12Symbol 240 MovieClip
"snowflake"Frame 12Symbol 312 MovieClip
"tower_rust"Frame 12Symbol 314 MovieClip
"yellowshot"Frame 12Symbol 316 MovieClip
"poisonball"Frame 12Symbol 322 MovieClip
"tower_poison"Frame 12Symbol 242 MovieClip
"tower_static"Frame 12Symbol 244 MovieClip
"light"Frame 12Symbol 324 MovieClip
"lighteffect"Frame 12Symbol 327 MovieClip
"tower_death"Frame 12Symbol 252 MovieClip
"deathbullet"Frame 12Symbol 330 MovieClip
"skull"Frame 12Symbol 333 MovieClip
"tower_stun"Frame 12Symbol 248 MovieClip
"blueshot"Frame 12Symbol 336 MovieClip
"tower_money"Frame 12Symbol 254 MovieClip
"moneyshot"Frame 12Symbol 338 MovieClip
"explodingshot"Frame 12Symbol 341 MovieClip
"tower_explode"Frame 12Symbol 256 MovieClip
"shockshot"Frame 12Symbol 336 MovieClip
"tower_shock"Frame 12Symbol 246 MovieClip
"tower_ultimate"Frame 12Symbol 258 MovieClip
"bigbomb"Frame 12Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 12Symbol 353 MovieClip
"creep1"Frame 12Symbol 378 MovieClip
"goldeffect"Frame 12Symbol 384 MovieClip
"tinfo"Frame 12Symbol 387 MovieClip
"lives"Frame 12Symbol 442 EditableText
"wave"Frame 12Symbol 443 EditableText
"nowhp"Frame 12Symbol 444 EditableText
"nowspeed"Frame 12Symbol 445 EditableText
"nexthp"Frame 12Symbol 446 EditableText
"nextspeed"Frame 12Symbol 447 EditableText
"wavemax"Frame 12Symbol 448 EditableText
"gold"Frame 12Symbol 449 EditableText
"timer"Frame 12Symbol 450 EditableText
"gems"Frame 12Symbol 451 EditableText
"score"Frame 12Symbol 453 EditableText
"quitbox"Frame 12Symbol 421 MovieClip
"score"Frame 13Symbol 455 EditableText
"score"Frame 14Symbol 456 EditableText
"skillgained"Frame 14Symbol 457 EditableText
"background"Frame 15Symbol 213 MovieClip
"wp11"Frame 15Symbol 228 MovieClip
"wp12"Frame 15Symbol 228 MovieClip
"track1"Frame 15Symbol 224 MovieClip
"track2"Frame 15Symbol 224 MovieClip
"track3"Frame 15Symbol 224 MovieClip
"track4"Frame 15Symbol 224 MovieClip
"track5"Frame 15Symbol 224 MovieClip
"track6"Frame 15Symbol 224 MovieClip
"track7"Frame 15Symbol 224 MovieClip
"track8"Frame 15Symbol 224 MovieClip
"track9"Frame 15Symbol 224 MovieClip
"wp1"Frame 15Symbol 228 MovieClip
"wp2"Frame 15Symbol 228 MovieClip
"wp3"Frame 15Symbol 228 MovieClip
"wp4"Frame 15Symbol 228 MovieClip
"wp5"Frame 15Symbol 228 MovieClip
"wp6"Frame 15Symbol 228 MovieClip
"wp7"Frame 15Symbol 228 MovieClip
"wp8"Frame 15Symbol 228 MovieClip
"wp9"Frame 15Symbol 228 MovieClip
"wp10"Frame 15Symbol 228 MovieClip
"track10"Frame 15Symbol 224 MovieClip
"track11"Frame 15Symbol 224 MovieClip
"tower_basic"Frame 15Symbol 236 MovieClip
"shot"Frame 15Symbol 262 MovieClip
"range"Frame 15Symbol 264 MovieClip
"marker"Frame 15Symbol 267 MovieClip
"tower_splash"Frame 15Symbol 238 MovieClip
"redbullet"Frame 15Symbol 280 MovieClip
"explosion"Frame 15Symbol 289 MovieClip
"aftereffect"Frame 15Symbol 310 MovieClip
"tower_slow"Frame 15Symbol 240 MovieClip
"snowflake"Frame 15Symbol 312 MovieClip
"tower_rust"Frame 15Symbol 314 MovieClip
"yellowshot"Frame 15Symbol 316 MovieClip
"poisonball"Frame 15Symbol 322 MovieClip
"tower_poison"Frame 15Symbol 242 MovieClip
"tower_static"Frame 15Symbol 244 MovieClip
"light"Frame 15Symbol 324 MovieClip
"lighteffect"Frame 15Symbol 327 MovieClip
"tower_death"Frame 15Symbol 252 MovieClip
"deathbullet"Frame 15Symbol 330 MovieClip
"skull"Frame 15Symbol 333 MovieClip
"tower_stun"Frame 15Symbol 248 MovieClip
"blueshot"Frame 15Symbol 336 MovieClip
"tower_money"Frame 15Symbol 254 MovieClip
"moneyshot"Frame 15Symbol 338 MovieClip
"explodingshot"Frame 15Symbol 341 MovieClip
"tower_explode"Frame 15Symbol 256 MovieClip
"shockshot"Frame 15Symbol 336 MovieClip
"tower_shock"Frame 15Symbol 246 MovieClip
"tower_ultimate"Frame 15Symbol 258 MovieClip
"bigbomb"Frame 15Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 15Symbol 353 MovieClip
"creep1"Frame 15Symbol 378 MovieClip
"goldeffect"Frame 15Symbol 384 MovieClip
"tinfo"Frame 15Symbol 387 MovieClip
"lives"Frame 15Symbol 458 EditableText
"wave"Frame 15Symbol 459 EditableText
"nowhp"Frame 15Symbol 460 EditableText
"nowspeed"Frame 15Symbol 461 EditableText
"nexthp"Frame 15Symbol 462 EditableText
"nextspeed"Frame 15Symbol 463 EditableText
"wavemax"Frame 15Symbol 464 EditableText
"gold"Frame 15Symbol 465 EditableText
"timer"Frame 15Symbol 466 EditableText
"gems"Frame 15Symbol 467 EditableText
"score"Frame 15Symbol 469 EditableText
"quitbox"Frame 15Symbol 421 MovieClip
"score"Frame 16Symbol 470 EditableText
"score"Frame 17Symbol 471 EditableText
"skillgained"Frame 17Symbol 472 EditableText
"background"Frame 18Symbol 213 MovieClip
"wp11"Frame 18Symbol 228 MovieClip
"wp12"Frame 18Symbol 228 MovieClip
"track1"Frame 18Symbol 224 MovieClip
"track2"Frame 18Symbol 224 MovieClip
"track3"Frame 18Symbol 224 MovieClip
"track4"Frame 18Symbol 224 MovieClip
"track5"Frame 18Symbol 224 MovieClip
"track6"Frame 18Symbol 224 MovieClip
"track7"Frame 18Symbol 224 MovieClip
"track8"Frame 18Symbol 224 MovieClip
"track9"Frame 18Symbol 224 MovieClip
"wp1"Frame 18Symbol 228 MovieClip
"wp2"Frame 18Symbol 228 MovieClip
"wp3"Frame 18Symbol 228 MovieClip
"wp4"Frame 18Symbol 228 MovieClip
"wp5"Frame 18Symbol 228 MovieClip
"wp6"Frame 18Symbol 228 MovieClip
"wp7"Frame 18Symbol 228 MovieClip
"wp8"Frame 18Symbol 228 MovieClip
"wp9"Frame 18Symbol 228 MovieClip
"wp10"Frame 18Symbol 228 MovieClip
"track10"Frame 18Symbol 224 MovieClip
"track11"Frame 18Symbol 224 MovieClip
"tower_basic"Frame 18Symbol 236 MovieClip
"shot"Frame 18Symbol 262 MovieClip
"range"Frame 18Symbol 264 MovieClip
"marker"Frame 18Symbol 267 MovieClip
"tower_splash"Frame 18Symbol 238 MovieClip
"redbullet"Frame 18Symbol 280 MovieClip
"explosion"Frame 18Symbol 289 MovieClip
"aftereffect"Frame 18Symbol 310 MovieClip
"tower_slow"Frame 18Symbol 240 MovieClip
"snowflake"Frame 18Symbol 312 MovieClip
"tower_rust"Frame 18Symbol 314 MovieClip
"yellowshot"Frame 18Symbol 316 MovieClip
"poisonball"Frame 18Symbol 322 MovieClip
"tower_poison"Frame 18Symbol 242 MovieClip
"tower_static"Frame 18Symbol 244 MovieClip
"light"Frame 18Symbol 324 MovieClip
"lighteffect"Frame 18Symbol 327 MovieClip
"tower_death"Frame 18Symbol 252 MovieClip
"deathbullet"Frame 18Symbol 330 MovieClip
"skull"Frame 18Symbol 333 MovieClip
"tower_stun"Frame 18Symbol 248 MovieClip
"blueshot"Frame 18Symbol 336 MovieClip
"tower_money"Frame 18Symbol 254 MovieClip
"moneyshot"Frame 18Symbol 338 MovieClip
"explodingshot"Frame 18Symbol 341 MovieClip
"tower_explode"Frame 18Symbol 256 MovieClip
"shockshot"Frame 18Symbol 336 MovieClip
"tower_shock"Frame 18Symbol 246 MovieClip
"tower_ultimate"Frame 18Symbol 258 MovieClip
"bigbomb"Frame 18Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 18Symbol 353 MovieClip
"creep1"Frame 18Symbol 378 MovieClip
"goldeffect"Frame 18Symbol 384 MovieClip
"tinfo"Frame 18Symbol 387 MovieClip
"lives"Frame 18Symbol 473 EditableText
"wave"Frame 18Symbol 474 EditableText
"nowhp"Frame 18Symbol 475 EditableText
"nowspeed"Frame 18Symbol 476 EditableText
"nexthp"Frame 18Symbol 477 EditableText
"nextspeed"Frame 18Symbol 478 EditableText
"wavemax"Frame 18Symbol 479 EditableText
"gold"Frame 18Symbol 480 EditableText
"timer"Frame 18Symbol 481 EditableText
"gems"Frame 18Symbol 482 EditableText
"score"Frame 18Symbol 484 EditableText
"quitbox"Frame 18Symbol 421 MovieClip
"score"Frame 19Symbol 485 EditableText
"score"Frame 20Symbol 486 EditableText
"skillgained"Frame 20Symbol 487 EditableText
"background"Frame 21Symbol 213 MovieClip
"wp11"Frame 21Symbol 228 MovieClip
"wp12"Frame 21Symbol 228 MovieClip
"track13"Frame 21Symbol 224 MovieClip
"wp13"Frame 21Symbol 228 MovieClip
"wp14"Frame 21Symbol 228 MovieClip
"track1"Frame 21Symbol 224 MovieClip
"track2"Frame 21Symbol 224 MovieClip
"track3"Frame 21Symbol 224 MovieClip
"track4"Frame 21Symbol 224 MovieClip
"track5"Frame 21Symbol 224 MovieClip
"track6"Frame 21Symbol 224 MovieClip
"track7"Frame 21Symbol 224 MovieClip
"track8"Frame 21Symbol 224 MovieClip
"track9"Frame 21Symbol 224 MovieClip
"wp1"Frame 21Symbol 228 MovieClip
"wp2"Frame 21Symbol 228 MovieClip
"wp3"Frame 21Symbol 228 MovieClip
"wp4"Frame 21Symbol 228 MovieClip
"wp5"Frame 21Symbol 228 MovieClip
"wp6"Frame 21Symbol 228 MovieClip
"wp7"Frame 21Symbol 228 MovieClip
"wp8"Frame 21Symbol 228 MovieClip
"wp9"Frame 21Symbol 228 MovieClip
"wp10"Frame 21Symbol 228 MovieClip
"track10"Frame 21Symbol 224 MovieClip
"track11"Frame 21Symbol 224 MovieClip
"track12"Frame 21Symbol 224 MovieClip
"tower_basic"Frame 21Symbol 236 MovieClip
"shot"Frame 21Symbol 262 MovieClip
"range"Frame 21Symbol 264 MovieClip
"marker"Frame 21Symbol 267 MovieClip
"tower_splash"Frame 21Symbol 238 MovieClip
"redbullet"Frame 21Symbol 280 MovieClip
"explosion"Frame 21Symbol 289 MovieClip
"aftereffect"Frame 21Symbol 310 MovieClip
"tower_slow"Frame 21Symbol 240 MovieClip
"snowflake"Frame 21Symbol 312 MovieClip
"tower_rust"Frame 21Symbol 314 MovieClip
"yellowshot"Frame 21Symbol 316 MovieClip
"poisonball"Frame 21Symbol 322 MovieClip
"tower_poison"Frame 21Symbol 242 MovieClip
"tower_static"Frame 21Symbol 244 MovieClip
"light"Frame 21Symbol 324 MovieClip
"lighteffect"Frame 21Symbol 327 MovieClip
"tower_death"Frame 21Symbol 252 MovieClip
"deathbullet"Frame 21Symbol 330 MovieClip
"skull"Frame 21Symbol 333 MovieClip
"tower_stun"Frame 21Symbol 248 MovieClip
"blueshot"Frame 21Symbol 336 MovieClip
"tower_money"Frame 21Symbol 254 MovieClip
"moneyshot"Frame 21Symbol 338 MovieClip
"explodingshot"Frame 21Symbol 341 MovieClip
"tower_explode"Frame 21Symbol 256 MovieClip
"shockshot"Frame 21Symbol 336 MovieClip
"tower_shock"Frame 21Symbol 246 MovieClip
"tower_ultimate"Frame 21Symbol 258 MovieClip
"bigbomb"Frame 21Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 21Symbol 353 MovieClip
"creep1"Frame 21Symbol 378 MovieClip
"goldeffect"Frame 21Symbol 384 MovieClip
"tinfo"Frame 21Symbol 387 MovieClip
"lives"Frame 21Symbol 488 EditableText
"wave"Frame 21Symbol 489 EditableText
"nowhp"Frame 21Symbol 490 EditableText
"nowspeed"Frame 21Symbol 491 EditableText
"nexthp"Frame 21Symbol 492 EditableText
"nextspeed"Frame 21Symbol 493 EditableText
"wavemax"Frame 21Symbol 494 EditableText
"gold"Frame 21Symbol 495 EditableText
"timer"Frame 21Symbol 496 EditableText
"gems"Frame 21Symbol 497 EditableText
"score"Frame 21Symbol 499 EditableText
"quitbox"Frame 21Symbol 421 MovieClip
"score"Frame 22Symbol 500 EditableText
"score"Frame 23Symbol 501 EditableText
"skillgained"Frame 23Symbol 502 EditableText
"background"Frame 24Symbol 213 MovieClip
"track1"Frame 24Symbol 224 MovieClip
"track2"Frame 24Symbol 224 MovieClip
"track3"Frame 24Symbol 224 MovieClip
"track4"Frame 24Symbol 224 MovieClip
"track5"Frame 24Symbol 224 MovieClip
"track6"Frame 24Symbol 224 MovieClip
"track7"Frame 24Symbol 224 MovieClip
"track8"Frame 24Symbol 224 MovieClip
"track9"Frame 24Symbol 224 MovieClip
"wp1"Frame 24Symbol 228 MovieClip
"wp2"Frame 24Symbol 228 MovieClip
"wp3"Frame 24Symbol 228 MovieClip
"wp4"Frame 24Symbol 228 MovieClip
"wp5"Frame 24Symbol 228 MovieClip
"wp6"Frame 24Symbol 228 MovieClip
"wp7"Frame 24Symbol 228 MovieClip
"wp8"Frame 24Symbol 228 MovieClip
"wp9"Frame 24Symbol 228 MovieClip
"wp10"Frame 24Symbol 228 MovieClip
"tower_basic"Frame 24Symbol 236 MovieClip
"shot"Frame 24Symbol 262 MovieClip
"range"Frame 24Symbol 264 MovieClip
"marker"Frame 24Symbol 267 MovieClip
"tower_splash"Frame 24Symbol 238 MovieClip
"redbullet"Frame 24Symbol 280 MovieClip
"explosion"Frame 24Symbol 289 MovieClip
"aftereffect"Frame 24Symbol 310 MovieClip
"tower_slow"Frame 24Symbol 240 MovieClip
"snowflake"Frame 24Symbol 312 MovieClip
"tower_rust"Frame 24Symbol 314 MovieClip
"yellowshot"Frame 24Symbol 316 MovieClip
"poisonball"Frame 24Symbol 322 MovieClip
"tower_poison"Frame 24Symbol 242 MovieClip
"tower_static"Frame 24Symbol 244 MovieClip
"light"Frame 24Symbol 324 MovieClip
"lighteffect"Frame 24Symbol 327 MovieClip
"tower_death"Frame 24Symbol 252 MovieClip
"deathbullet"Frame 24Symbol 330 MovieClip
"skull"Frame 24Symbol 333 MovieClip
"tower_stun"Frame 24Symbol 248 MovieClip
"blueshot"Frame 24Symbol 336 MovieClip
"tower_money"Frame 24Symbol 254 MovieClip
"moneyshot"Frame 24Symbol 338 MovieClip
"explodingshot"Frame 24Symbol 341 MovieClip
"tower_explode"Frame 24Symbol 256 MovieClip
"shockshot"Frame 24Symbol 336 MovieClip
"tower_shock"Frame 24Symbol 246 MovieClip
"tower_ultimate"Frame 24Symbol 258 MovieClip
"bigbomb"Frame 24Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 24Symbol 353 MovieClip
"creep1"Frame 24Symbol 378 MovieClip
"goldeffect"Frame 24Symbol 384 MovieClip
"tinfo"Frame 24Symbol 387 MovieClip
"lives"Frame 24Symbol 503 EditableText
"wave"Frame 24Symbol 504 EditableText
"nowhp"Frame 24Symbol 505 EditableText
"nowspeed"Frame 24Symbol 506 EditableText
"nexthp"Frame 24Symbol 507 EditableText
"nextspeed"Frame 24Symbol 508 EditableText
"wavemax"Frame 24Symbol 509 EditableText
"gold"Frame 24Symbol 510 EditableText
"timer"Frame 24Symbol 511 EditableText
"gems"Frame 24Symbol 512 EditableText
"score"Frame 24Symbol 514 EditableText
"quitbox"Frame 24Symbol 421 MovieClip
"score"Frame 25Symbol 515 EditableText
"score"Frame 26Symbol 516 EditableText
"skillgained"Frame 26Symbol 517 EditableText
"background"Frame 27Symbol 213 MovieClip
"track1"Frame 27Symbol 224 MovieClip
"track2"Frame 27Symbol 224 MovieClip
"track3"Frame 27Symbol 224 MovieClip
"track4"Frame 27Symbol 224 MovieClip
"track5"Frame 27Symbol 224 MovieClip
"track6"Frame 27Symbol 224 MovieClip
"track7"Frame 27Symbol 224 MovieClip
"track8"Frame 27Symbol 224 MovieClip
"track9"Frame 27Symbol 224 MovieClip
"wp1"Frame 27Symbol 228 MovieClip
"wp2"Frame 27Symbol 228 MovieClip
"wp3"Frame 27Symbol 228 MovieClip
"wp4"Frame 27Symbol 228 MovieClip
"wp5"Frame 27Symbol 228 MovieClip
"wp6"Frame 27Symbol 228 MovieClip
"wp7"Frame 27Symbol 228 MovieClip
"wp8"Frame 27Symbol 228 MovieClip
"wp9"Frame 27Symbol 228 MovieClip
"wp10"Frame 27Symbol 228 MovieClip
"track10"Frame 27Symbol 224 MovieClip
"track11"Frame 27Symbol 224 MovieClip
"track12"Frame 27Symbol 224 MovieClip
"track13"Frame 27Symbol 224 MovieClip
"wp11"Frame 27Symbol 228 MovieClip
"wp12"Frame 27Symbol 228 MovieClip
"wp13"Frame 27Symbol 228 MovieClip
"wp14"Frame 27Symbol 228 MovieClip
"tower_basic"Frame 27Symbol 236 MovieClip
"shot"Frame 27Symbol 262 MovieClip
"range"Frame 27Symbol 264 MovieClip
"marker"Frame 27Symbol 267 MovieClip
"tower_splash"Frame 27Symbol 238 MovieClip
"redbullet"Frame 27Symbol 280 MovieClip
"explosion"Frame 27Symbol 289 MovieClip
"aftereffect"Frame 27Symbol 310 MovieClip
"tower_slow"Frame 27Symbol 240 MovieClip
"snowflake"Frame 27Symbol 312 MovieClip
"tower_rust"Frame 27Symbol 314 MovieClip
"yellowshot"Frame 27Symbol 316 MovieClip
"poisonball"Frame 27Symbol 322 MovieClip
"tower_poison"Frame 27Symbol 242 MovieClip
"tower_static"Frame 27Symbol 244 MovieClip
"light"Frame 27Symbol 324 MovieClip
"lighteffect"Frame 27Symbol 327 MovieClip
"tower_death"Frame 27Symbol 252 MovieClip
"deathbullet"Frame 27Symbol 330 MovieClip
"skull"Frame 27Symbol 333 MovieClip
"tower_stun"Frame 27Symbol 248 MovieClip
"blueshot"Frame 27Symbol 336 MovieClip
"tower_money"Frame 27Symbol 254 MovieClip
"moneyshot"Frame 27Symbol 338 MovieClip
"explodingshot"Frame 27Symbol 341 MovieClip
"tower_explode"Frame 27Symbol 256 MovieClip
"shockshot"Frame 27Symbol 336 MovieClip
"tower_shock"Frame 27Symbol 246 MovieClip
"tower_ultimate"Frame 27Symbol 258 MovieClip
"bigbomb"Frame 27Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 27Symbol 353 MovieClip
"creep1"Frame 27Symbol 378 MovieClip
"goldeffect"Frame 27Symbol 384 MovieClip
"tinfo"Frame 27Symbol 387 MovieClip
"lives"Frame 27Symbol 518 EditableText
"wave"Frame 27Symbol 519 EditableText
"nowhp"Frame 27Symbol 520 EditableText
"nowspeed"Frame 27Symbol 521 EditableText
"nexthp"Frame 27Symbol 522 EditableText
"nextspeed"Frame 27Symbol 523 EditableText
"wavemax"Frame 27Symbol 524 EditableText
"gold"Frame 27Symbol 525 EditableText
"timer"Frame 27Symbol 526 EditableText
"gems"Frame 27Symbol 527 EditableText
"score"Frame 27Symbol 529 EditableText
"quitbox"Frame 27Symbol 421 MovieClip
"score"Frame 28Symbol 530 EditableText
"score"Frame 29Symbol 531 EditableText
"skillgained"Frame 29Symbol 532 EditableText
"background"Frame 30Symbol 213 MovieClip
"track1"Frame 30Symbol 224 MovieClip
"track2"Frame 30Symbol 224 MovieClip
"track3"Frame 30Symbol 224 MovieClip
"track4"Frame 30Symbol 224 MovieClip
"track5"Frame 30Symbol 224 MovieClip
"track6"Frame 30Symbol 224 MovieClip
"track7"Frame 30Symbol 224 MovieClip
"track8"Frame 30Symbol 224 MovieClip
"track9"Frame 30Symbol 224 MovieClip
"wp1"Frame 30Symbol 228 MovieClip
"wp2"Frame 30Symbol 228 MovieClip
"wp3"Frame 30Symbol 228 MovieClip
"wp4"Frame 30Symbol 228 MovieClip
"wp5"Frame 30Symbol 228 MovieClip
"wp6"Frame 30Symbol 228 MovieClip
"wp7"Frame 30Symbol 228 MovieClip
"wp8"Frame 30Symbol 228 MovieClip
"wp9"Frame 30Symbol 228 MovieClip
"wp10"Frame 30Symbol 228 MovieClip
"track10"Frame 30Symbol 224 MovieClip
"track11"Frame 30Symbol 224 MovieClip
"track12"Frame 30Symbol 224 MovieClip
"track13"Frame 30Symbol 224 MovieClip
"wp11"Frame 30Symbol 228 MovieClip
"wp12"Frame 30Symbol 228 MovieClip
"wp13"Frame 30Symbol 228 MovieClip
"wp14"Frame 30Symbol 228 MovieClip
"tower_basic"Frame 30Symbol 236 MovieClip
"shot"Frame 30Symbol 262 MovieClip
"range"Frame 30Symbol 264 MovieClip
"marker"Frame 30Symbol 267 MovieClip
"tower_splash"Frame 30Symbol 238 MovieClip
"redbullet"Frame 30Symbol 280 MovieClip
"explosion"Frame 30Symbol 289 MovieClip
"aftereffect"Frame 30Symbol 310 MovieClip
"tower_slow"Frame 30Symbol 240 MovieClip
"snowflake"Frame 30Symbol 312 MovieClip
"tower_rust"Frame 30Symbol 314 MovieClip
"yellowshot"Frame 30Symbol 316 MovieClip
"poisonball"Frame 30Symbol 322 MovieClip
"tower_poison"Frame 30Symbol 242 MovieClip
"tower_static"Frame 30Symbol 244 MovieClip
"light"Frame 30Symbol 324 MovieClip
"lighteffect"Frame 30Symbol 327 MovieClip
"tower_death"Frame 30Symbol 252 MovieClip
"deathbullet"Frame 30Symbol 330 MovieClip
"skull"Frame 30Symbol 333 MovieClip
"tower_stun"Frame 30Symbol 248 MovieClip
"blueshot"Frame 30Symbol 336 MovieClip
"tower_money"Frame 30Symbol 254 MovieClip
"moneyshot"Frame 30Symbol 338 MovieClip
"explodingshot"Frame 30Symbol 341 MovieClip
"tower_explode"Frame 30Symbol 256 MovieClip
"shockshot"Frame 30Symbol 336 MovieClip
"tower_shock"Frame 30Symbol 246 MovieClip
"tower_ultimate"Frame 30Symbol 258 MovieClip
"bigbomb"Frame 30Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 30Symbol 353 MovieClip
"creep1"Frame 30Symbol 378 MovieClip
"goldeffect"Frame 30Symbol 384 MovieClip
"tinfo"Frame 30Symbol 387 MovieClip
"lives"Frame 30Symbol 533 EditableText
"wave"Frame 30Symbol 534 EditableText
"nowhp"Frame 30Symbol 535 EditableText
"nowspeed"Frame 30Symbol 536 EditableText
"nexthp"Frame 30Symbol 537 EditableText
"nextspeed"Frame 30Symbol 538 EditableText
"wavemax"Frame 30Symbol 539 EditableText
"gold"Frame 30Symbol 540 EditableText
"timer"Frame 30Symbol 541 EditableText
"gems"Frame 30Symbol 542 EditableText
"score"Frame 30Symbol 544 EditableText
"quitbox"Frame 30Symbol 421 MovieClip
"score"Frame 31Symbol 545 EditableText
"score"Frame 32Symbol 546 EditableText
"skillgained"Frame 32Symbol 547 EditableText
"background"Frame 33Symbol 213 MovieClip
"track1"Frame 33Symbol 224 MovieClip
"track2"Frame 33Symbol 224 MovieClip
"track3"Frame 33Symbol 224 MovieClip
"track4"Frame 33Symbol 224 MovieClip
"track5"Frame 33Symbol 224 MovieClip
"track6"Frame 33Symbol 224 MovieClip
"track7"Frame 33Symbol 224 MovieClip
"track8"Frame 33Symbol 224 MovieClip
"track9"Frame 33Symbol 224 MovieClip
"wp1"Frame 33Symbol 228 MovieClip
"wp2"Frame 33Symbol 228 MovieClip
"wp3"Frame 33Symbol 228 MovieClip
"wp4"Frame 33Symbol 228 MovieClip
"wp5"Frame 33Symbol 228 MovieClip
"wp6"Frame 33Symbol 228 MovieClip
"wp7"Frame 33Symbol 228 MovieClip
"wp8"Frame 33Symbol 228 MovieClip
"wp9"Frame 33Symbol 228 MovieClip
"wp10"Frame 33Symbol 228 MovieClip
"track10"Frame 33Symbol 224 MovieClip
"track11"Frame 33Symbol 224 MovieClip
"track12"Frame 33Symbol 224 MovieClip
"track13"Frame 33Symbol 224 MovieClip
"wp11"Frame 33Symbol 228 MovieClip
"wp12"Frame 33Symbol 228 MovieClip
"wp13"Frame 33Symbol 228 MovieClip
"wp14"Frame 33Symbol 228 MovieClip
"tower_basic"Frame 33Symbol 236 MovieClip
"shot"Frame 33Symbol 262 MovieClip
"range"Frame 33Symbol 264 MovieClip
"marker"Frame 33Symbol 267 MovieClip
"tower_splash"Frame 33Symbol 238 MovieClip
"redbullet"Frame 33Symbol 280 MovieClip
"explosion"Frame 33Symbol 289 MovieClip
"aftereffect"Frame 33Symbol 310 MovieClip
"tower_slow"Frame 33Symbol 240 MovieClip
"snowflake"Frame 33Symbol 312 MovieClip
"tower_rust"Frame 33Symbol 314 MovieClip
"yellowshot"Frame 33Symbol 316 MovieClip
"poisonball"Frame 33Symbol 322 MovieClip
"tower_poison"Frame 33Symbol 242 MovieClip
"tower_static"Frame 33Symbol 244 MovieClip
"light"Frame 33Symbol 324 MovieClip
"lighteffect"Frame 33Symbol 327 MovieClip
"tower_death"Frame 33Symbol 252 MovieClip
"deathbullet"Frame 33Symbol 330 MovieClip
"skull"Frame 33Symbol 333 MovieClip
"tower_stun"Frame 33Symbol 248 MovieClip
"blueshot"Frame 33Symbol 336 MovieClip
"tower_money"Frame 33Symbol 254 MovieClip
"moneyshot"Frame 33Symbol 338 MovieClip
"explodingshot"Frame 33Symbol 341 MovieClip
"tower_explode"Frame 33Symbol 256 MovieClip
"shockshot"Frame 33Symbol 336 MovieClip
"tower_shock"Frame 33Symbol 246 MovieClip
"tower_ultimate"Frame 33Symbol 258 MovieClip
"bigbomb"Frame 33Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 33Symbol 353 MovieClip
"creep1"Frame 33Symbol 378 MovieClip
"goldeffect"Frame 33Symbol 384 MovieClip
"tinfo"Frame 33Symbol 387 MovieClip
"lives"Frame 33Symbol 548 EditableText
"wave"Frame 33Symbol 549 EditableText
"nowhp"Frame 33Symbol 550 EditableText
"nowspeed"Frame 33Symbol 551 EditableText
"nexthp"Frame 33Symbol 552 EditableText
"nextspeed"Frame 33Symbol 553 EditableText
"wavemax"Frame 33Symbol 554 EditableText
"gold"Frame 33Symbol 555 EditableText
"timer"Frame 33Symbol 556 EditableText
"gems"Frame 33Symbol 557 EditableText
"score"Frame 33Symbol 559 EditableText
"quitbox"Frame 33Symbol 421 MovieClip
"score"Frame 34Symbol 560 EditableText
"score"Frame 35Symbol 561 EditableText
"skillgained"Frame 35Symbol 562 EditableText
"background"Frame 36Symbol 213 MovieClip
"track1"Frame 36Symbol 224 MovieClip
"track2"Frame 36Symbol 224 MovieClip
"track3"Frame 36Symbol 224 MovieClip
"track4"Frame 36Symbol 224 MovieClip
"track5"Frame 36Symbol 224 MovieClip
"track6"Frame 36Symbol 224 MovieClip
"track7"Frame 36Symbol 224 MovieClip
"track8"Frame 36Symbol 224 MovieClip
"track9"Frame 36Symbol 224 MovieClip
"wp1"Frame 36Symbol 228 MovieClip
"wp2"Frame 36Symbol 228 MovieClip
"wp3"Frame 36Symbol 228 MovieClip
"wp4"Frame 36Symbol 228 MovieClip
"wp5"Frame 36Symbol 228 MovieClip
"wp6"Frame 36Symbol 228 MovieClip
"wp7"Frame 36Symbol 228 MovieClip
"wp8"Frame 36Symbol 228 MovieClip
"wp9"Frame 36Symbol 228 MovieClip
"wp10"Frame 36Symbol 228 MovieClip
"track10"Frame 36Symbol 224 MovieClip
"track11"Frame 36Symbol 224 MovieClip
"track12"Frame 36Symbol 224 MovieClip
"track13"Frame 36Symbol 224 MovieClip
"wp11"Frame 36Symbol 228 MovieClip
"wp12"Frame 36Symbol 228 MovieClip
"wp13"Frame 36Symbol 228 MovieClip
"wp14"Frame 36Symbol 228 MovieClip
"track14"Frame 36Symbol 224 MovieClip
"track15"Frame 36Symbol 224 MovieClip
"track16"Frame 36Symbol 224 MovieClip
"track17"Frame 36Symbol 224 MovieClip
"wp15"Frame 36Symbol 228 MovieClip
"wp16"Frame 36Symbol 228 MovieClip
"wp17"Frame 36Symbol 228 MovieClip
"wp18"Frame 36Symbol 228 MovieClip
"tower_basic"Frame 36Symbol 236 MovieClip
"shot"Frame 36Symbol 262 MovieClip
"range"Frame 36Symbol 264 MovieClip
"marker"Frame 36Symbol 267 MovieClip
"tower_splash"Frame 36Symbol 238 MovieClip
"redbullet"Frame 36Symbol 280 MovieClip
"explosion"Frame 36Symbol 289 MovieClip
"aftereffect"Frame 36Symbol 310 MovieClip
"tower_slow"Frame 36Symbol 240 MovieClip
"snowflake"Frame 36Symbol 312 MovieClip
"tower_rust"Frame 36Symbol 314 MovieClip
"yellowshot"Frame 36Symbol 316 MovieClip
"poisonball"Frame 36Symbol 322 MovieClip
"tower_poison"Frame 36Symbol 242 MovieClip
"tower_static"Frame 36Symbol 244 MovieClip
"light"Frame 36Symbol 324 MovieClip
"lighteffect"Frame 36Symbol 327 MovieClip
"tower_death"Frame 36Symbol 252 MovieClip
"deathbullet"Frame 36Symbol 330 MovieClip
"skull"Frame 36Symbol 333 MovieClip
"tower_stun"Frame 36Symbol 248 MovieClip
"blueshot"Frame 36Symbol 336 MovieClip
"tower_money"Frame 36Symbol 254 MovieClip
"moneyshot"Frame 36Symbol 338 MovieClip
"explodingshot"Frame 36Symbol 341 MovieClip
"tower_explode"Frame 36Symbol 256 MovieClip
"shockshot"Frame 36Symbol 336 MovieClip
"tower_shock"Frame 36Symbol 246 MovieClip
"tower_ultimate"Frame 36Symbol 258 MovieClip
"bigbomb"Frame 36Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 36Symbol 353 MovieClip
"creep1"Frame 36Symbol 378 MovieClip
"goldeffect"Frame 36Symbol 384 MovieClip
"tinfo"Frame 36Symbol 387 MovieClip
"lives"Frame 36Symbol 563 EditableText
"wave"Frame 36Symbol 564 EditableText
"nowhp"Frame 36Symbol 565 EditableText
"nowspeed"Frame 36Symbol 566 EditableText
"nexthp"Frame 36Symbol 567 EditableText
"nextspeed"Frame 36Symbol 568 EditableText
"wavemax"Frame 36Symbol 569 EditableText
"gold"Frame 36Symbol 570 EditableText
"timer"Frame 36Symbol 571 EditableText
"gems"Frame 36Symbol 572 EditableText
"score"Frame 36Symbol 574 EditableText
"quitbox"Frame 36Symbol 421 MovieClip
"score"Frame 37Symbol 576 EditableText
"score"Frame 38Symbol 577 EditableText
"skillgained"Frame 38Symbol 578 EditableText
"background"Frame 40Symbol 213 MovieClip
"tower_basic"Frame 40Symbol 236 MovieClip
"shot"Frame 40Symbol 262 MovieClip
"range"Frame 40Symbol 264 MovieClip
"marker"Frame 40Symbol 267 MovieClip
"tower_splash"Frame 40Symbol 238 MovieClip
"redbullet"Frame 40Symbol 280 MovieClip
"explosion"Frame 40Symbol 289 MovieClip
"aftereffect"Frame 40Symbol 310 MovieClip
"tower_slow"Frame 40Symbol 240 MovieClip
"snowflake"Frame 40Symbol 312 MovieClip
"tower_rust"Frame 40Symbol 314 MovieClip
"yellowshot"Frame 40Symbol 316 MovieClip
"poisonball"Frame 40Symbol 322 MovieClip
"tower_poison"Frame 40Symbol 242 MovieClip
"tower_static"Frame 40Symbol 244 MovieClip
"light"Frame 40Symbol 324 MovieClip
"lighteffect"Frame 40Symbol 327 MovieClip
"tower_death"Frame 40Symbol 252 MovieClip
"deathbullet"Frame 40Symbol 330 MovieClip
"skull"Frame 40Symbol 333 MovieClip
"tower_stun"Frame 40Symbol 248 MovieClip
"blueshot"Frame 40Symbol 336 MovieClip
"tower_money"Frame 40Symbol 254 MovieClip
"moneyshot"Frame 40Symbol 338 MovieClip
"explodingshot"Frame 40Symbol 341 MovieClip
"tower_explode"Frame 40Symbol 256 MovieClip
"shockshot"Frame 40Symbol 336 MovieClip
"tower_shock"Frame 40Symbol 246 MovieClip
"tower_ultimate"Frame 40Symbol 258 MovieClip
"bigbomb"Frame 40Symbol 344 MovieClip
"UpgradeTowerInfo"Frame 40Symbol 353 MovieClip
"creep1"Frame 40Symbol 378 MovieClip
"goldeffect"Frame 40Symbol 384 MovieClip
"tinfo"Frame 40Symbol 387 MovieClip
"lives"Frame 40Symbol 581 EditableText
"wave"Frame 40Symbol 582 EditableText
"nowhp"Frame 40Symbol 583 EditableText
"nowspeed"Frame 40Symbol 584 EditableText
"nexthp"Frame 40Symbol 585 EditableText
"nextspeed"Frame 40Symbol 586 EditableText
"wavemax"Frame 40Symbol 587 EditableText
"gold"Frame 40Symbol 588 EditableText
"timer"Frame 40Symbol 589 EditableText
"gems"Frame 40Symbol 590 EditableText
"score"Frame 40Symbol 592 EditableText
"quitbox"Frame 40Symbol 421 MovieClip
"track1"Frame 40Symbol 224 MovieClip
"track2"Frame 40Symbol 224 MovieClip
"track3"Frame 40Symbol 224 MovieClip
"track4"Frame 40Symbol 224 MovieClip
"track5"Frame 40Symbol 224 MovieClip
"track6"Frame 40Symbol 224 MovieClip
"track7"Frame 40Symbol 224 MovieClip
"track8"Frame 40Symbol 224 MovieClip
"track9"Frame 40Symbol 224 MovieClip
"wp1"Frame 40Symbol 228 MovieClip
"wp2"Frame 40Symbol 228 MovieClip
"wp3"Frame 40Symbol 228 MovieClip
"wp4"Frame 40Symbol 228 MovieClip
"wp5"Frame 40Symbol 228 MovieClip
"wp6"Frame 40Symbol 228 MovieClip
"wp7"Frame 40Symbol 228 MovieClip
"wp8"Frame 40Symbol 228 MovieClip
"wp9"Frame 40Symbol 228 MovieClip
"wp10"Frame 40Symbol 228 MovieClip
"track10"Frame 40Symbol 224 MovieClip
"track11"Frame 40Symbol 224 MovieClip
"track12"Frame 40Symbol 224 MovieClip
"track13"Frame 40Symbol 224 MovieClip
"wp11"Frame 40Symbol 228 MovieClip
"wp12"Frame 40Symbol 228 MovieClip
"wp13"Frame 40Symbol 228 MovieClip
"wp14"Frame 40Symbol 228 MovieClip
"score"Frame 41Symbol 593 EditableText
"bar"Symbol 28 MovieClip Frame 1Symbol 13 MovieClip
"level11score"Symbol 132 MovieClip Frame 1Symbol 131 EditableText
"lvlmax"Symbol 140 MovieClip Frame 1Symbol 134 EditableText
"lvlscore"Symbol 140 MovieClip Frame 1Symbol 136 EditableText
"lvlgain"Symbol 140 MovieClip Frame 1Symbol 138 EditableText
"levelicon"Symbol 236 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 238 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 240 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 242 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 244 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 246 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 248 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 252 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 254 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 256 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 258 MovieClip Frame 1Symbol 235 MovieClip
"levelicon"Symbol 314 MovieClip Frame 1Symbol 235 MovieClip
"UpgradeButtonText"Symbol 350 MovieClip Frame 1Symbol 349 EditableText
"TowerInfoText"Symbol 353 MovieClip Frame 1Symbol 346 EditableText
"UpgradeInfoText"Symbol 353 MovieClip Frame 1Symbol 347 EditableText
"UpgradeButton"Symbol 353 MovieClip Frame 1Symbol 350 MovieClip
"sellbutton"Symbol 353 MovieClip Frame 1Symbol 350 MovieClip
"xsymbol"Symbol 353 MovieClip Frame 1Symbol 352 MovieClip
"health"Symbol 375 MovieClip Frame 1Symbol 374 MovieClip
"creep"Symbol 378 MovieClip Frame 1Symbol 371 MovieClip
"health_bar"Symbol 378 MovieClip Frame 1Symbol 375 MovieClip
"by"Symbol 387 MovieClip Frame 1Symbol 386 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 1 as "sndrocket"
ExportAssets (56)Timeline Frame 1Symbol 2 as "sndplasma"
ExportAssets (56)Timeline Frame 1Symbol 3 as "sndlaser"
ExportAssets (56)Timeline Frame 1Symbol 4 as "sndexplode"
ExportAssets (56)Timeline Frame 1Symbol 5 as "sndbullet1"
ExportAssets (56)Timeline Frame 1Symbol 6 as "sndbullet"
ExportAssets (56)Timeline Frame 1Symbol 7 as "explod04.wav"
ExportAssets (56)Timeline Frame 1Symbol 594 as "__Packages.mochi.as2.MochiSync"
ExportAssets (56)Timeline Frame 1Symbol 595 as "__Packages.mochi.as2.MochiServices"
ExportAssets (56)Timeline Frame 1Symbol 596 as "__Packages.mochi.as2.MochiEventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 597 as "__Packages.mochi.as2.MochiEvents"
ExportAssets (56)Timeline Frame 1Symbol 598 as "__Packages.mochi.as2.MochiSocial"
ExportAssets (56)Timeline Frame 1Symbol 599 as "__Packages.mochi.as2.MochiScores"
ExportAssets (56)Timeline Frame 1Symbol 600 as "__Packages.mochi.as2.MochiDigits"
ExportAssets (56)Timeline Frame 3Symbol 71 as "music2"
ExportAssets (56)Timeline Frame 3Symbol 72 as "music"

Labels

"theintro"Frame 2
"mainmenu"Frame 3
"instr"Frame 4
"credits"Frame 5
"story"Frame 6
"levelselect"Frame 7
"skillshop"Frame 8
"level1"Frame 9
"lose1"Frame 10
"win1"Frame 11
"level2"Frame 12
"lose2"Frame 13
"win2"Frame 14
"level3"Frame 15
"lose3"Frame 16
"win3"Frame 17
"level4"Frame 18
"lose4"Frame 19
"win4"Frame 20
"level5"Frame 21
"lose5"Frame 22
"win5"Frame 23
"level6"Frame 24
"lose6"Frame 25
"win6"Frame 26
"level7"Frame 27
"lose7"Frame 28
"win7"Frame 29
"level8"Frame 30
"lose8"Frame 31
"win8"Frame 32
"level9"Frame 33
"lose9"Frame 34
"win9"Frame 35
"level10"Frame 36
"lose10"Frame 37
"win10"Frame 38
"endstory"Frame 39
"level11"Frame 40
"lose11"Frame 41
"loaded"Symbol 28 MovieClip Frame 2

Dynamic Text Variables

_root.level11scoreSymbol 131 EditableText""
_root.lvlmaxSymbol 134 EditableText""
_root.lvlscoreSymbol 136 EditableText""
_root.lvlgainSymbol 138 EditableText""
_root.xpleftSymbol 170 EditableText""
_root.attackskillSymbol 172 EditableText""
_root.rangeskillSymbol 181 EditableText""
_root.startmoneylevelSymbol 186 EditableText""
_root.killbountySymbol 193 EditableText""
_root.gemsSymbol 199 EditableText""
_root.techlevelSymbol 208 EditableText""
_root.buyinfoSymbol 386 EditableText""
_root.livesSymbol 388 EditableText""
_root.waveSymbol 390 EditableText""
nowhpSymbol 391 EditableText""
nowspeedSymbol 392 EditableText""
nexthpSymbol 393 EditableText""
nextspeedSymbol 394 EditableText""
wavemaxSymbol 402 EditableText"60"
goldSymbol 403 EditableText""
_root.timerSymbol 404 EditableText""
gemsSymbol 408 EditableText""
scoreSymbol 410 EditableText"<p align="left"></p>"
scoreSymbol 424 EditableText"<p align="left"></p>"
scoreSymbol 439 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 441 EditableText""
_root.livesSymbol 442 EditableText""
_root.waveSymbol 443 EditableText""
nowhpSymbol 444 EditableText""
nowspeedSymbol 445 EditableText""
nexthpSymbol 446 EditableText""
nextspeedSymbol 447 EditableText""
wavemaxSymbol 448 EditableText"60"
goldSymbol 449 EditableText""
_root.timerSymbol 450 EditableText""
gemsSymbol 451 EditableText""
scoreSymbol 453 EditableText"<p align="left"></p>"
scoreSymbol 455 EditableText"<p align="left"></p>"
scoreSymbol 456 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 457 EditableText""
_root.livesSymbol 458 EditableText""
_root.waveSymbol 459 EditableText""
nowhpSymbol 460 EditableText""
nowspeedSymbol 461 EditableText""
nexthpSymbol 462 EditableText""
nextspeedSymbol 463 EditableText""
wavemaxSymbol 464 EditableText"60"
goldSymbol 465 EditableText""
_root.timerSymbol 466 EditableText""
gemsSymbol 467 EditableText""
scoreSymbol 469 EditableText"<p align="left"></p>"
scoreSymbol 470 EditableText"<p align="left"></p>"
scoreSymbol 471 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 472 EditableText""
_root.livesSymbol 473 EditableText""
_root.waveSymbol 474 EditableText""
nowhpSymbol 475 EditableText""
nowspeedSymbol 476 EditableText""
nexthpSymbol 477 EditableText""
nextspeedSymbol 478 EditableText""
wavemaxSymbol 479 EditableText"60"
goldSymbol 480 EditableText""
_root.timerSymbol 481 EditableText""
gemsSymbol 482 EditableText""
scoreSymbol 484 EditableText"<p align="left"></p>"
scoreSymbol 485 EditableText"<p align="left"></p>"
scoreSymbol 486 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 487 EditableText""
_root.livesSymbol 488 EditableText""
_root.waveSymbol 489 EditableText""
nowhpSymbol 490 EditableText""
nowspeedSymbol 491 EditableText""
nexthpSymbol 492 EditableText""
nextspeedSymbol 493 EditableText""
wavemaxSymbol 494 EditableText"60"
goldSymbol 495 EditableText""
_root.timerSymbol 496 EditableText""
gemsSymbol 497 EditableText""
scoreSymbol 499 EditableText"<p align="left"></p>"
scoreSymbol 500 EditableText"<p align="left"></p>"
scoreSymbol 501 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 502 EditableText""
_root.livesSymbol 503 EditableText""
_root.waveSymbol 504 EditableText""
nowhpSymbol 505 EditableText""
nowspeedSymbol 506 EditableText""
nexthpSymbol 507 EditableText""
nextspeedSymbol 508 EditableText""
wavemaxSymbol 509 EditableText"60"
goldSymbol 510 EditableText""
_root.timerSymbol 511 EditableText""
gemsSymbol 512 EditableText""
scoreSymbol 514 EditableText"<p align="left"></p>"
scoreSymbol 515 EditableText"<p align="left"></p>"
scoreSymbol 516 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 517 EditableText""
_root.livesSymbol 518 EditableText""
_root.waveSymbol 519 EditableText""
nowhpSymbol 520 EditableText""
nowspeedSymbol 521 EditableText""
nexthpSymbol 522 EditableText""
nextspeedSymbol 523 EditableText""
wavemaxSymbol 524 EditableText"60"
goldSymbol 525 EditableText""
_root.timerSymbol 526 EditableText""
gemsSymbol 527 EditableText""
scoreSymbol 529 EditableText"<p align="left"></p>"
scoreSymbol 530 EditableText"<p align="left"></p>"
scoreSymbol 531 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 532 EditableText""
_root.livesSymbol 533 EditableText""
_root.waveSymbol 534 EditableText""
nowhpSymbol 535 EditableText""
nowspeedSymbol 536 EditableText""
nexthpSymbol 537 EditableText""
nextspeedSymbol 538 EditableText""
wavemaxSymbol 539 EditableText"60"
goldSymbol 540 EditableText""
_root.timerSymbol 541 EditableText""
gemsSymbol 542 EditableText""
scoreSymbol 544 EditableText"<p align="left"></p>"
scoreSymbol 545 EditableText"<p align="left"></p>"
scoreSymbol 546 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 547 EditableText""
_root.livesSymbol 548 EditableText""
_root.waveSymbol 549 EditableText""
nowhpSymbol 550 EditableText""
nowspeedSymbol 551 EditableText""
nexthpSymbol 552 EditableText""
nextspeedSymbol 553 EditableText""
wavemaxSymbol 554 EditableText"60"
goldSymbol 555 EditableText""
_root.timerSymbol 556 EditableText""
gemsSymbol 557 EditableText""
scoreSymbol 559 EditableText"<p align="left"></p>"
scoreSymbol 560 EditableText"<p align="left"></p>"
scoreSymbol 561 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 562 EditableText""
_root.livesSymbol 563 EditableText""
_root.waveSymbol 564 EditableText""
nowhpSymbol 565 EditableText""
nowspeedSymbol 566 EditableText""
nexthpSymbol 567 EditableText""
nextspeedSymbol 568 EditableText""
wavemaxSymbol 569 EditableText"60"
goldSymbol 570 EditableText""
_root.timerSymbol 571 EditableText""
gemsSymbol 572 EditableText""
scoreSymbol 574 EditableText"<p align="left"></p>"
scoreSymbol 576 EditableText"<p align="left"></p>"
scoreSymbol 577 EditableText"<p align="left"></p>"
_root.skillgainedSymbol 578 EditableText""
_root.livesSymbol 581 EditableText""
_root.waveSymbol 582 EditableText""
nowhpSymbol 583 EditableText""
nowspeedSymbol 584 EditableText""
nexthpSymbol 585 EditableText""
nextspeedSymbol 586 EditableText""
wavemaxSymbol 587 EditableText"60"
goldSymbol 588 EditableText""
_root.timerSymbol 589 EditableText""
gemsSymbol 590 EditableText""
scoreSymbol 592 EditableText"<p align="left"></p>"
scoreSymbol 593 EditableText"<p align="left"></p>"




http://swfchan.com/19/90999/info.shtml
Created: 28/3 -2019 03:31:01 Last modified: 28/3 -2019 03:31:01 Server time: 22/12 -2024 08:32:18