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/43689596?noj=FRM43689596-22DC" width="1" height="1"></div>

RPG Tower Defense.swf

This is the info page for
Flash #42601

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


Text
Loading....

Play More Games!

Normal - 50
Hard - 40
Insane - 30
Sandbox - 500

Max Tower Levels

Next Song

Previous Song

Mute Audio

U             Upgrades tower to max level
that you can afford

S             Sell Tower

1-5          Select tower type

Controls

Are you sure you want to reset?

NO

YES

Prayer points

0

120

Next Enemy Type : Normal

120

Sell Value - 000

Range - 000

Damage - 000

Level - 000

Normal

Tower Info Goes Here

Type of tower

00

Enemy HP

60

25

Lives

300

0000

Gold

Score

0

Level

Score = 211

Thanks for playing Normal Mode.
Was this too easy for you? Try a harder mode!

0

120

Next Enemy Type : Normal

120

Sell Value - 000

Range - 000

Damage - 000

Level - 000

Hard

Tower Info Goes Here

Type of tower

00

60

25

300

0000

0

Score = 211

Thanks for playing Hard Mode
Ready for insane?

0

120

Next Enemy Type : Normal

120

Sell Value - 000

Range - 000

Damage - 000

Level - 000

Insane

Tower Info Goes Here

Type of tower

00

60

25

300

0000

0

Score = 211

Thanks for playing Insane Mode.

99999

120

Next Enemy Type : Normal

120

Sell Value - 000

Range - 000

Damage - 000

Level - 000

Sandbox

Tower Info Goes Here

Type of tower

00

60

25

999999

0000

0

Score = 211

Thanks for playing "Sandbox Mode".
I hope you had fun practicing your strategies :)

ActionScript [AS3]

Section 1
//MainTimeline (Flash_RPG_TD_fla.MainTimeline) package Flash_RPG_TD_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.text.*; import flash.utils.*; import flash.system.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var NPH_AngelsOfDeath:Array; public var NPS_Bullets:Array; public var NPH_MouseEvent:MouseEvent; public var NP_Lives:int; public var text_gold:TextField; public var tower_select_arcane:MovieClip; public var NPH_Map:Array; public var restart_sure:MovieClip; public var NP_GameLevel:Number; public var NPH_GameLevel:Number; public var end_nopath_hard_score:TextField; public var pagedelay:int; public var NPH_selectedtowertype:String; public var text_tower_range:TextField; public var tower_select_arrow:MovieClip; public var NPS_LastWave:Number; public var NPS_PlacedMine:Boolean; public var NP_Path:Array; public var play_game_np_insane:MovieClip; public var NPI_Buildings:Array; public var play_game_np_sandbox:MovieClip; public var restart_yes:MovieClip; public var NPS_AngelsOfDeath:Array; public var end_nopath_sandbox_score:TextField; public var NPS_Judgement:Array; public var NPS_ButtonClick:buttonclick; public var NPH_GoldUpdateSpeed:Number; public var text_score:TextField; public var text_tower_sell:TextField; public var NP_Prayer:Number; public var play_game_np_hard:MovieClip; public var NPS_Gold:Number; public var NPH_PrayerUpdateSpeed:Number; public var NPH_ButtonClick:buttonclick; public var text_next_level:TextField; public var NPS_channel:SoundChannel; public var text_next_gold:TextField; public var NPS_EnemyDie:Sound; public var NPS_GameScore:int; public var play_game_hard:MovieClip; public var NPI_Muted:Boolean; public var NPS_Blizzards:Array; public var NP_HealthBars:Array; public var NPS_WaveDelay:Number; public var NP_AngelsOfDeath:Array; public var NPI_selectedtowertype:String; public var NP_Bullets:Array; public var NPI_Bullets:Array; public var play_game:MovieClip; public var lastpage:int; public var play_game_30min:MovieClip; public var NPH_Lives:int; public var NPS_MapStart; public var NP_LastPrayerUpdate:Number; public var NPH_Towers:Array; public var NPS_gamemode:String; public var NPI_AngelsOfDeath:Array; public var NP_ButtonClick:buttonclick; public var sponsor_mini:MovieClip; public var NPS_Muted:Boolean; public var NPH_Gold:Number; public var NPS_Ambient1:ambient_1; public var NPS_Ambient2:ambient_2; public var play_game_np_normal:MovieClip; public var NPS_Ambient5:ambient_5; public var NPS_Ambient4:ambient_4; public var NPH_HealthBars:Array; public var NPI_MapEnd; public var NPS_Ambient3:ambient_3; public var buy_judgement:MovieClip; public var NP_Judgement:Array; public var NPS_Enemies:Array; public var text_next_prayer:TextField; public var NPH_Judgement:Array; public var text_towerinfo:TextField; public var play_game_sandbox:MovieClip; public var buy_blizzard:MovieClip; public var text_tower_level:TextField; public var NPI_PlacedMine:Boolean; public var NPS_Map:Array; public var tower_select_cannon:MovieClip; public var NPS_GoldUpdateSpeed:Number; public var NPI_Gold:Number; public var drawonme:MovieClip; public var NPI_PrayerUpdateSpeed:Number; public var NPH_LastEnemyType:Number; public var musicright:MovieClip; public var NPH_Bullets:Array; public var NPI_GameLevel:Number; public var NPS_MapEnd; public var play_game_10min:MovieClip; public var text_tower_damage:TextField; public var text_prayer:TextField; public var NPS_MouseEvent:MouseEvent; public var NPH_SelectedTower:Number; public var end_nopath_score:TextField; public var NP_GameScore:int; public var playbutton:MovieClip; public var NPH_GameScore:int; public var menu_playmore:MovieClip; public var NP_Blizzards:Array; public var NP_channel:SoundChannel; public var NPI_channel:SoundChannel; public var NPH_Blizzards:Array; public var play_game_insane:MovieClip; public var NPS_selectedtowertype:String; public var musicleft:MovieClip; public var NP_WaveDelay:Number; public var NPH_WaveDelay:Number; public var tower_select_ice:MovieClip; public var NP_PlacedChurch:Boolean; public var sponsorlogo:MovieClip; public var NP_Towers:Array; public var NP_PausedTimer1:Number; public var sell_tower:MovieClip; public var NPS_LastEnemyType:Number; public var NP_PausedTimer2:Number; public var NP_GoldUpdateSpeed:Number; public var text_enemy_hp:TextField; public var NPH_LastWave:Number; public var NPS_Buildings:Array; public var NPS_SelectedTower:Number; public var NP_selectedtowertype:String; public var buy_angel_death:MovieClip; public var NPI_Prayer:Number; public var NP_Enemies:Array; public var NPH_channel:SoundChannel; public var NP_Muted:Boolean; public var NPS_PrayerUpdateSpeed:Number; public var NPI_CurrentSong:int; public var NPI_Enemies:Array; public var pausebutton:MovieClip; public var NP_LastWave:Number; public var NP_LastGoldUpdate:Number; public var NP_Gold:Number; public var NP_PlacedMine:Boolean; public var NPS_Path:Array; public var NP_LastEnemyType:Number; public var NPS_LastPrayerUpdate:Number; public var NPI_LastGoldUpdate:Number; public var text_towertype:TextField; public var NPS_Prayer:Number; public var NP_PrayerUpdateSpeed:Number; public var NPH_PlacedChurch:Boolean; public var NP_Map:Array; public var NPI_LastWave:Number; public var play_game_normal:MovieClip; public var NPH_PausedTimer1:Number; public var NPH_PausedTimer2:Number; public var NP_SelectedTower:Number; public var NPI_LastEnemyType:Number; public var NPI_Judgement:Array; public var NPH_PlacedMine:Boolean; public var NPI_Lives:int; public var NPH_EnemyDie:Sound; public var buy_church:MovieClip; public var NPS_HealthBars:Array; public var NPI_SelectedTower:Number; public var NPH_MapEnd; public var NPS_CurrentSong:int; public var NPH_Enemies:Array; public var NPI_MouseEvent:MouseEvent; public var select_mine:MovieClip; public var musicmute:MovieClip; public var NPH_LastPrayerUpdate:Number; public var NP_EnemyDie:Sound; public var NPH_MapStart; public var NP_Buildings:Array; public var NPH_Buildings:Array; public var NPH_gamemode:String; public var restart_no:MovieClip; public var text_level:TextField; public var NPS_Lives:int; public var end_nopath_insane_score:TextField; public var NPH_CurrentSong:int; public var NPH_Ambient5:ambient_5; public var NPH_Ambient2:ambient_2; public var NPH_Ambient3:ambient_3; public var NPH_Ambient4:ambient_4; public var NPH_Path:Array; public var NPH_Ambient1:ambient_1; public var NPI_GameScore:int; public var NPI_Blizzards:Array; public var NP_MapStart; public var NPI_EnemyDie:Sound; public var NP_gamemode:String; public var NPI_WaveDelay:Number; public var NPH_Muted:Boolean; public var NP_Ambient1:ambient_1; public var NP_Ambient2:ambient_2; public var NP_Ambient3:ambient_3; public var NP_Ambient4:ambient_4; public var NP_Ambient5:ambient_5; public var NPS_GameLevel:Number; public var NPI_Path:Array; public var play_game_5min:MovieClip; public var nextlevelbutton:MovieClip; public var NPI_GoldUpdateSpeed:Number; public var NPI_PlacedChurch:Boolean; public var NPI_PausedTimer1:Number; public var NPI_PausedTimer2:Number; public var NPI_MapStart; public var NPI_gamemode:String; public var NP_CurrentSong:int; public var NPS_PlacedChurch:Boolean; public var NP_MapEnd; public var NPI_Towers:Array; public var upgrade_tower:MovieClip; public var NPS_PausedTimer1:Number; public var NPS_PausedTimer2:Number; public var NPI_Ambient2:ambient_2; public var NPI_Ambient3:ambient_3; public var NPI_Ambient4:ambient_4; public var NPI_Ambient5:ambient_5; public var NPH_LastGoldUpdate:Number; public var NPI_Ambient1:ambient_1; public var restart_button:MovieClip; public var tower_select_fire:MovieClip; public var text_lives:TextField; public var text_nexttype:TextField; public var NPH_Prayer:Number; public var NP_MouseEvent:MouseEvent; public var NPI_Map:Array; public var NPS_LastGoldUpdate:Number; public var NPI_HealthBars:Array; public var NPS_Towers:Array; public var TheGrid1:MovieClip; public var NPI_LastPrayerUpdate:Number; public var NPI_ButtonClick:buttonclick; public function MainTimeline(){ addFrameScript(0, frame1, 4, frame5, 9, frame10, 94, frame95, 99, frame100, 104, frame105, 109, frame110, 114, frame115, 119, frame120, 124, frame125, 129, frame130, 134, frame135, 139, frame140, 199, frame200); } public function NPS_buy_judgement_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:judgement; if (NPS_gamemode != "paused"){ if (NPS_Prayer >= 15){ if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_Prayer = (NPS_Prayer - 15); text_prayer.text = String(NPS_Prayer); _local2 = 0; while (_local2 < (NPS_Enemies.length - 1)) { _local3 = new judgement(); _local3.x = NPS_Enemies[_local2].x; _local3.y = NPS_Enemies[_local2].y; NPS_Enemies[_local2].GotHit(999999, 1); drawonme.addChild(_local3); NPS_Judgement.push(_local3); _local2++; }; }; }; } public function NPS_restart_no(_arg1:MouseEvent):void{ restart_sure.x = 1000; restart_yes.x = 1000; restart_no.x = 1000; } public function NPH_tower_select_fire_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Fire Tower (100g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Magic Damage)"; } public function NPI_select_mine_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mine (750g)"; text_towerinfo.text = "Adds 2% Of Your Gold Every 5 mins. Limit 1."; } public function NPH_the_grid_place_tower(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Boolean; var _local4:Number; var _local5:*; var _local6:int; var _local7:tower_arrow; var _local8:tower_arcane; var _local9:tower_cannon; var _local10:tower_ice; var _local11:tower_fire; var _local12:building_mine; var _local13:building_church; if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) >= 2)) && ((int((root.mouseY / 32)) <= 13)))){ if (NPH_selectedtowertype == "Arrow"){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 30)) && ((_local3 == true)))){ _local7 = new tower_arrow(); _local7.x = (int((root.mouseX / 32)) * 32); _local7.y = (int((root.mouseY / 32)) * 32); addChild(_local7); NPH_Towers.push(_local7); NPH_Gold = (NPH_Gold - 30); text_gold.text = String(NPH_Gold); NPH_Map[Math.round((_local7.y / 32))][Math.round((_local7.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPH_selectedtowertype == "Arcane"){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 125)) && ((_local3 == true)))){ _local8 = new tower_arcane(); _local8.x = (int((root.mouseX / 32)) * 32); _local8.y = (int((root.mouseY / 32)) * 32); addChild(_local8); NPH_Towers.push(_local8); NPH_Gold = (NPH_Gold - 125); text_gold.text = String(NPH_Gold); NPH_Map[Math.round((_local8.y / 32))][Math.round((_local8.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPH_selectedtowertype == "Cannon"){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 75)) && ((_local3 == true)))){ _local9 = new tower_cannon(); _local9.x = (int((root.mouseX / 32)) * 32); _local9.y = (int((root.mouseY / 32)) * 32); addChild(_local9); NPH_Towers.push(_local9); NPH_Gold = (NPH_Gold - 75); text_gold.text = String(NPH_Gold); NPH_Map[Math.round((_local9.y / 32))][Math.round((_local9.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPH_selectedtowertype == "Ice"){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 25)) && ((_local3 == true)))){ _local10 = new tower_ice(); _local10.x = (int((root.mouseX / 32)) * 32); _local10.y = (int((root.mouseY / 32)) * 32); addChild(_local10); NPH_Towers.push(_local10); NPH_Gold = (NPH_Gold - 25); text_gold.text = String(NPH_Gold); NPH_Map[Math.round((_local10.y / 32))][Math.round((_local10.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPH_selectedtowertype == "Fire"){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 100)) && ((_local3 == true)))){ _local11 = new tower_fire(); _local11.x = (int((root.mouseX / 32)) * 32); _local11.y = (int((root.mouseY / 32)) * 32); addChild(_local11); NPH_Towers.push(_local11); NPH_Gold = (NPH_Gold - 100); text_gold.text = String(NPH_Gold); NPH_Map[Math.round((_local11.y / 32))][Math.round((_local11.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPH_selectedtowertype == "Mine"){ if (NPH_PlacedMine == false){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 750)) && ((_local3 == true)))){ _local12 = new building_mine(); _local12.x = (int((root.mouseX / 32)) * 32); _local12.y = (int((root.mouseY / 32)) * 32); addChild(_local12); NPH_Towers.push(_local12); text_next_gold.x = (_local12.x + 3); text_next_gold.y = (_local12.y + 18); addChild(text_next_gold); NPH_Gold = (NPH_Gold - 750); text_gold.text = String(NPH_Gold); NPH_PlacedMine = true; NPH_LastGoldUpdate = getTimer(); NPH_Map[Math.round((_local12.y / 32))][Math.round((_local12.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; if (NPH_selectedtowertype == "Church"){ if (NPH_PlacedChurch == false){ _local3 = true; NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x) != null){ _local6 = (NPH_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPH_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPH_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPH_Gold >= 750)) && ((_local3 == true)))){ _local13 = new building_church(); _local13.x = (int((root.mouseX / 32)) * 32); _local13.y = (int((root.mouseY / 32)) * 32); addChild(_local13); NPH_Towers.push(_local13); text_next_prayer.x = (_local13.x + 5); text_next_prayer.y = (_local13.y + 18); addChild(text_next_prayer); NPH_Gold = (NPH_Gold - 750); text_gold.text = String(NPH_Gold); NPH_PlacedChurch = true; NPH_LastPrayerUpdate = getTimer(); NPH_Map[Math.round((_local13.y / 32))][Math.round((_local13.x / 32))] = 0; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { if (NPH_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][1]), Math.round(NPH_Enemies[_local5].pPath[NPH_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); if (NPH_Path == null){ }; NPH_Enemies[_local5].pPath = NPH_Path; NPH_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPH_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; }; }; }; NPH_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; }; } function frame10(){ stop(); play_game_normal.addEventListener(MouseEvent.MOUSE_UP, playnormal); play_game_sandbox.addEventListener(MouseEvent.MOUSE_UP, playsandbox); play_game_hard.addEventListener(MouseEvent.MOUSE_UP, playhard); play_game_insane.addEventListener(MouseEvent.MOUSE_UP, playinsane); play_game_5min.addEventListener(MouseEvent.MOUSE_UP, play5min); play_game_10min.addEventListener(MouseEvent.MOUSE_UP, play10min); play_game_30min.addEventListener(MouseEvent.MOUSE_UP, play30min); play_game_np_normal.addEventListener(MouseEvent.MOUSE_UP, playnopathsnormal); play_game_np_hard.addEventListener(MouseEvent.MOUSE_UP, playnopathshard); play_game_np_insane.addEventListener(MouseEvent.MOUSE_UP, playnopathsinsane); play_game_np_sandbox.addEventListener(MouseEvent.MOUSE_UP, playnopathssandbox); menu_playmore.addEventListener(MouseEvent.MOUSE_UP, sponsor); } public function NPI_tower_select_ice_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Ice"){ NPI_gamemode = "off"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Ice"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Ice"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Ice"; }; }; }; } public function NPI_tower_select_fire_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Fire Tower (100g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Magic Damage)"; } public function NPS_MoveAndCheckBlizzard():void{ var _local1:int; var _local2:int; if (NPS_gamemode != "paused"){ _local1 = (NPS_Blizzards.length - 1); while (_local1 >= 0) { _local2 = (NPS_Enemies.length - 1); while (_local2 >= 0) { if (NPS_Enemies[_local2].hitTestObject(NPS_Blizzards[_local1])){ NPS_Enemies[_local2].pSpeed = 0; }; _local2--; }; if (NPS_Blizzards[_local1].y < -128){ drawonme.removeChild(NPS_Blizzards[_local1]); NPS_Blizzards.splice(_local1, 1); }; _local1--; }; }; } public function NPS_everytime(_arg1:Event):void{ var b:int; var mX:int; var mY:int; var didHit:Boolean; var event = _arg1; try { if (NPS_gamemode != "paused"){ NPS_CheckEnemiesForDirections(); NPS_CheckTowerFireBullet(); NPS_MoveBullets(); NPS_CheckEnemiesForHit(); NPS_CheckEnemyHealth(); NPS_UpdateEnemyHealthBar(); NPS_CheckSelectedTower(); NPS_MoveAndCheckAngelsOfDeath(); NPS_MoveAndCheckBlizzard(); NPS_MoveAndCheckJudgement(); if (getTimer() > (NPS_LastWave + NPS_WaveDelay)){ NPS_placeenemies(); }; text_next_level.text = String(Math.round((((NPS_WaveDelay + NPS_LastWave) - getTimer()) / 1000))); if (NPS_PlacedMine == true){ text_next_gold.text = String(Math.round((((NPS_GoldUpdateSpeed + NPS_LastGoldUpdate) - getTimer()) / 1000))); if (getTimer() > (NPS_LastGoldUpdate + NPS_GoldUpdateSpeed)){ NPS_Gold = (NPS_Gold + (NPS_Gold * 0.02)); NPS_Gold = Math.round(NPS_Gold); text_gold.text = String(NPS_Gold); NPS_LastGoldUpdate = getTimer(); }; }; if (NPS_PlacedChurch == true){ text_next_prayer.text = String(Math.round((((NPS_PrayerUpdateSpeed + NPS_LastPrayerUpdate) - getTimer()) / 1000))); if (getTimer() > (NPS_LastPrayerUpdate + NPS_PrayerUpdateSpeed)){ NPS_Prayer = (NPS_Prayer + 1); text_prayer.text = String(NPS_Prayer); NPS_LastPrayerUpdate = getTimer(); }; }; if (NPS_gamemode == "set_tower"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ TheGrid1.graphics.clear(); if (didHit == false){ TheGrid1.graphics.moveTo(mX, mY); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.lineTo(mX, mY); TheGrid1.graphics.lineTo((mX + 32), mY); TheGrid1.graphics.lineTo((mX + 32), (mY + 32)); TheGrid1.graphics.lineTo(mX, (mY + 32)); TheGrid1.graphics.endFill(); }; }; }; if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ if (NPS_selectedtowertype == "Arrow"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPS_selectedtowertype == "Arcane"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPS_selectedtowertype == "Cannon"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 125); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 124); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 123); TheGrid1.graphics.endFill(); }; if (NPS_selectedtowertype == "Fire"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPS_selectedtowertype == "Ice"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 100); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 99); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 98); TheGrid1.graphics.endFill(); }; }; }; }; b = (NPS_Towers.length - 1); while (b >= 0) { NPS_Towers[b].graphics.clear(); b = (b - 1); }; drawonme.graphics.clear(); if (NPS_SelectedTower != -1){ mX = 0; mY = 0; NPS_Towers[NPS_SelectedTower].graphics.clear(); NPS_Towers[NPS_SelectedTower].graphics.moveTo(mX, mY); NPS_Towers[NPS_SelectedTower].graphics.beginFill(0xFFFFFF, 0.5); NPS_Towers[NPS_SelectedTower].graphics.lineTo(mX, mY); NPS_Towers[NPS_SelectedTower].graphics.lineTo((mX + 32), mY); NPS_Towers[NPS_SelectedTower].graphics.lineTo((mX + 32), (mY + 32)); NPS_Towers[NPS_SelectedTower].graphics.lineTo(mX, (mY + 32)); NPS_Towers[NPS_SelectedTower].graphics.endFill(); if (NPS_Towers[NPS_SelectedTower].pTowerType <= 5){ upgrade_tower.x = 524; } else { upgrade_tower.x = 900; }; drawonme.graphics.clear(); drawonme.graphics.beginFill(0xFFFFFF, 0.2); drawonme.graphics.drawCircle((NPS_Towers[NPS_SelectedTower].x + 16), (NPS_Towers[NPS_SelectedTower].y + 16), NPS_Towers[NPS_SelectedTower].pRange); drawonme.graphics.endFill(); }; }; } catch(e:TypeError) { }; } public function NPI_buy_angel_death_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Angel of Death(10 PP)"; text_towerinfo.text = "Calls forth the Angel of Death."; } public function NP_pausebutton_mouse_up(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; NP_gamemode = "paused"; if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; playbutton.x = 99; pausebutton.x = 900; NP_PausedTimer1 = getTimer(); _local2 = (NP_Enemies.length - 1); while (_local2 >= 0) { NP_Enemies[_local2].pPaused = true; _local2--; }; _local3 = (NP_AngelsOfDeath.length - 1); while (_local3 >= 0) { NP_AngelsOfDeath[_local3].pPaused = true; _local3--; }; _local4 = (NP_Blizzards.length - 1); while (_local4 >= 0) { NP_Blizzards[_local4].pPaused = true; _local4--; }; } public function NP_upgrade_tower_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; if (NP_gamemode != "paused"){ if (NP_Towers[NP_SelectedTower].pLevel < 51){ if (NP_Gold >= (0.5 * (NP_Towers[NP_SelectedTower].pCost * (NP_Towers[NP_SelectedTower].pLevel + 1)))){ NP_Gold = (NP_Gold - (0.5 * (NP_Towers[NP_SelectedTower].pCost * (NP_Towers[NP_SelectedTower].pLevel + 1)))); NP_Gold = Math.round(NP_Gold); text_gold.text = String(NP_Gold); if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_Towers[NP_SelectedTower].pLevel = (NP_Towers[NP_SelectedTower].pLevel + 1); NP_Towers[NP_SelectedTower].pDamage = (NP_Towers[NP_SelectedTower].pOrigDamage * ((NP_Towers[NP_SelectedTower].pLevel / 1.1) * ((NP_Towers[NP_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; _local2 = (NP_Towers[NP_SelectedTower].pOrigDamage * (((NP_Towers[NP_SelectedTower].pLevel + 1) / 1.1) * (((NP_Towers[NP_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NP_Towers[NP_SelectedTower].pCost * (NP_Towers[NP_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NP_Towers[NP_SelectedTower].pLevel) + "(") + (NP_Towers[NP_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NP_Towers[NP_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); text_tower_range.text = ("Range - " + NP_Towers[NP_SelectedTower].pRange); text_tower_sell.text = ("Sell Value - " + String(int(((NP_Towers[NP_SelectedTower].pLevel * NP_Towers[NP_SelectedTower].pCost) * 0.7)))); }; }; }; } public function NPI_pausebutton_mouse_up(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; NPI_gamemode = "paused"; if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; playbutton.x = 99; pausebutton.x = 900; NPI_PausedTimer1 = getTimer(); _local2 = (NPI_Enemies.length - 1); while (_local2 >= 0) { NPI_Enemies[_local2].pPaused = true; _local2--; }; _local3 = (NPI_AngelsOfDeath.length - 1); while (_local3 >= 0) { NPI_AngelsOfDeath[_local3].pPaused = true; _local3--; }; _local4 = (NPI_Blizzards.length - 1); while (_local4 >= 0) { NPI_Blizzards[_local4].pPaused = true; _local4--; }; } public function NP_musicright_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NPS_checkpathcollision(_arg1, _arg2):Boolean{ var _local3:*; var _local4:int; _local3 = (_arg1 + 1); _local4 = (_arg2 + 1); return (false); } public function NPS_tower_select_cannon_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Cannon"){ NPS_gamemode = "off"; TheGrid1.alpha = 0; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Cannon"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Cannon"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; NPS_selectedtowertype = "Cannon"; }; }; }; } public function NPH_buy_blizzard_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:blizzard_graphic; if (NPH_gamemode != "paused"){ if (NPH_Prayer >= 3){ if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_Prayer = (NPH_Prayer - 3); text_prayer.text = String(NPH_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new blizzard_graphic(); drawonme.addChild(_local3); NPH_Blizzards.push(_local3); _local2++; }; }; }; } public function playsandbox(_arg1:MouseEvent):void{ gotoAndStop(20); } public function NP_UpdateEnemyHealthBar():void{ var _local1:Number; var _local2:Number; var _local3:int; if (NP_gamemode != "paused"){ _local3 = (NP_HealthBars.length - 1); while (_local3 >= 0) { _local1 = (NP_Enemies[NP_HealthBars[_local3].pEnemy].pHealth / NP_Enemies[NP_HealthBars[_local3].pEnemy].pStartHealth); _local1 = (_local1 * 100); _local2 = ((27 * _local1) / 100); NP_HealthBars[_local3].x = (NP_Enemies[NP_HealthBars[_local3].pEnemy].x - 13); NP_HealthBars[_local3].y = (NP_Enemies[NP_HealthBars[_local3].pEnemy].y - 16); NP_HealthBars[_local3].pWidth = _local2; NP_HealthBars[_local3].width = _local2; _local3--; }; }; } public function playnormal(_arg1:MouseEvent):void{ gotoAndStop(35); } public function NPI_checkpathcollision(_arg1, _arg2):Boolean{ var _local3:*; var _local4:int; _local3 = (_arg1 + 1); _local4 = (_arg2 + 1); return (false); } public function NPH_tower_select_cannon_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Cannon"){ NPH_gamemode = "off"; TheGrid1.alpha = 0; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Cannon"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Cannon"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; NPH_selectedtowertype = "Cannon"; }; }; }; } public function NPI_UpdateEnemyHealthBar():void{ var _local1:Number; var _local2:Number; var _local3:int; if (NPI_gamemode != "paused"){ _local3 = (NPI_HealthBars.length - 1); while (_local3 >= 0) { _local1 = (NPI_Enemies[NPI_HealthBars[_local3].pEnemy].pHealth / NPI_Enemies[NPI_HealthBars[_local3].pEnemy].pStartHealth); _local1 = (_local1 * 100); _local2 = ((27 * _local1) / 100); NPI_HealthBars[_local3].x = (NPI_Enemies[NPI_HealthBars[_local3].pEnemy].x - 13); NPI_HealthBars[_local3].y = (NPI_Enemies[NPI_HealthBars[_local3].pEnemy].y - 16); NPI_HealthBars[_local3].pWidth = _local2; NPI_HealthBars[_local3].width = _local2; _local3--; }; }; } public function NP_buy_judgement_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Judgement Day(15 PP)"; text_towerinfo.text = "Calls forth Judgement Day upon your enemies."; } public function NPH_buy_judgement_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Judgement Day(15 PP)"; text_towerinfo.text = "Calls forth Judgement Day upon your enemies."; } public function NPH_road_deselect(_arg1:MouseEvent):void{ TheGrid1.graphics.clear(); TheGrid1.alpha = 0; NPH_gamemode = "none"; NPH_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; } public function NP_musicleft_mouse_up(_arg1:MouseEvent):void{ if (NP_Muted == false){ NP_CurrentSong--; if (NP_CurrentSong == 0){ NP_CurrentSong = 5; }; NP_channel.stop(); if (NP_CurrentSong == 1){ NP_channel = NP_Ambient1.play(0, 99999); }; if (NP_CurrentSong == 2){ NP_channel = NP_Ambient2.play(0, 99999); }; if (NP_CurrentSong == 3){ NP_channel = NP_Ambient3.play(0, 99999); }; if (NP_CurrentSong == 4){ NP_channel = NP_Ambient4.play(0, 99999); }; if (NP_CurrentSong == 5){ NP_channel = NP_Ambient5.play(0, 99999); }; }; } function frame95(){ MochiAd.showTimedAd({clip:this.root, id:"d8d892ac1120ac68", res:"640x480"}); } public function NPH_buy_angel_death_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:angel_of_death; if (NPH_gamemode != "paused"){ if (NPH_Prayer >= 10){ if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_Prayer = (NPH_Prayer - 10); text_prayer.text = String(NPH_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new angel_of_death(); drawonme.addChild(_local3); NPH_AngelsOfDeath.push(_local3); _local2++; }; }; }; } public function NPH_buy_church_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Church"){ if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_gamemode = "off"; TheGrid1.alpha = 0; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Church"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Church"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Church"; }; }; }; } function frame100(){ gotoAndStop(10); } public function NP_CheckEnemiesForHit():void{ var i:int; var k:int; var xdist:Number; var ydist:Number; var distancefromthis:Number; var a:int; if (NP_gamemode != "paused"){ try { i = (NP_Enemies.length - 1); while (i >= 0) { k = (NP_Bullets.length - 1); while (k >= 0) { if (NP_Enemies[i].hitTestObject(NP_Bullets[k])){ NP_Enemies[i].GotHit(NP_Bullets[k].pDamage, NP_Bullets[k].pBulletType); if (NP_Bullets[k].pBulletType == 2){ if (NP_Enemies[i].pSpeed > 0.3){ NP_Enemies[i].pSpeed = (NP_Enemies[i].pSpeed - 0.2); }; }; if (NP_Bullets[k].pBulletType == 4){ a = (NP_Enemies.length - 1); while (a >= 0) { xdist = Math.round((NP_Bullets[k].x - NP_Enemies[a].x)); ydist = Math.round((NP_Bullets[k].y - NP_Enemies[a].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < 50){ if (a != NP_Bullets[k].pTarget){ NP_Enemies[a].GotHit(((5 * NP_Towers[NP_Bullets[k].pTower].pLevel) * 0.75), 4); }; }; a = (a - 1); }; }; NP_Bullets[k].x = -100; NP_Bullets[k].y = -100; if (NP_Bullets[k].pVisible == true){ removeChild(NP_Bullets[k].pBullet); }; NP_Bullets.splice(k, 1); }; k = (k - 1); }; i = (i - 1); }; } catch(e:TypeError) { }; }; } function frame105(){ stop(); NP_LastWave = getTimer(); NP_WaveDelay = 60000; NP_GameLevel = 0; NP_SelectedTower = -1; NP_GameScore = 0; NP_Gold = 300; NP_Lives = 25; NP_PlacedMine = false; NP_PlacedChurch = false; NP_LastGoldUpdate = 0; NP_LastPrayerUpdate = 0; NP_PrayerUpdateSpeed = 60000; NP_GoldUpdateSpeed = 300000; NP_LastEnemyType = 1; NP_Map = []; NP_MapStart = new Point(2, 1); NP_MapEnd = new Point(14, 14); NP_CurrentSong = 1; NP_Muted = false; NP_Prayer = 0; NP_Map = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]]; NP_ButtonClick = new buttonclick(); NP_Ambient1 = new ambient_1(); NP_Ambient2 = new ambient_2(); NP_Ambient3 = new ambient_3(); NP_Ambient4 = new ambient_4(); NP_Ambient5 = new ambient_5(); NP_channel = NP_Ambient1.play(0, 99999); NP_Enemies = new Array(); NP_Buildings = new Array(); NP_Judgement = new Array(); NP_Blizzards = new Array(); NP_HealthBars = new Array(); NP_Towers = new Array(); NP_Bullets = new Array(); NP_AngelsOfDeath = new Array(); NP_gamemode = "none"; addEventListener(Event.ENTER_FRAME, NP_everytime); sponsor_mini.addEventListener(MouseEvent.MOUSE_UP, sponsor); stage.addEventListener(KeyboardEvent.KEY_UP, NP_reportKeyUp); nextlevelbutton.addEventListener(MouseEvent.MOUSE_UP, NP_nextlevelbutton_mouse_up); pausebutton.addEventListener(MouseEvent.MOUSE_UP, NP_pausebutton_mouse_up); playbutton.addEventListener(MouseEvent.MOUSE_UP, NP_playbutton_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_UP, NP_musicleft_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_OVER, NP_musicleft_mouse_enter); musicleft.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); musicright.addEventListener(MouseEvent.MOUSE_UP, NP_musicright_mouse_up); musicright.addEventListener(MouseEvent.MOUSE_OVER, NP_musicright_mouse_enter); musicright.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); musicmute.addEventListener(MouseEvent.MOUSE_UP, NP_musicmute_mouse_up); musicmute.addEventListener(MouseEvent.MOUSE_OVER, NP_musicmute_mouse_enter); musicmute.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OVER, NP_tower_select_arrow_mouse_enter); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OVER, NP_tower_select_cannon_mouse_enter); tower_select_ice.addEventListener(MouseEvent.MOUSE_OVER, NP_tower_select_ice_mouse_enter); tower_select_fire.addEventListener(MouseEvent.MOUSE_OVER, NP_tower_select_fire_mouse_enter); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OVER, NP_tower_select_arcane_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_OVER, NP_buy_angel_death_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_UP, NP_buy_angel_death_mouse_up); buy_angel_death.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); select_mine.addEventListener(MouseEvent.MOUSE_OVER, NP_select_mine_mouse_enter); select_mine.addEventListener(MouseEvent.MOUSE_UP, NP_select_mine_mouse_up); select_mine.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); buy_church.addEventListener(MouseEvent.MOUSE_OVER, NP_buy_church_mouse_enter); buy_church.addEventListener(MouseEvent.MOUSE_UP, NP_buy_church_mouse_up); buy_church.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); buy_blizzard.addEventListener(MouseEvent.MOUSE_OVER, NP_buy_blizzard_mouse_enter); buy_blizzard.addEventListener(MouseEvent.MOUSE_UP, NP_buy_blizzard_mouse_up); buy_blizzard.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); buy_judgement.addEventListener(MouseEvent.MOUSE_OVER, NP_buy_judgement_mouse_enter); buy_judgement.addEventListener(MouseEvent.MOUSE_UP, NP_buy_judgement_mouse_up); buy_judgement.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); upgrade_tower.addEventListener(MouseEvent.MOUSE_OVER, NP_upgrade_tower_mouse_enter); upgrade_tower.addEventListener(MouseEvent.MOUSE_UP, NP_upgrade_tower_mouse_up); upgrade_tower.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_UP, NP_tower_select_arrow_mouse_up); tower_select_cannon.addEventListener(MouseEvent.MOUSE_UP, NP_tower_select_cannon_mouse_up); tower_select_ice.addEventListener(MouseEvent.MOUSE_UP, NP_tower_select_ice_mouse_up); tower_select_fire.addEventListener(MouseEvent.MOUSE_UP, NP_tower_select_fire_mouse_up); tower_select_arcane.addEventListener(MouseEvent.MOUSE_UP, NP_tower_select_arcane_mouse_up); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); tower_select_ice.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); tower_select_fire.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OUT, NP_tower_select_deselect); sell_tower.addEventListener(MouseEvent.MOUSE_UP, NP_sell_tower_click); TheGrid1.addEventListener(MouseEvent.MOUSE_UP, NP_the_grid_place_tower); restart_button.addEventListener(MouseEvent.MOUSE_UP, restart_game9); restart_yes.addEventListener(MouseEvent.MOUSE_UP, NP_restart_yes); restart_no.addEventListener(MouseEvent.MOUSE_UP, NP_restart_no); } public function NPS_CheckTowerFireBullet():void{ var xdist:Number; var ydist:Number; var distancefromthis:Number; var closest:Number; var closestmob:Number; var i:int; var a:int; var k:int; var Bullet1:script_bullet_arrow; var Bullet2:script_bullet_ice; var Bullet3:script_bullet_arcane; var Bullet4:script_bullet_cannon; var Bullet5:script_bullet_fire; closest = 5000; closestmob = -1; if (NPS_gamemode != "paused"){ try { i = (NPS_Towers.length - 1); while (i >= 0) { if (NPS_Towers[i].pTowerType <= 5){ closest = 5000; NPS_Towers[i].pTarget = -1; k = (NPS_Enemies.length - 1); while (k >= 0) { xdist = Math.round(((NPS_Towers[i].x + 16) - NPS_Enemies[k].x)); ydist = Math.round(((NPS_Towers[i].y + 16) - NPS_Enemies[k].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NPS_Towers[i].pRange){ if (NPS_Enemies[k].pType == 4){ if (NPS_Towers[i].pTowerType != 2){ if (NPS_Towers[i].pTowerType != 3){ if (NPS_Towers[i].pTowerType != 5){ NPS_Towers[i].pTarget = k; }; }; }; }; if (NPS_Enemies[k].pType != 4){ NPS_Towers[i].pTarget = k; }; }; k = (k - 1); }; }; i = (i - 1); }; a = (NPS_Towers.length - 1); while (a >= 0) { if (NPS_Towers[a].pTowerType <= 5){ if (NPS_Enemies.length > 0){ if (NPS_Towers[a].pTarget != -1){ if (NPS_Enemies[NPS_Towers[a].pTarget].pHealth > 0){ xdist = Math.round(((NPS_Towers[a].x + 16) - NPS_Enemies[NPS_Towers[a].pTarget].x)); ydist = Math.round(((NPS_Towers[a].y + 16) - NPS_Enemies[NPS_Towers[a].pTarget].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NPS_Towers[a].pRange){ if (NPS_Enemies[NPS_Towers[a].pTarget].y > 0){ if (getTimer() > (NPS_Towers[a].pLastFire + NPS_Towers[a].pSpeed)){ NPS_Towers[a].pLastFire = getTimer(); if (NPS_Towers[a].pTowerType == 1){ Bullet1 = new script_bullet_arrow(NPS_Towers[a].pTarget); }; if (NPS_Towers[a].pTowerType == 2){ Bullet2 = new script_bullet_ice(NPS_Towers[a].pTarget); }; if (NPS_Towers[a].pTowerType == 3){ Bullet3 = new script_bullet_arcane(NPS_Towers[a].pTarget); }; if (NPS_Towers[a].pTowerType == 4){ Bullet4 = new script_bullet_cannon(NPS_Towers[a].pTarget); }; if (NPS_Towers[a].pTowerType == 5){ Bullet5 = new script_bullet_fire(NPS_Towers[a].pTarget); }; if (NPS_Towers[a].pTowerType == 1){ Bullet1.x = (NPS_Towers[a].x + 16); Bullet1.y = (NPS_Towers[a].y + 16); Bullet1.pDamage = NPS_Towers[a].pDamage; Bullet1.pBullet = Bullet1; if (NPS_Bullets.length < 100){ Bullet1.pVisible = true; addChild(Bullet1); }; NPS_Bullets.push(Bullet1); Bullet1.pTower = a; }; if (NPS_Towers[a].pTowerType == 2){ Bullet2.x = (NPS_Towers[a].x + 16); Bullet2.y = (NPS_Towers[a].y + 16); Bullet2.pDamage = NPS_Towers[a].pDamage; Bullet2.pBullet = Bullet2; if (NPS_Bullets.length < 100){ Bullet2.pVisible = true; addChild(Bullet2); }; NPS_Bullets.push(Bullet2); Bullet2.pTower = a; }; if (NPS_Towers[a].pTowerType == 3){ Bullet3.x = (NPS_Towers[a].x + 16); Bullet3.y = (NPS_Towers[a].y + 16); Bullet3.pDamage = NPS_Towers[a].pDamage; Bullet3.pBullet = Bullet3; if (NPS_Bullets.length < 100){ Bullet3.pVisible = true; addChild(Bullet3); }; NPS_Bullets.push(Bullet3); Bullet3.pTower = a; }; if (NPS_Towers[a].pTowerType == 4){ Bullet4.x = (NPS_Towers[a].x + 16); Bullet4.y = (NPS_Towers[a].y + 16); Bullet4.pDamage = NPS_Towers[a].pDamage; Bullet4.pBullet = Bullet4; if (NPS_Bullets.length < 100){ Bullet4.pVisible = true; addChild(Bullet4); }; NPS_Bullets.push(Bullet4); Bullet4.pTower = a; }; if (NPS_Towers[a].pTowerType == 5){ Bullet5.x = (NPS_Towers[a].x + 16); Bullet5.y = (NPS_Towers[a].y + 16); Bullet5.pDamage = NPS_Towers[a].pDamage; Bullet5.pBullet = Bullet5; if (NPS_Bullets.length < 100){ Bullet5.pVisible = true; addChild(Bullet5); }; NPS_Bullets.push(Bullet5); Bullet5.pTower = a; }; }; }; }; }; }; }; }; a = (a - 1); }; } catch(e:TypeError) { }; }; } public function NPI_tower_select_arcane_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Arcane"){ NPI_gamemode = "off"; TheGrid1.alpha = 0; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Arcane"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Arcane"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Arcane"; }; }; }; } function frame110(){ stop(); play_game.addEventListener(MouseEvent.MOUSE_UP, playthegame9); menu_playmore.addEventListener(MouseEvent.MOUSE_UP, sponsor); end_nopath_score.text = ("Score - " + String(NP_GameScore)); } function frame115(){ stop(); NPH_LastWave = getTimer(); NPH_WaveDelay = 60000; NPH_GameLevel = 0; NPH_SelectedTower = -1; NPH_GameScore = 0; NPH_Gold = 300; NPH_Lives = 25; NPH_PlacedMine = false; NPH_PlacedChurch = false; NPH_LastGoldUpdate = 0; NPH_LastPrayerUpdate = 0; NPH_PrayerUpdateSpeed = 120000; NPH_GoldUpdateSpeed = 300000; NPH_LastEnemyType = 1; NPH_Map = []; NPH_MapStart = new Point(2, 1); NPH_MapEnd = new Point(14, 14); NPH_CurrentSong = 1; NPH_Muted = false; NPH_Prayer = 0; NPH_Map = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]]; NPH_ButtonClick = new buttonclick(); NPH_Ambient1 = new ambient_1(); NPH_Ambient2 = new ambient_2(); NPH_Ambient3 = new ambient_3(); NPH_Ambient4 = new ambient_4(); NPH_Ambient5 = new ambient_5(); NPH_channel = NPH_Ambient1.play(0, 99999); NPH_Enemies = new Array(); NPH_Buildings = new Array(); NPH_Judgement = new Array(); NPH_Blizzards = new Array(); NPH_HealthBars = new Array(); NPH_Towers = new Array(); NPH_Bullets = new Array(); NPH_AngelsOfDeath = new Array(); NPH_gamemode = "none"; addEventListener(Event.ENTER_FRAME, NPH_everytime); stage.addEventListener(KeyboardEvent.KEY_UP, NPH_reportKeyUp); sponsor_mini.addEventListener(MouseEvent.MOUSE_UP, sponsor); nextlevelbutton.addEventListener(MouseEvent.MOUSE_UP, NPH_nextlevelbutton_mouse_up); pausebutton.addEventListener(MouseEvent.MOUSE_UP, NPH_pausebutton_mouse_up); playbutton.addEventListener(MouseEvent.MOUSE_UP, NPH_playbutton_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_UP, NPH_musicleft_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_OVER, NPH_musicleft_mouse_enter); musicleft.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); musicright.addEventListener(MouseEvent.MOUSE_UP, NPH_musicright_mouse_up); musicright.addEventListener(MouseEvent.MOUSE_OVER, NPH_musicright_mouse_enter); musicright.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); musicmute.addEventListener(MouseEvent.MOUSE_UP, NPH_musicmute_mouse_up); musicmute.addEventListener(MouseEvent.MOUSE_OVER, NPH_musicmute_mouse_enter); musicmute.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OVER, NPH_tower_select_arrow_mouse_enter); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OVER, NPH_tower_select_cannon_mouse_enter); tower_select_ice.addEventListener(MouseEvent.MOUSE_OVER, NPH_tower_select_ice_mouse_enter); tower_select_fire.addEventListener(MouseEvent.MOUSE_OVER, NPH_tower_select_fire_mouse_enter); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OVER, NPH_tower_select_arcane_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_OVER, NPH_buy_angel_death_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_UP, NPH_buy_angel_death_mouse_up); buy_angel_death.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); select_mine.addEventListener(MouseEvent.MOUSE_OVER, NPH_select_mine_mouse_enter); select_mine.addEventListener(MouseEvent.MOUSE_UP, NPH_select_mine_mouse_up); select_mine.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); buy_church.addEventListener(MouseEvent.MOUSE_OVER, NPH_buy_church_mouse_enter); buy_church.addEventListener(MouseEvent.MOUSE_UP, NPH_buy_church_mouse_up); buy_church.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); buy_blizzard.addEventListener(MouseEvent.MOUSE_OVER, NPH_buy_blizzard_mouse_enter); buy_blizzard.addEventListener(MouseEvent.MOUSE_UP, NPH_buy_blizzard_mouse_up); buy_blizzard.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); buy_judgement.addEventListener(MouseEvent.MOUSE_OVER, NPH_buy_judgement_mouse_enter); buy_judgement.addEventListener(MouseEvent.MOUSE_UP, NPH_buy_judgement_mouse_up); buy_judgement.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); upgrade_tower.addEventListener(MouseEvent.MOUSE_OVER, NPH_upgrade_tower_mouse_enter); upgrade_tower.addEventListener(MouseEvent.MOUSE_UP, NPH_upgrade_tower_mouse_up); upgrade_tower.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_UP, NPH_tower_select_arrow_mouse_up); tower_select_cannon.addEventListener(MouseEvent.MOUSE_UP, NPH_tower_select_cannon_mouse_up); tower_select_ice.addEventListener(MouseEvent.MOUSE_UP, NPH_tower_select_ice_mouse_up); tower_select_fire.addEventListener(MouseEvent.MOUSE_UP, NPH_tower_select_fire_mouse_up); tower_select_arcane.addEventListener(MouseEvent.MOUSE_UP, NPH_tower_select_arcane_mouse_up); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); tower_select_ice.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); tower_select_fire.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OUT, NPH_tower_select_deselect); sell_tower.addEventListener(MouseEvent.MOUSE_UP, NPH_sell_tower_click); TheGrid1.addEventListener(MouseEvent.MOUSE_UP, NPH_the_grid_place_tower); restart_button.addEventListener(MouseEvent.MOUSE_UP, restart_game10); restart_yes.addEventListener(MouseEvent.MOUSE_UP, NPH_restart_yes); restart_no.addEventListener(MouseEvent.MOUSE_UP, NPH_restart_no); } public function NPS_select_mine_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Mine"){ if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_gamemode = "off"; TheGrid1.alpha = 0; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Mine"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Mine"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Mine"; }; }; }; } public function NPS_buy_judgement_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Judgement Day(15 PP)"; text_towerinfo.text = "Calls forth Judgement Day upon your enemies."; } public function NP_tower_select_arrow_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arrow Tower (30g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Normal Damage)"; } function frame120(){ stop(); play_game.addEventListener(MouseEvent.MOUSE_UP, playthegame10); menu_playmore.addEventListener(MouseEvent.MOUSE_UP, sponsor); end_nopath_hard_score.text = ("Score - " + String(NPH_GameScore)); } function frame125(){ stop(); NPI_LastWave = getTimer(); NPI_WaveDelay = 60000; NPI_GameLevel = 0; NPI_SelectedTower = -1; NPI_GameScore = 0; NPI_Gold = 300; NPI_Lives = 25; NPI_PlacedMine = false; NPI_PlacedChurch = false; NPI_LastGoldUpdate = 0; NPI_LastPrayerUpdate = 0; NPI_PrayerUpdateSpeed = 120000; NPI_GoldUpdateSpeed = 300000; NPI_LastEnemyType = 1; NPI_Map = []; NPI_MapStart = new Point(2, 1); NPI_MapEnd = new Point(14, 14); NPI_CurrentSong = 1; NPI_Muted = false; NPI_Prayer = 0; NPI_Map = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]]; NPI_ButtonClick = new buttonclick(); NPI_Ambient1 = new ambient_1(); NPI_Ambient2 = new ambient_2(); NPI_Ambient3 = new ambient_3(); NPI_Ambient4 = new ambient_4(); NPI_Ambient5 = new ambient_5(); NPI_channel = NPI_Ambient1.play(0, 99999); NPI_Enemies = new Array(); NPI_Buildings = new Array(); NPI_Judgement = new Array(); NPI_Blizzards = new Array(); NPI_HealthBars = new Array(); NPI_Towers = new Array(); NPI_Bullets = new Array(); NPI_AngelsOfDeath = new Array(); NPI_gamemode = "none"; addEventListener(Event.ENTER_FRAME, NPI_everytime); stage.addEventListener(KeyboardEvent.KEY_UP, NPI_reportKeyUp); sponsor_mini.addEventListener(MouseEvent.MOUSE_UP, sponsor); nextlevelbutton.addEventListener(MouseEvent.MOUSE_UP, NPI_nextlevelbutton_mouse_up); pausebutton.addEventListener(MouseEvent.MOUSE_UP, NPI_pausebutton_mouse_up); playbutton.addEventListener(MouseEvent.MOUSE_UP, NPI_playbutton_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_UP, NPI_musicleft_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_OVER, NPI_musicleft_mouse_enter); musicleft.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); musicright.addEventListener(MouseEvent.MOUSE_UP, NPI_musicright_mouse_up); musicright.addEventListener(MouseEvent.MOUSE_OVER, NPI_musicright_mouse_enter); musicright.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); musicmute.addEventListener(MouseEvent.MOUSE_UP, NPI_musicmute_mouse_up); musicmute.addEventListener(MouseEvent.MOUSE_OVER, NPI_musicmute_mouse_enter); musicmute.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OVER, NPI_tower_select_arrow_mouse_enter); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OVER, NPI_tower_select_cannon_mouse_enter); tower_select_ice.addEventListener(MouseEvent.MOUSE_OVER, NPI_tower_select_ice_mouse_enter); tower_select_fire.addEventListener(MouseEvent.MOUSE_OVER, NPI_tower_select_fire_mouse_enter); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OVER, NPI_tower_select_arcane_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_OVER, NPI_buy_angel_death_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_UP, NPI_buy_angel_death_mouse_up); buy_angel_death.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); select_mine.addEventListener(MouseEvent.MOUSE_OVER, NPI_select_mine_mouse_enter); select_mine.addEventListener(MouseEvent.MOUSE_UP, NPI_select_mine_mouse_up); select_mine.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); buy_church.addEventListener(MouseEvent.MOUSE_OVER, NPI_buy_church_mouse_enter); buy_church.addEventListener(MouseEvent.MOUSE_UP, NPI_buy_church_mouse_up); buy_church.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); buy_blizzard.addEventListener(MouseEvent.MOUSE_OVER, NPI_buy_blizzard_mouse_enter); buy_blizzard.addEventListener(MouseEvent.MOUSE_UP, NPI_buy_blizzard_mouse_up); buy_blizzard.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); buy_judgement.addEventListener(MouseEvent.MOUSE_OVER, NPI_buy_judgement_mouse_enter); buy_judgement.addEventListener(MouseEvent.MOUSE_UP, NPI_buy_judgement_mouse_up); buy_judgement.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); upgrade_tower.addEventListener(MouseEvent.MOUSE_OVER, NPI_upgrade_tower_mouse_enter); upgrade_tower.addEventListener(MouseEvent.MOUSE_UP, NPI_upgrade_tower_mouse_up); upgrade_tower.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_UP, NPI_tower_select_arrow_mouse_up); tower_select_cannon.addEventListener(MouseEvent.MOUSE_UP, NPI_tower_select_cannon_mouse_up); tower_select_ice.addEventListener(MouseEvent.MOUSE_UP, NPI_tower_select_ice_mouse_up); tower_select_fire.addEventListener(MouseEvent.MOUSE_UP, NPI_tower_select_fire_mouse_up); tower_select_arcane.addEventListener(MouseEvent.MOUSE_UP, NPI_tower_select_arcane_mouse_up); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); tower_select_ice.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); tower_select_fire.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OUT, NPI_tower_select_deselect); sell_tower.addEventListener(MouseEvent.MOUSE_UP, NPI_sell_tower_click); TheGrid1.addEventListener(MouseEvent.MOUSE_UP, NPI_the_grid_place_tower); restart_button.addEventListener(MouseEvent.MOUSE_UP, restart_game11); restart_yes.addEventListener(MouseEvent.MOUSE_UP, NPI_restart_yes); restart_no.addEventListener(MouseEvent.MOUSE_UP, NPI_restart_no); } public function NPH_nextlevelbutton_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_Enemies.length < 51){ if (NPH_GameLevel != 0){ NPH_GameScore = (NPH_GameScore + Math.round((((NPH_WaveDelay + NPH_LastWave) - getTimer()) / 1000))); text_score.text = String(NPH_GameScore); }; if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_placeenemies(); }; }; } public function NPS_CheckEnemyHealth():void{ var i:int; var h:int; var k:int; var a:int; if (NPS_gamemode != "paused"){ try { i = (NPS_Enemies.length - 1); while (i >= 0) { if (NPS_Enemies[i].pHealth <= 0){ NPS_Enemies[i].x = -500; NPS_Enemies[i].y = -500; if (NPS_Enemies[i].pType == 5){ NPS_Gold = (NPS_Gold + Math.round(((1.75 * NPS_GameLevel) + 0.5))); NPS_GameScore = (NPS_GameScore + 50); } else { NPS_Gold = (NPS_Gold + Math.round(((0.25 * NPS_GameLevel) + 0.5))); NPS_GameScore = (NPS_GameScore + 10); }; removeChild(NPS_Enemies[i]); NPS_Enemies.splice(i, 1); text_gold.text = String(NPS_Gold); text_score.text = String(NPS_GameScore); h = (NPS_HealthBars.length - 1); while (h >= 0) { if (NPS_HealthBars[h].pEnemy == i){ NPS_HealthBars[h].x = -900; removeChild(NPS_HealthBars[h]); NPS_HealthBars.splice(h, 1); }; if (NPS_HealthBars[h].pEnemy > i){ NPS_HealthBars[h].pEnemy = (NPS_HealthBars[h].pEnemy - 1); }; h = (h - 1); }; k = (NPS_Bullets.length - 1); while (k >= 0) { if (k != i){ if (NPS_Bullets[k].pTarget > i){ NPS_Bullets[k].pTarget = (NPS_Bullets[k].pTarget - 1); }; }; if (NPS_Bullets[k].pTarget == i){ NPS_Bullets[k].x = -100; NPS_Bullets[k].y = -100; if (NPS_Bullets[k].pVisible == true){ removeChild(NPS_Bullets[k].pBullet); }; NPS_Bullets.splice(k, 1); }; k = (k - 1); }; a = (NPS_Towers.length - 1); while (a >= 0) { if (NPS_Towers[a].pTarget == i){ NPS_Towers[a].pTarget = -1; }; if (NPS_Towers[a].pTarget > i){ NPS_Towers[a].pTarget = (NPS_Towers[a].pTarget - 1); }; a = (a - 1); }; }; i = (i - 1); }; } catch(e:TypeError) { }; }; } function frame135(){ stop(); NPS_LastWave = getTimer(); NPS_WaveDelay = 60000; NPS_GameLevel = 0; NPS_SelectedTower = -1; NPS_GameScore = 0; NPS_Gold = 999999; NPS_Lives = 25; NPS_PlacedMine = false; NPS_PlacedChurch = false; NPS_LastGoldUpdate = 0; NPS_LastPrayerUpdate = 0; NPS_PrayerUpdateSpeed = 120000; NPS_GoldUpdateSpeed = 300000; NPS_LastEnemyType = 1; NPS_Map = []; NPS_MapStart = new Point(2, 1); NPS_MapEnd = new Point(14, 14); NPS_CurrentSong = 1; NPS_Muted = false; NPS_Prayer = 99999; NPS_Map = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]]; NPS_ButtonClick = new buttonclick(); NPS_Ambient1 = new ambient_1(); NPS_Ambient2 = new ambient_2(); NPS_Ambient3 = new ambient_3(); NPS_Ambient4 = new ambient_4(); NPS_Ambient5 = new ambient_5(); NPS_channel = NPS_Ambient1.play(0, 99999); NPS_Enemies = new Array(); NPS_Buildings = new Array(); NPS_Judgement = new Array(); NPS_Blizzards = new Array(); NPS_HealthBars = new Array(); NPS_Towers = new Array(); NPS_Bullets = new Array(); NPS_AngelsOfDeath = new Array(); NPS_gamemode = "none"; addEventListener(Event.ENTER_FRAME, NPS_everytime); stage.addEventListener(KeyboardEvent.KEY_UP, NPS_reportKeyUp); sponsor_mini.addEventListener(MouseEvent.MOUSE_UP, sponsor); nextlevelbutton.addEventListener(MouseEvent.MOUSE_UP, NPS_nextlevelbutton_mouse_up); pausebutton.addEventListener(MouseEvent.MOUSE_UP, NPS_pausebutton_mouse_up); playbutton.addEventListener(MouseEvent.MOUSE_UP, NPS_playbutton_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_UP, NPS_musicleft_mouse_up); musicleft.addEventListener(MouseEvent.MOUSE_OVER, NPS_musicleft_mouse_enter); musicleft.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); musicright.addEventListener(MouseEvent.MOUSE_UP, NPS_musicright_mouse_up); musicright.addEventListener(MouseEvent.MOUSE_OVER, NPS_musicright_mouse_enter); musicright.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); musicmute.addEventListener(MouseEvent.MOUSE_UP, NPS_musicmute_mouse_up); musicmute.addEventListener(MouseEvent.MOUSE_OVER, NPS_musicmute_mouse_enter); musicmute.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OVER, NPS_tower_select_arrow_mouse_enter); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OVER, NPS_tower_select_cannon_mouse_enter); tower_select_ice.addEventListener(MouseEvent.MOUSE_OVER, NPS_tower_select_ice_mouse_enter); tower_select_fire.addEventListener(MouseEvent.MOUSE_OVER, NPS_tower_select_fire_mouse_enter); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OVER, NPS_tower_select_arcane_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_OVER, NPS_buy_angel_death_mouse_enter); buy_angel_death.addEventListener(MouseEvent.MOUSE_UP, NPS_buy_angel_death_mouse_up); buy_angel_death.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); select_mine.addEventListener(MouseEvent.MOUSE_OVER, NPS_select_mine_mouse_enter); select_mine.addEventListener(MouseEvent.MOUSE_UP, NPS_select_mine_mouse_up); select_mine.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); buy_church.addEventListener(MouseEvent.MOUSE_OVER, NPS_buy_church_mouse_enter); buy_church.addEventListener(MouseEvent.MOUSE_UP, NPS_buy_church_mouse_up); buy_church.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); buy_blizzard.addEventListener(MouseEvent.MOUSE_OVER, NPS_buy_blizzard_mouse_enter); buy_blizzard.addEventListener(MouseEvent.MOUSE_UP, NPS_buy_blizzard_mouse_up); buy_blizzard.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); buy_judgement.addEventListener(MouseEvent.MOUSE_OVER, NPS_buy_judgement_mouse_enter); buy_judgement.addEventListener(MouseEvent.MOUSE_UP, NPS_buy_judgement_mouse_up); buy_judgement.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); upgrade_tower.addEventListener(MouseEvent.MOUSE_OVER, NPS_upgrade_tower_mouse_enter); upgrade_tower.addEventListener(MouseEvent.MOUSE_UP, NPS_upgrade_tower_mouse_up); upgrade_tower.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); tower_select_arrow.addEventListener(MouseEvent.MOUSE_UP, NPS_tower_select_arrow_mouse_up); tower_select_cannon.addEventListener(MouseEvent.MOUSE_UP, NPS_tower_select_cannon_mouse_up); tower_select_ice.addEventListener(MouseEvent.MOUSE_UP, NPS_tower_select_ice_mouse_up); tower_select_fire.addEventListener(MouseEvent.MOUSE_UP, NPS_tower_select_fire_mouse_up); tower_select_arcane.addEventListener(MouseEvent.MOUSE_UP, NPS_tower_select_arcane_mouse_up); tower_select_arrow.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); tower_select_cannon.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); tower_select_ice.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); tower_select_fire.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); tower_select_arcane.addEventListener(MouseEvent.MOUSE_OUT, NPS_tower_select_deselect); sell_tower.addEventListener(MouseEvent.MOUSE_UP, NPS_sell_tower_click); TheGrid1.addEventListener(MouseEvent.MOUSE_UP, NPS_the_grid_place_tower); restart_button.addEventListener(MouseEvent.MOUSE_UP, restart_game12); restart_yes.addEventListener(MouseEvent.MOUSE_UP, NPS_restart_yes); restart_no.addEventListener(MouseEvent.MOUSE_UP, NPS_restart_no); } function frame130(){ stop(); play_game.addEventListener(MouseEvent.MOUSE_UP, playthegame11); menu_playmore.addEventListener(MouseEvent.MOUSE_UP, sponsor); end_nopath_insane_score.text = ("Score - " + String(NPI_GameScore)); } public function NP_buy_angel_death_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:angel_of_death; if (NP_gamemode != "paused"){ if (NP_Prayer >= 10){ if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_Prayer = (NP_Prayer - 10); text_prayer.text = String(NP_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new angel_of_death(); drawonme.addChild(_local3); NP_AngelsOfDeath.push(_local3); _local2++; }; }; }; } public function NPI_sell_tower_click(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:int; if (NPI_gamemode != "paused"){ if (NPI_SelectedTower != -1){ if (NPI_Towers[NPI_SelectedTower].pTowerType == 10){ NPI_PlacedMine = false; text_next_gold.x = 1000; }; if (NPI_Towers[NPI_SelectedTower].pTowerType == 11){ NPI_PlacedChurch = false; text_next_prayer.x = 1000; }; NPI_Map[Math.round((NPI_Towers[NPI_SelectedTower].y / 32))][Math.round((NPI_Towers[NPI_SelectedTower].x / 32))] = 1; _local4 = (NPI_Enemies.length - 1); while (_local4 >= 0) { if (NPI_Enemies[_local4].y < 45){ _local2 = new Point(Math.round(NPI_Enemies[_local4].pPath[NPI_Enemies[_local4].pPathIndex][1]), Math.round(NPI_Enemies[_local4].pPath[NPI_Enemies[_local4].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); NPI_Enemies[_local4].pPath = NPI_Path; NPI_Enemies[_local4].mapchange(); }; _local4--; }; NPI_Gold = (NPI_Gold + int((0.95 * (NPI_Towers[NPI_SelectedTower].pCost * NPI_Towers[NPI_SelectedTower].pLevel)))); NPI_Gold = Math.round(NPI_Gold); text_gold.text = String(NPI_Gold); removeChild(NPI_Towers[NPI_SelectedTower]); NPI_Towers.splice(NPI_SelectedTower, 1); NPI_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; upgrade_tower.x = 900; text_tower_sell.x = 900; }; }; } function frame140(){ stop(); play_game.addEventListener(MouseEvent.MOUSE_UP, playthegame12); menu_playmore.addEventListener(MouseEvent.MOUSE_UP, sponsor); end_nopath_sandbox_score.text = ("Score - " + String(NPS_GameScore)); } public function backtomenu(_arg1:MouseEvent):void{ gotoAndStop(95); } public function NPI_buy_judgement_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Judgement Day(15 PP)"; text_towerinfo.text = "Calls forth Judgement Day upon your enemies."; } public function NPS_road_deselect(_arg1:MouseEvent):void{ TheGrid1.graphics.clear(); TheGrid1.alpha = 0; NPS_gamemode = "none"; NPS_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; } public function playhard(_arg1:MouseEvent):void{ gotoAndStop(45); } public function NP_everytime(_arg1:Event):void{ var b:int; var mX:int; var mY:int; var didHit:Boolean; var event = _arg1; try { if (NP_gamemode != "paused"){ NP_CheckEnemiesForDirections(); NP_CheckTowerFireBullet(); NP_MoveBullets(); NP_CheckEnemiesForHit(); NP_CheckEnemyHealth(); NP_UpdateEnemyHealthBar(); NP_CheckSelectedTower(); NP_MoveAndCheckAngelsOfDeath(); NP_MoveAndCheckBlizzard(); NP_MoveAndCheckJudgement(); if (getTimer() > (NP_LastWave + NP_WaveDelay)){ NP_placeenemies(); }; text_next_level.text = String(Math.round((((NP_WaveDelay + NP_LastWave) - getTimer()) / 1000))); if (NP_PlacedMine == true){ text_next_gold.text = String(Math.round((((NP_GoldUpdateSpeed + NP_LastGoldUpdate) - getTimer()) / 1000))); if (getTimer() > (NP_LastGoldUpdate + NP_GoldUpdateSpeed)){ NP_Gold = (NP_Gold + (NP_Gold * 0.02)); NP_Gold = Math.round(NP_Gold); text_gold.text = String(NP_Gold); NP_LastGoldUpdate = getTimer(); }; }; if (NP_PlacedChurch == true){ text_next_prayer.text = String(Math.round((((NP_PrayerUpdateSpeed + NP_LastPrayerUpdate) - getTimer()) / 1000))); if (getTimer() > (NP_LastPrayerUpdate + NP_PrayerUpdateSpeed)){ NP_Prayer = (NP_Prayer + 1); text_prayer.text = String(NP_Prayer); NP_LastPrayerUpdate = getTimer(); }; }; if (NP_gamemode == "set_tower"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ TheGrid1.graphics.clear(); if (didHit == false){ TheGrid1.graphics.moveTo(mX, mY); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.lineTo(mX, mY); TheGrid1.graphics.lineTo((mX + 32), mY); TheGrid1.graphics.lineTo((mX + 32), (mY + 32)); TheGrid1.graphics.lineTo(mX, (mY + 32)); TheGrid1.graphics.endFill(); }; }; }; if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ if (NP_selectedtowertype == "Arrow"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NP_selectedtowertype == "Arcane"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NP_selectedtowertype == "Cannon"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 125); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 124); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 123); TheGrid1.graphics.endFill(); }; if (NP_selectedtowertype == "Fire"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NP_selectedtowertype == "Ice"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 100); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 99); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 98); TheGrid1.graphics.endFill(); }; }; }; }; b = (NP_Towers.length - 1); while (b >= 0) { NP_Towers[b].graphics.clear(); b = (b - 1); }; drawonme.graphics.clear(); if (NP_SelectedTower != -1){ mX = 0; mY = 0; NP_Towers[NP_SelectedTower].graphics.clear(); NP_Towers[NP_SelectedTower].graphics.moveTo(mX, mY); NP_Towers[NP_SelectedTower].graphics.beginFill(0xFFFFFF, 0.5); NP_Towers[NP_SelectedTower].graphics.lineTo(mX, mY); NP_Towers[NP_SelectedTower].graphics.lineTo((mX + 32), mY); NP_Towers[NP_SelectedTower].graphics.lineTo((mX + 32), (mY + 32)); NP_Towers[NP_SelectedTower].graphics.lineTo(mX, (mY + 32)); NP_Towers[NP_SelectedTower].graphics.endFill(); if (NP_Towers[NP_SelectedTower].pTowerType <= 5){ upgrade_tower.x = 524; } else { upgrade_tower.x = 900; }; drawonme.graphics.clear(); drawonme.graphics.beginFill(0xFFFFFF, 0.2); drawonme.graphics.drawCircle((NP_Towers[NP_SelectedTower].x + 16), (NP_Towers[NP_SelectedTower].y + 16), NP_Towers[NP_SelectedTower].pRange); drawonme.graphics.endFill(); }; }; } catch(e:TypeError) { }; } public function NP_tower_select_fire_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Fire Tower (100g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Magic Damage)"; } public function NP_nextlevelbutton_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_Enemies.length < 51){ if (NP_GameLevel != 0){ NP_GameScore = (NP_GameScore + Math.round((((NP_WaveDelay + NP_LastWave) - getTimer()) / 1000))); text_score.text = String(NP_GameScore); }; if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_placeenemies(); }; }; } public function NPH_everytime(_arg1:Event):void{ var b:int; var mX:int; var mY:int; var didHit:Boolean; var event = _arg1; try { if (NPH_gamemode != "paused"){ NPH_CheckEnemiesForDirections(); NPH_CheckTowerFireBullet(); NPH_MoveBullets(); NPH_CheckEnemiesForHit(); NPH_CheckEnemyHealth(); NPH_UpdateEnemyHealthBar(); NPH_CheckSelectedTower(); NPH_MoveAndCheckAngelsOfDeath(); NPH_MoveAndCheckBlizzard(); NPH_MoveAndCheckJudgement(); if (getTimer() > (NPH_LastWave + NPH_WaveDelay)){ NPH_placeenemies(); }; text_next_level.text = String(Math.round((((NPH_WaveDelay + NPH_LastWave) - getTimer()) / 1000))); if (NPH_PlacedMine == true){ text_next_gold.text = String(Math.round((((NPH_GoldUpdateSpeed + NPH_LastGoldUpdate) - getTimer()) / 1000))); if (getTimer() > (NPH_LastGoldUpdate + NPH_GoldUpdateSpeed)){ NPH_Gold = (NPH_Gold + (NPH_Gold * 0.02)); NPH_Gold = Math.round(NPH_Gold); text_gold.text = String(NPH_Gold); NPH_LastGoldUpdate = getTimer(); }; }; if (NPH_PlacedChurch == true){ text_next_prayer.text = String(Math.round((((NPH_PrayerUpdateSpeed + NPH_LastPrayerUpdate) - getTimer()) / 1000))); if (getTimer() > (NPH_LastPrayerUpdate + NPH_PrayerUpdateSpeed)){ NPH_Prayer = (NPH_Prayer + 1); text_prayer.text = String(NPH_Prayer); NPH_LastPrayerUpdate = getTimer(); }; }; if (NPH_gamemode == "set_tower"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ TheGrid1.graphics.clear(); if (didHit == false){ TheGrid1.graphics.moveTo(mX, mY); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.lineTo(mX, mY); TheGrid1.graphics.lineTo((mX + 32), mY); TheGrid1.graphics.lineTo((mX + 32), (mY + 32)); TheGrid1.graphics.lineTo(mX, (mY + 32)); TheGrid1.graphics.endFill(); }; }; }; if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ if (NPH_selectedtowertype == "Arrow"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPH_selectedtowertype == "Arcane"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPH_selectedtowertype == "Cannon"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 125); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 124); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 123); TheGrid1.graphics.endFill(); }; if (NPH_selectedtowertype == "Fire"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPH_selectedtowertype == "Ice"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 100); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 99); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 98); TheGrid1.graphics.endFill(); }; }; }; }; b = (NPH_Towers.length - 1); while (b >= 0) { NPH_Towers[b].graphics.clear(); b = (b - 1); }; drawonme.graphics.clear(); if (NPH_SelectedTower != -1){ mX = 0; mY = 0; NPH_Towers[NPH_SelectedTower].graphics.clear(); NPH_Towers[NPH_SelectedTower].graphics.moveTo(mX, mY); NPH_Towers[NPH_SelectedTower].graphics.beginFill(0xFFFFFF, 0.5); NPH_Towers[NPH_SelectedTower].graphics.lineTo(mX, mY); NPH_Towers[NPH_SelectedTower].graphics.lineTo((mX + 32), mY); NPH_Towers[NPH_SelectedTower].graphics.lineTo((mX + 32), (mY + 32)); NPH_Towers[NPH_SelectedTower].graphics.lineTo(mX, (mY + 32)); NPH_Towers[NPH_SelectedTower].graphics.endFill(); if (NPH_Towers[NPH_SelectedTower].pTowerType <= 5){ upgrade_tower.x = 524; } else { upgrade_tower.x = 900; }; drawonme.graphics.clear(); drawonme.graphics.beginFill(0xFFFFFF, 0.2); drawonme.graphics.drawCircle((NPH_Towers[NPH_SelectedTower].x + 16), (NPH_Towers[NPH_SelectedTower].y + 16), NPH_Towers[NPH_SelectedTower].pRange); drawonme.graphics.endFill(); }; }; } catch(e:TypeError) { }; } public function NPS_musicright_mouse_up(_arg1:MouseEvent):void{ if (NPS_Muted == false){ NPS_CurrentSong++; if (NPS_CurrentSong == 6){ NPS_CurrentSong = 1; }; NPS_channel.stop(); if (NPS_CurrentSong == 1){ NPS_channel = NPS_Ambient1.play(0, 99999); }; if (NPS_CurrentSong == 2){ NPS_channel = NPS_Ambient2.play(0, 99999); }; if (NPS_CurrentSong == 3){ NPS_channel = NPS_Ambient3.play(0, 99999); }; if (NPS_CurrentSong == 4){ NPS_channel = NPS_Ambient4.play(0, 99999); }; if (NPS_CurrentSong == 5){ NPS_channel = NPS_Ambient5.play(0, 99999); }; }; } public function NP_select_mine_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mine (750g)"; text_towerinfo.text = "Adds 2% Of Your Gold Every 5 mins. Limit 1."; } public function NPI_tower_select_ice_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Ice Tower (25g)"; text_towerinfo.text = "Slows enemies down. (Magic Damage)"; } public function NPI_buy_blizzard_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:blizzard_graphic; if (NPI_gamemode != "paused"){ if (NPI_Prayer >= 3){ if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_Prayer = (NPI_Prayer - 3); text_prayer.text = String(NPI_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new blizzard_graphic(); drawonme.addChild(_local3); NPI_Blizzards.push(_local3); _local2++; }; }; }; } public function NPH_CheckEnemyHealth():void{ var i:int; var h:int; var k:int; var a:int; if (NPH_gamemode != "paused"){ try { i = (NPH_Enemies.length - 1); while (i >= 0) { if (NPH_Enemies[i].pHealth <= 0){ NPH_Enemies[i].x = -500; NPH_Enemies[i].y = -500; if (NPH_Enemies[i].pType == 5){ NPH_Gold = (NPH_Gold + Math.round(((1.75 * NPH_GameLevel) + 0.5))); NPH_GameScore = (NPH_GameScore + 50); } else { NPH_Gold = (NPH_Gold + Math.round(((0.25 * NPH_GameLevel) + 0.5))); NPH_GameScore = (NPH_GameScore + 10); }; removeChild(NPH_Enemies[i]); NPH_Enemies.splice(i, 1); text_gold.text = String(NPH_Gold); text_score.text = String(NPH_GameScore); h = (NPH_HealthBars.length - 1); while (h >= 0) { if (NPH_HealthBars[h].pEnemy == i){ NPH_HealthBars[h].x = -900; removeChild(NPH_HealthBars[h]); NPH_HealthBars.splice(h, 1); }; if (NPH_HealthBars[h].pEnemy > i){ NPH_HealthBars[h].pEnemy = (NPH_HealthBars[h].pEnemy - 1); }; h = (h - 1); }; k = (NPH_Bullets.length - 1); while (k >= 0) { if (k != i){ if (NPH_Bullets[k].pTarget > i){ NPH_Bullets[k].pTarget = (NPH_Bullets[k].pTarget - 1); }; }; if (NPH_Bullets[k].pTarget == i){ NPH_Bullets[k].x = -100; NPH_Bullets[k].y = -100; if (NPH_Bullets[k].pVisible == true){ removeChild(NPH_Bullets[k].pBullet); }; NPH_Bullets.splice(k, 1); }; k = (k - 1); }; a = (NPH_Towers.length - 1); while (a >= 0) { if (NPH_Towers[a].pTarget == i){ NPH_Towers[a].pTarget = -1; }; if (NPH_Towers[a].pTarget > i){ NPH_Towers[a].pTarget = (NPH_Towers[a].pTarget - 1); }; a = (a - 1); }; }; i = (i - 1); }; } catch(e:TypeError) { }; }; } public function NPS_select_mine_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mine (750g)"; text_towerinfo.text = "Adds 2% Of Your Gold Every 5 mins. Limit 1."; } public function NPI_restart_no(_arg1:MouseEvent):void{ restart_sure.x = 1000; restart_yes.x = 1000; restart_no.x = 1000; } public function playnopathsinsane(_arg1:MouseEvent):void{ gotoAndStop(125); } public function playnopathshard(_arg1:MouseEvent):void{ gotoAndStop(115); } public function playnopathssandbox(_arg1:MouseEvent):void{ gotoAndStop(135); } public function NP_placeenemies():void{ var _local1:*; var _local2:script_enemy_orc; var _local3:enemy_health_bar; var _local4:script_enemy_armororc; var _local5:enemy_health_bar; var _local6:script_enemy_goblin; var _local7:enemy_health_bar; var _local8:script_enemy_fasttroll; var _local9:enemy_health_bar; var _local10:script_enemy_tauren; var _local11:enemy_health_bar; var _local12:script_enemy_armortroll; var _local13:enemy_health_bar; var _local14:script_enemy_lion; var _local15:enemy_health_bar; var _local16:script_enemy_undead; var _local17:enemy_health_bar; var _local18:script_enemy_clothundead; var _local19:enemy_health_bar; var _local20:script_enemy_demon; var _local21:enemy_health_bar; var _local22:script_enemy_boss1; var _local23:enemy_health_bar; if (NP_gamemode != "paused"){ NP_WaveDelay = (NP_WaveDelay - 500); if (NP_WaveDelay < 10000){ NP_WaveDelay = 10000; }; NP_GameLevel = (NP_GameLevel + 1); NP_Path = Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x); _local1 = 0; while (_local1 < 25) { if (NP_LastEnemyType == 1){ _local2 = new script_enemy_orc(_local1, NP_GameLevel, "normal"); addChild(_local2); NP_Enemies.push(_local2); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local3 = new enemy_health_bar(); _local3.pEnemy = (NP_Enemies.length - 1); _local3.x = (_local2.x - 13); _local3.y = (_local2.y - 16); _local3.pWidth = 32; text_enemy_hp.text = String(Math.round(_local2.pStartHealth)); addChild(_local3); NP_HealthBars.push(_local3); _local2.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NP_LastEnemyType == 2){ _local4 = new script_enemy_armororc(_local1, NP_GameLevel, "normal"); addChild(_local4); NP_Enemies.push(_local4); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local5 = new enemy_health_bar(); _local5.pEnemy = (NP_Enemies.length - 1); _local5.x = (_local4.x - 13); _local5.y = (_local4.y - 16); _local5.pWidth = 32; text_enemy_hp.text = String(Math.round(_local4.pStartHealth)); addChild(_local5); NP_HealthBars.push(_local5); _local4.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NP_LastEnemyType == 3){ _local6 = new script_enemy_goblin(_local1, NP_GameLevel, "normal"); addChild(_local6); NP_Enemies.push(_local6); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local7 = new enemy_health_bar(); _local7.pEnemy = (NP_Enemies.length - 1); _local7.x = (_local6.x - 13); _local7.y = (_local6.y - 16); _local7.pWidth = 32; text_enemy_hp.text = String(Math.round(_local6.pStartHealth)); addChild(_local7); NP_HealthBars.push(_local7); _local6.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NP_LastEnemyType == 4){ _local8 = new script_enemy_fasttroll(_local1, NP_GameLevel, "normal"); addChild(_local8); NP_Enemies.push(_local8); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local9 = new enemy_health_bar(); _local9.pEnemy = (NP_Enemies.length - 1); _local9.x = (_local8.x - 13); _local9.y = (_local8.y - 16); _local9.pWidth = 32; text_enemy_hp.text = String(Math.round(_local8.pStartHealth)); addChild(_local9); NP_HealthBars.push(_local9); _local8.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NP_LastEnemyType == 5){ _local10 = new script_enemy_tauren(_local1, NP_GameLevel, "normal"); addChild(_local10); NP_Enemies.push(_local10); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local11 = new enemy_health_bar(); _local11.pEnemy = (NP_Enemies.length - 1); _local11.x = (_local10.x - 13); _local11.y = (_local10.y - 16); _local11.pWidth = 32; text_enemy_hp.text = String(Math.round(_local10.pStartHealth)); addChild(_local11); NP_HealthBars.push(_local11); _local10.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NP_LastEnemyType == 6){ _local12 = new script_enemy_armortroll(_local1, NP_GameLevel, "normal"); addChild(_local12); NP_Enemies.push(_local12); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local13 = new enemy_health_bar(); _local13.pEnemy = (NP_Enemies.length - 1); _local13.x = (_local12.x - 13); _local13.y = (_local12.y - 16); _local13.pWidth = 32; text_enemy_hp.text = String(Math.round(_local12.pStartHealth)); addChild(_local13); NP_HealthBars.push(_local13); _local12.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NP_LastEnemyType == 7){ _local14 = new script_enemy_lion(_local1, NP_GameLevel, "normal"); addChild(_local14); NP_Enemies.push(_local14); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local15 = new enemy_health_bar(); _local15.pEnemy = (NP_Enemies.length - 1); _local15.x = (_local14.x - 13); _local15.y = (_local14.y - 16); _local15.pWidth = 32; text_enemy_hp.text = String(Math.round(_local14.pStartHealth)); addChild(_local15); NP_HealthBars.push(_local15); _local14.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NP_LastEnemyType == 8){ _local16 = new script_enemy_undead(_local1, NP_GameLevel, "normal"); addChild(_local16); NP_Enemies.push(_local16); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local17 = new enemy_health_bar(); _local17.pEnemy = (NP_Enemies.length - 1); _local17.x = (_local16.x - 13); _local17.y = (_local16.y - 16); _local17.pWidth = 32; text_enemy_hp.text = String(Math.round(_local16.pStartHealth)); addChild(_local17); NP_HealthBars.push(_local17); _local16.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NP_LastEnemyType == 9){ _local18 = new script_enemy_clothundead(_local1, NP_GameLevel, "normal"); addChild(_local18); NP_Enemies.push(_local18); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local19 = new enemy_health_bar(); _local19.pEnemy = (NP_Enemies.length - 1); _local19.x = (_local18.x - 13); _local19.y = (_local18.y - 16); _local19.pWidth = 32; text_enemy_hp.text = String(Math.round(_local18.pStartHealth)); addChild(_local19); NP_HealthBars.push(_local19); _local18.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Immune to magic!"; } else { if (NP_LastEnemyType == 10){ _local20 = new script_enemy_demon(_local1, NP_GameLevel, "normal"); addChild(_local20); NP_Enemies.push(_local20); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local21 = new enemy_health_bar(); _local21.pEnemy = (NP_Enemies.length - 1); _local21.x = (_local20.x - 13); _local21.y = (_local20.y - 16); _local21.pWidth = 32; text_enemy_hp.text = String(Math.round(_local20.pStartHealth)); addChild(_local21); NP_HealthBars.push(_local21); _local20.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Boss Round"; }; }; }; }; }; }; }; }; }; }; _local1++; }; if (NP_LastEnemyType == 11){ _local22 = new script_enemy_boss1(0, NP_GameLevel, "normal"); addChild(_local22); NP_Enemies.push(_local22); NP_LastWave = getTimer(); text_level.text = String(NP_GameLevel); _local23 = new enemy_health_bar(); _local23.pEnemy = (NP_Enemies.length - 1); _local23.x = (_local22.x - 13); _local23.y = (_local22.y - 16); _local23.pWidth = 32; text_enemy_hp.text = String(Math.round(_local22.pStartHealth)); addChild(_local23); NP_HealthBars.push(_local23); _local22.pPath = NP_Path; text_nexttype.text = "Next Enemy Type : Normal"; }; NP_LastEnemyType = (NP_LastEnemyType + 1); if (NP_LastEnemyType == 12){ NP_LastEnemyType = 1; }; }; } public function NP_musicright_mouse_up(_arg1:MouseEvent):void{ if (NP_Muted == false){ NP_CurrentSong++; if (NP_CurrentSong == 6){ NP_CurrentSong = 1; }; NP_channel.stop(); if (NP_CurrentSong == 1){ NP_channel = NP_Ambient1.play(0, 99999); }; if (NP_CurrentSong == 2){ NP_channel = NP_Ambient2.play(0, 99999); }; if (NP_CurrentSong == 3){ NP_channel = NP_Ambient3.play(0, 99999); }; if (NP_CurrentSong == 4){ NP_channel = NP_Ambient4.play(0, 99999); }; if (NP_CurrentSong == 5){ NP_channel = NP_Ambient5.play(0, 99999); }; }; } public function NPS_upgrade_tower_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; if (NPS_gamemode != "paused"){ if (NPS_Gold >= (0.5 * (NPS_Towers[NPS_SelectedTower].pCost * (NPS_Towers[NPS_SelectedTower].pLevel + 1)))){ NPS_Gold = (NPS_Gold - (0.5 * (NPS_Towers[NPS_SelectedTower].pCost * (NPS_Towers[NPS_SelectedTower].pLevel + 1)))); NPS_Gold = Math.round(NPS_Gold); text_gold.text = String(NPS_Gold); if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_Towers[NPS_SelectedTower].pLevel = (NPS_Towers[NPS_SelectedTower].pLevel + 1); NPS_Towers[NPS_SelectedTower].pDamage = (NPS_Towers[NPS_SelectedTower].pOrigDamage * ((NPS_Towers[NPS_SelectedTower].pLevel / 1.1) * ((NPS_Towers[NPS_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; _local2 = (NPS_Towers[NPS_SelectedTower].pOrigDamage * (((NPS_Towers[NPS_SelectedTower].pLevel + 1) / 1.1) * (((NPS_Towers[NPS_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NPS_Towers[NPS_SelectedTower].pCost * (NPS_Towers[NPS_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NPS_Towers[NPS_SelectedTower].pLevel) + "(") + (NPS_Towers[NPS_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NPS_Towers[NPS_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); text_tower_range.text = ("Range - " + NPS_Towers[NPS_SelectedTower].pRange); text_tower_sell.text = ("Sell Value - " + String(int(((NPS_Towers[NPS_SelectedTower].pLevel * NPS_Towers[NPS_SelectedTower].pCost) * 0.7)))); }; }; } public function NPS_tower_select_arrow_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arrow Tower (30g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Normal Damage)"; } public function NPH_checkpathcollision(_arg1, _arg2):Boolean{ var _local3:*; var _local4:int; _local3 = (_arg1 + 1); _local4 = (_arg2 + 1); return (false); } public function NPS_playbutton_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; var _local3:int; var _local4:int; var _local5:int; var _local6:int; NPS_gamemode = "none"; playbutton.x = 900; pausebutton.x = 99; NPS_PausedTimer2 = getTimer(); _local2 = (NPS_PausedTimer2 - NPS_PausedTimer1); _local3 = (NPS_Towers.length - 1); while (_local3 >= 0) { NPS_Towers[_local3].pLastFire = (NPS_Towers[_local3].pLastFire + _local2); _local3--; }; NPS_LastPrayerUpdate = (NPS_LastPrayerUpdate + _local2); NPS_LastGoldUpdate = (NPS_LastGoldUpdate + _local2); NPS_LastWave = (NPS_LastWave + _local2); if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; _local4 = (NPS_Enemies.length - 1); while (_local4 >= 0) { NPS_Enemies[_local4].pPaused = false; _local4--; }; _local5 = (NPS_AngelsOfDeath.length - 1); while (_local5 >= 0) { NPS_AngelsOfDeath[_local5].pPaused = false; _local5--; }; _local6 = (NPS_Blizzards.length - 1); while (_local6 >= 0) { NPS_Blizzards[_local6].pPaused = false; _local6--; }; } public function NP_CheckEnemiesForDirections(){ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; if (NP_gamemode != "paused"){ _local1 = (NP_Enemies.length - 1); while (_local1 >= 0) { if (NP_Enemies[_local1].y > 500){ NP_Lives = (NP_Lives - 1); text_lives.text = String(NP_Lives); if (NP_Lives < 1){ _local5 = (NP_HealthBars.length - 1); while (_local5 >= 0) { removeChild(NP_HealthBars[_local5]); NP_HealthBars.splice(_local5, 1); _local5--; }; _local6 = (NP_Bullets.length - 1); while (_local6 >= 0) { if (NP_Bullets[_local6].pVisible == true){ removeChild(NP_Bullets[_local6]); }; NP_Bullets.splice(_local6, 1); _local6--; }; _local7 = (NP_Towers.length - 1); while (_local7 >= 0) { removeChild(NP_Towers[_local7]); NP_Towers.splice(_local7, 1); _local7--; }; _local8 = (NP_Enemies.length - 1); while (_local8 >= 0) { removeChild(NP_Enemies[_local8]); NP_Enemies.splice(_local8, 1); _local8--; }; removeEventListener(Event.ENTER_FRAME, NP_everytime); removeEventListener(KeyboardEvent.KEY_UP, NP_reportKeyUp); NP_channel.stop(); gotoAndStop(110); }; removeChild(NP_Enemies[_local1]); NP_Enemies.splice(_local1, 1); _local2 = (NP_HealthBars.length - 1); while (_local2 >= 0) { if (NP_HealthBars[_local2].pEnemy == _local1){ NP_HealthBars[_local2].x = -900; removeChild(NP_HealthBars[_local2]); NP_HealthBars.splice(_local2, 1); }; if (NP_HealthBars[_local2].pEnemy > _local1){ NP_HealthBars[_local2].pEnemy = (NP_HealthBars[_local2].pEnemy - 1); }; _local2--; }; _local3 = (NP_Bullets.length - 1); while (_local3 >= 0) { if (NP_Bullets[_local3].pTarget > _local1){ NP_Bullets[_local3].pTarget = (NP_Bullets[_local3].pTarget - 1); }; if (NP_Bullets[_local3].pTarget == _local1){ NP_Bullets[_local3].x = -100; NP_Bullets[_local3].y = -100; removeChild(NP_Bullets[_local3].pBullet); NP_Bullets.splice(_local3, 1); }; _local3--; }; _local4 = (NP_Towers.length - 1); while (_local4 >= 0) { if (NP_Towers[_local4].pTarget == _local1){ NP_Towers[_local4].pTarget = -1; }; if (NP_Towers[_local4].pTarget > _local1){ NP_Towers[_local4].pTarget = (NP_Towers[_local4].pTarget - 1); }; _local4--; }; }; _local1--; }; }; } public function NPS_musicright_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NPH_CheckEnemiesForDirections(){ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; if (NPH_gamemode != "paused"){ _local1 = (NPH_Enemies.length - 1); while (_local1 >= 0) { if (NPH_Enemies[_local1].y > 500){ NPH_Lives = (NPH_Lives - 1); text_lives.text = String(NPH_Lives); if (NPH_Lives < 1){ _local5 = (NPH_HealthBars.length - 1); while (_local5 >= 0) { removeChild(NPH_HealthBars[_local5]); NPH_HealthBars.splice(_local5, 1); _local5--; }; _local6 = (NPH_Bullets.length - 1); while (_local6 >= 0) { if (NPH_Bullets[_local6].pVisible == true){ removeChild(NPH_Bullets[_local6]); }; NPH_Bullets.splice(_local6, 1); _local6--; }; _local7 = (NPH_Towers.length - 1); while (_local7 >= 0) { removeChild(NPH_Towers[_local7]); NPH_Towers.splice(_local7, 1); _local7--; }; _local8 = (NPH_Enemies.length - 1); while (_local8 >= 0) { removeChild(NPH_Enemies[_local8]); NPH_Enemies.splice(_local8, 1); _local8--; }; removeEventListener(Event.ENTER_FRAME, NPH_everytime); removeEventListener(KeyboardEvent.KEY_UP, NPH_reportKeyUp); NPH_channel.stop(); gotoAndStop(120); }; removeChild(NPH_Enemies[_local1]); NPH_Enemies.splice(_local1, 1); _local2 = (NPH_HealthBars.length - 1); while (_local2 >= 0) { if (NPH_HealthBars[_local2].pEnemy == _local1){ NPH_HealthBars[_local2].x = -900; removeChild(NPH_HealthBars[_local2]); NPH_HealthBars.splice(_local2, 1); }; if (NPH_HealthBars[_local2].pEnemy > _local1){ NPH_HealthBars[_local2].pEnemy = (NPH_HealthBars[_local2].pEnemy - 1); }; _local2--; }; _local3 = (NPH_Bullets.length - 1); while (_local3 >= 0) { if (NPH_Bullets[_local3].pTarget > _local1){ NPH_Bullets[_local3].pTarget = (NPH_Bullets[_local3].pTarget - 1); }; if (NPH_Bullets[_local3].pTarget == _local1){ NPH_Bullets[_local3].x = -100; NPH_Bullets[_local3].y = -100; removeChild(NPH_Bullets[_local3].pBullet); NPH_Bullets.splice(_local3, 1); }; _local3--; }; _local4 = (NPH_Towers.length - 1); while (_local4 >= 0) { if (NPH_Towers[_local4].pTarget == _local1){ NPH_Towers[_local4].pTarget = -1; }; if (NPH_Towers[_local4].pTarget > _local1){ NPH_Towers[_local4].pTarget = (NPH_Towers[_local4].pTarget - 1); }; _local4--; }; }; _local1--; }; }; } public function NP_the_grid_place_tower(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Boolean; var _local4:Number; var _local5:*; var _local6:int; var _local7:tower_arrow; var _local8:tower_arcane; var _local9:tower_cannon; var _local10:tower_ice; var _local11:tower_fire; var _local12:building_mine; var _local13:building_church; if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) >= 2)) && ((int((root.mouseY / 32)) <= 13)))){ if (NP_selectedtowertype == "Arrow"){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 30)) && ((_local3 == true)))){ _local7 = new tower_arrow(); _local7.x = (int((root.mouseX / 32)) * 32); _local7.y = (int((root.mouseY / 32)) * 32); addChild(_local7); NP_Towers.push(_local7); NP_Gold = (NP_Gold - 30); text_gold.text = String(NP_Gold); NP_Map[Math.round((_local7.y / 32))][Math.round((_local7.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NP_selectedtowertype == "Arcane"){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 125)) && ((_local3 == true)))){ _local8 = new tower_arcane(); _local8.x = (int((root.mouseX / 32)) * 32); _local8.y = (int((root.mouseY / 32)) * 32); addChild(_local8); NP_Towers.push(_local8); NP_Gold = (NP_Gold - 125); text_gold.text = String(NP_Gold); NP_Map[Math.round((_local8.y / 32))][Math.round((_local8.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NP_selectedtowertype == "Cannon"){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 75)) && ((_local3 == true)))){ _local9 = new tower_cannon(); _local9.x = (int((root.mouseX / 32)) * 32); _local9.y = (int((root.mouseY / 32)) * 32); addChild(_local9); NP_Towers.push(_local9); NP_Gold = (NP_Gold - 75); text_gold.text = String(NP_Gold); NP_Map[Math.round((_local9.y / 32))][Math.round((_local9.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NP_selectedtowertype == "Ice"){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 25)) && ((_local3 == true)))){ _local10 = new tower_ice(); _local10.x = (int((root.mouseX / 32)) * 32); _local10.y = (int((root.mouseY / 32)) * 32); addChild(_local10); NP_Towers.push(_local10); NP_Gold = (NP_Gold - 25); text_gold.text = String(NP_Gold); NP_Map[Math.round((_local10.y / 32))][Math.round((_local10.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NP_selectedtowertype == "Fire"){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 100)) && ((_local3 == true)))){ _local11 = new tower_fire(); _local11.x = (int((root.mouseX / 32)) * 32); _local11.y = (int((root.mouseY / 32)) * 32); addChild(_local11); NP_Towers.push(_local11); NP_Gold = (NP_Gold - 100); text_gold.text = String(NP_Gold); NP_Map[Math.round((_local11.y / 32))][Math.round((_local11.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NP_selectedtowertype == "Mine"){ if (NP_PlacedMine == false){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 750)) && ((_local3 == true)))){ _local12 = new building_mine(); _local12.x = (int((root.mouseX / 32)) * 32); _local12.y = (int((root.mouseY / 32)) * 32); addChild(_local12); NP_Towers.push(_local12); text_next_gold.x = (_local12.x + 3); text_next_gold.y = (_local12.y + 18); addChild(text_next_gold); NP_Gold = (NP_Gold - 750); text_gold.text = String(NP_Gold); NP_PlacedMine = true; NP_LastGoldUpdate = getTimer(); NP_Map[Math.round((_local12.y / 32))][Math.round((_local12.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; if (NP_selectedtowertype == "Church"){ if (NP_PlacedChurch == false){ _local3 = true; NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NP_Map, NP_MapStart.y, NP_MapStart.x, NP_MapEnd.y, NP_MapEnd.x) != null){ _local6 = (NP_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NP_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NP_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NP_Gold >= 500)) && ((_local3 == true)))){ _local13 = new building_church(); _local13.x = (int((root.mouseX / 32)) * 32); _local13.y = (int((root.mouseY / 32)) * 32); addChild(_local13); NP_Towers.push(_local13); text_next_prayer.x = (_local13.x + 5); text_next_prayer.y = (_local13.y + 18); addChild(text_next_prayer); NP_Gold = (NP_Gold - 500); text_gold.text = String(NP_Gold); NP_PlacedChurch = true; NP_LastPrayerUpdate = getTimer(); NP_Map[Math.round((_local13.y / 32))][Math.round((_local13.x / 32))] = 0; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { if (NP_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][1]), Math.round(NP_Enemies[_local5].pPath[NP_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); if (NP_Path == null){ }; NP_Enemies[_local5].pPath = NP_Path; NP_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NP_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; }; }; }; NP_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; }; } public function NPS_musicmute_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mute Sound"; text_towerinfo.text = "Mutes all sound."; } public function NP_CheckSelectedTower():void{ var _local1:int; var _local2:int; if (NP_gamemode != "paused"){ _local1 = (NP_Towers.length - 1); while (_local1 >= 0) { if (NP_Towers[_local1].CheckSelected() == true){ NP_SelectedTower = _local1; sell_tower.x = 524; text_tower_damage.x = 484; text_tower_level.x = 484; text_tower_range.x = 484; text_tower_sell.x = 484; text_tower_damage.text = ("Damage - " + NP_Towers[_local1].pDamage.toFixed(2)); text_tower_range.text = ("Range - " + NP_Towers[_local1].pRange); text_tower_level.text = ("Level - " + NP_Towers[_local1].pLevel); text_tower_sell.text = ("Sell Value - " + String(int(((NP_Towers[_local1].pLevel * NP_Towers[_local1].pCost) * 0.95)))); NP_gamemode = "none"; TheGrid1.alpha = 0; NP_selectedtowertype = "none"; }; _local1--; }; _local2 = (NP_Towers.length - 1); while (_local2 >= 0) { NP_Towers[_local2].pSelected = false; _local2--; }; }; } public function NPS_pausebutton_mouse_up(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; NPS_gamemode = "paused"; if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; playbutton.x = 99; pausebutton.x = 900; NPS_PausedTimer1 = getTimer(); _local2 = (NPS_Enemies.length - 1); while (_local2 >= 0) { NPS_Enemies[_local2].pPaused = true; _local2--; }; _local3 = (NPS_AngelsOfDeath.length - 1); while (_local3 >= 0) { NPS_AngelsOfDeath[_local3].pPaused = true; _local3--; }; _local4 = (NPS_Blizzards.length - 1); while (_local4 >= 0) { NPS_Blizzards[_local4].pPaused = true; _local4--; }; } public function NPH_tower_select_arrow_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Arrow"){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; NPH_gamemode = "off"; TheGrid1.alpha = 0; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Arrow"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Arrow"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Arrow"; }; }; }; } public function NPI_the_grid_place_tower(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Boolean; var _local4:Number; var _local5:*; var _local6:int; var _local7:tower_arrow; var _local8:tower_arcane; var _local9:tower_cannon; var _local10:tower_ice; var _local11:tower_fire; var _local12:building_mine; var _local13:building_church; if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) >= 2)) && ((int((root.mouseY / 32)) <= 13)))){ if (NPI_selectedtowertype == "Arrow"){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 30)) && ((_local3 == true)))){ _local7 = new tower_arrow(); _local7.x = (int((root.mouseX / 32)) * 32); _local7.y = (int((root.mouseY / 32)) * 32); addChild(_local7); NPI_Towers.push(_local7); NPI_Gold = (NPI_Gold - 30); text_gold.text = String(NPI_Gold); NPI_Map[Math.round((_local7.y / 32))][Math.round((_local7.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPI_selectedtowertype == "Arcane"){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 125)) && ((_local3 == true)))){ _local8 = new tower_arcane(); _local8.x = (int((root.mouseX / 32)) * 32); _local8.y = (int((root.mouseY / 32)) * 32); addChild(_local8); NPI_Towers.push(_local8); NPI_Gold = (NPI_Gold - 125); text_gold.text = String(NPI_Gold); NPI_Map[Math.round((_local8.y / 32))][Math.round((_local8.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPI_selectedtowertype == "Cannon"){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 75)) && ((_local3 == true)))){ _local9 = new tower_cannon(); _local9.x = (int((root.mouseX / 32)) * 32); _local9.y = (int((root.mouseY / 32)) * 32); addChild(_local9); NPI_Towers.push(_local9); NPI_Gold = (NPI_Gold - 75); text_gold.text = String(NPI_Gold); NPI_Map[Math.round((_local9.y / 32))][Math.round((_local9.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPI_selectedtowertype == "Ice"){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 25)) && ((_local3 == true)))){ _local10 = new tower_ice(); _local10.x = (int((root.mouseX / 32)) * 32); _local10.y = (int((root.mouseY / 32)) * 32); addChild(_local10); NPI_Towers.push(_local10); NPI_Gold = (NPI_Gold - 25); text_gold.text = String(NPI_Gold); NPI_Map[Math.round((_local10.y / 32))][Math.round((_local10.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPI_selectedtowertype == "Fire"){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 100)) && ((_local3 == true)))){ _local11 = new tower_fire(); _local11.x = (int((root.mouseX / 32)) * 32); _local11.y = (int((root.mouseY / 32)) * 32); addChild(_local11); NPI_Towers.push(_local11); NPI_Gold = (NPI_Gold - 100); text_gold.text = String(NPI_Gold); NPI_Map[Math.round((_local11.y / 32))][Math.round((_local11.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPI_selectedtowertype == "Mine"){ if (NPI_PlacedMine == false){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 750)) && ((_local3 == true)))){ _local12 = new building_mine(); _local12.x = (int((root.mouseX / 32)) * 32); _local12.y = (int((root.mouseY / 32)) * 32); addChild(_local12); NPI_Towers.push(_local12); text_next_gold.x = (_local12.x + 3); text_next_gold.y = (_local12.y + 18); addChild(text_next_gold); NPI_Gold = (NPI_Gold - 750); text_gold.text = String(NPI_Gold); NPI_PlacedMine = true; NPI_LastGoldUpdate = getTimer(); NPI_Map[Math.round((_local12.y / 32))][Math.round((_local12.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; if (NPI_selectedtowertype == "Church"){ if (NPI_PlacedChurch == false){ _local3 = true; NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x) != null){ _local6 = (NPI_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPI_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPI_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPI_Gold >= 1000)) && ((_local3 == true)))){ _local13 = new building_church(); _local13.x = (int((root.mouseX / 32)) * 32); _local13.y = (int((root.mouseY / 32)) * 32); addChild(_local13); NPI_Towers.push(_local13); text_next_prayer.x = (_local13.x + 5); text_next_prayer.y = (_local13.y + 18); addChild(text_next_prayer); NPI_Gold = (NPI_Gold - 1000); text_gold.text = String(NPI_Gold); NPI_PlacedChurch = true; NPI_LastPrayerUpdate = getTimer(); NPI_Map[Math.round((_local13.y / 32))][Math.round((_local13.x / 32))] = 0; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { if (NPI_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][1]), Math.round(NPI_Enemies[_local5].pPath[NPI_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPI_Path = Pathfinding.findPath(NPI_Map, _local2.y, _local2.x, NPI_MapEnd.y, NPI_MapEnd.x); if (NPI_Path == null){ }; NPI_Enemies[_local5].pPath = NPI_Path; NPI_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPI_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; }; }; }; NPI_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; }; } public function NPS_tower_select_fire_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Fire Tower (100g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Magic Damage)"; } public function NPI_buy_church_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Church (1000g)"; text_towerinfo.text = "Adds Prayer Points. Limit 1."; } public function NPI_reportKeyUp(_arg1:KeyboardEvent):void{ var _local2:Number; var _local3:int; if (_arg1.keyCode == 49){ NPI_tower_select_arrow_mouse_up(NPI_MouseEvent); }; if (_arg1.keyCode == 50){ NPI_tower_select_cannon_mouse_up(NPI_MouseEvent); }; if (_arg1.keyCode == 51){ NPI_tower_select_arcane_mouse_up(NPI_MouseEvent); }; if (_arg1.keyCode == 52){ NPI_tower_select_fire_mouse_up(NPI_MouseEvent); }; if (_arg1.keyCode == 53){ NPI_tower_select_ice_mouse_up(NPI_MouseEvent); }; if (_arg1.keyCode == 85){ if (NPI_gamemode != "paused"){ if (NPI_SelectedTower != -1){ _local3 = 0; while (_local3 <= 31) { if (NPI_Towers[NPI_SelectedTower].pLevel < 31){ if (NPI_Gold >= (0.5 * (NPI_Towers[NPI_SelectedTower].pCost * (NPI_Towers[NPI_SelectedTower].pLevel + 1)))){ NPI_Gold = (NPI_Gold - (0.5 * (NPI_Towers[NPI_SelectedTower].pCost * (NPI_Towers[NPI_SelectedTower].pLevel + 1)))); NPI_Gold = Math.round(NPI_Gold); text_gold.text = String(NPI_Gold); if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_Towers[NPI_SelectedTower].pLevel = (NPI_Towers[NPI_SelectedTower].pLevel + 1); NPI_Towers[NPI_SelectedTower].pDamage = (NPI_Towers[NPI_SelectedTower].pOrigDamage * ((NPI_Towers[NPI_SelectedTower].pLevel / 1.1) * ((NPI_Towers[NPI_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; text_tower_range.text = ("Range - " + NPI_Towers[NPI_SelectedTower].pRange); text_tower_damage.text = ("Damage - " + NPI_Towers[NPI_SelectedTower].pDamage.toFixed(2)); text_tower_level.text = ("Level - " + String(NPI_Towers[NPI_SelectedTower].pLevel)); text_tower_sell.text = ("Sell Value - " + String(int(((NPI_Towers[NPI_SelectedTower].pLevel * NPI_Towers[NPI_SelectedTower].pCost) * 0.7)))); }; }; _local3++; }; }; }; }; if (_arg1.keyCode == 83){ NPI_sell_tower_click(NPI_MouseEvent); }; } public function NPS_CheckEnemiesForDirections(){ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; if (NPS_gamemode != "paused"){ _local1 = (NPS_Enemies.length - 1); while (_local1 >= 0) { if (NPS_Enemies[_local1].y > 500){ NPS_Lives = (NPS_Lives - 1); text_lives.text = String(NPS_Lives); if (NPS_Lives < 1){ _local5 = (NPS_HealthBars.length - 1); while (_local5 >= 0) { removeChild(NPS_HealthBars[_local5]); NPS_HealthBars.splice(_local5, 1); _local5--; }; _local6 = (NPS_Bullets.length - 1); while (_local6 >= 0) { if (NPS_Bullets[_local6].pVisible == true){ removeChild(NPS_Bullets[_local6]); }; NPS_Bullets.splice(_local6, 1); _local6--; }; _local7 = (NPS_Towers.length - 1); while (_local7 >= 0) { removeChild(NPS_Towers[_local7]); NPS_Towers.splice(_local7, 1); _local7--; }; _local8 = (NPS_Enemies.length - 1); while (_local8 >= 0) { removeChild(NPS_Enemies[_local8]); NPS_Enemies.splice(_local8, 1); _local8--; }; removeEventListener(Event.ENTER_FRAME, NPS_everytime); removeEventListener(KeyboardEvent.KEY_UP, NPS_reportKeyUp); NPS_channel.stop(); gotoAndStop(140); }; removeChild(NPS_Enemies[_local1]); NPS_Enemies.splice(_local1, 1); _local2 = (NPS_HealthBars.length - 1); while (_local2 >= 0) { if (NPS_HealthBars[_local2].pEnemy == _local1){ NPS_HealthBars[_local2].x = -900; removeChild(NPS_HealthBars[_local2]); NPS_HealthBars.splice(_local2, 1); }; if (NPS_HealthBars[_local2].pEnemy > _local1){ NPS_HealthBars[_local2].pEnemy = (NPS_HealthBars[_local2].pEnemy - 1); }; _local2--; }; _local3 = (NPS_Bullets.length - 1); while (_local3 >= 0) { if (NPS_Bullets[_local3].pTarget > _local1){ NPS_Bullets[_local3].pTarget = (NPS_Bullets[_local3].pTarget - 1); }; if (NPS_Bullets[_local3].pTarget == _local1){ NPS_Bullets[_local3].x = -100; NPS_Bullets[_local3].y = -100; removeChild(NPS_Bullets[_local3].pBullet); NPS_Bullets.splice(_local3, 1); }; _local3--; }; _local4 = (NPS_Towers.length - 1); while (_local4 >= 0) { if (NPS_Towers[_local4].pTarget == _local1){ NPS_Towers[_local4].pTarget = -1; }; if (NPS_Towers[_local4].pTarget > _local1){ NPS_Towers[_local4].pTarget = (NPS_Towers[_local4].pTarget - 1); }; _local4--; }; }; _local1--; }; }; } public function sponsor(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.arcadereign.com"; _local3 = new URLRequest(_local2); navigateToURL(_local3); } public function NP_musicmute_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mute Sound"; text_towerinfo.text = "Mutes all sound."; } public function NPI_musicright_mouse_up(_arg1:MouseEvent):void{ if (NPI_Muted == false){ NPI_CurrentSong++; if (NPI_CurrentSong == 6){ NPI_CurrentSong = 1; }; NPI_channel.stop(); if (NPI_CurrentSong == 1){ NPI_channel = NPI_Ambient1.play(0, 99999); }; if (NPI_CurrentSong == 2){ NPI_channel = NPI_Ambient2.play(0, 99999); }; if (NPI_CurrentSong == 3){ NPI_channel = NPI_Ambient3.play(0, 99999); }; if (NPI_CurrentSong == 4){ NPI_channel = NPI_Ambient4.play(0, 99999); }; if (NPI_CurrentSong == 5){ NPI_channel = NPI_Ambient5.play(0, 99999); }; }; } public function NP_playbutton_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; var _local3:int; var _local4:int; var _local5:int; var _local6:int; NP_gamemode = "none"; playbutton.x = 900; pausebutton.x = 99; NP_PausedTimer2 = getTimer(); _local2 = (NP_PausedTimer2 - NP_PausedTimer1); _local3 = (NP_Towers.length - 1); while (_local3 >= 0) { NP_Towers[_local3].pLastFire = (NP_Towers[_local3].pLastFire + _local2); _local3--; }; NP_LastPrayerUpdate = (NP_LastPrayerUpdate + _local2); NP_LastGoldUpdate = (NP_LastGoldUpdate + _local2); NP_LastWave = (NP_LastWave + _local2); if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; _local4 = (NP_Enemies.length - 1); while (_local4 >= 0) { NP_Enemies[_local4].pPaused = false; _local4--; }; _local5 = (NP_AngelsOfDeath.length - 1); while (_local5 >= 0) { NP_AngelsOfDeath[_local5].pPaused = false; _local5--; }; _local6 = (NP_Blizzards.length - 1); while (_local6 >= 0) { NP_Blizzards[_local6].pPaused = false; _local6--; }; } public function NPH_select_mine_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mine (750g)"; text_towerinfo.text = "Adds 2% Of Your Gold Every 5 mins. Limit 1."; } public function NP_road_deselect(_arg1:MouseEvent):void{ TheGrid1.graphics.clear(); TheGrid1.alpha = 0; NP_gamemode = "none"; NP_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; } public function NPH_tower_select_arcane_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arcane Tower (125g)"; text_towerinfo.text = "Medium Speed, High Dmg. (Magic Damage)"; } public function NPI_restart_yes(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = (NPI_HealthBars.length - 1); while (_local2 >= 0) { removeChild(NPI_HealthBars[_local2]); NPI_HealthBars.splice(_local2, 1); _local2--; }; _local3 = (NPI_Bullets.length - 1); while (_local3 >= 0) { if (NPI_Bullets[_local3].pVisible == true){ removeChild(NPI_Bullets[_local3]); }; NPI_Bullets.splice(_local3, 1); _local3--; }; _local4 = (NPI_Towers.length - 1); while (_local4 >= 0) { removeChild(NPI_Towers[_local4]); NPI_Towers.splice(_local4, 1); _local4--; }; _local5 = (NPI_Enemies.length - 1); while (_local5 >= 0) { removeChild(NPI_Enemies[_local5]); NPI_Enemies.splice(_local5, 1); _local5--; }; removeEventListener(Event.ENTER_FRAME, NPI_everytime); removeEventListener(KeyboardEvent.KEY_UP, NPI_reportKeyUp); NPI_channel.stop(); gotoAndStop(10); } public function NPI_buy_judgement_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:judgement; if (NPI_gamemode != "paused"){ if (NPI_Prayer >= 15){ if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_Prayer = (NPI_Prayer - 15); text_prayer.text = String(NPI_Prayer); _local2 = 0; while (_local2 < (NPI_Enemies.length - 1)) { _local3 = new judgement(); _local3.x = NPI_Enemies[_local2].x; _local3.y = NPI_Enemies[_local2].y; NPI_Enemies[_local2].GotHit(999999, 1); drawonme.addChild(_local3); NPI_Judgement.push(_local3); _local2++; }; }; }; } public function NPS_UpdateEnemyHealthBar():void{ var _local1:Number; var _local2:Number; var _local3:int; if (NPS_gamemode != "paused"){ _local3 = (NPS_HealthBars.length - 1); while (_local3 >= 0) { _local1 = (NPS_Enemies[NPS_HealthBars[_local3].pEnemy].pHealth / NPS_Enemies[NPS_HealthBars[_local3].pEnemy].pStartHealth); _local1 = (_local1 * 100); _local2 = ((27 * _local1) / 100); NPS_HealthBars[_local3].x = (NPS_Enemies[NPS_HealthBars[_local3].pEnemy].x - 13); NPS_HealthBars[_local3].y = (NPS_Enemies[NPS_HealthBars[_local3].pEnemy].y - 16); NPS_HealthBars[_local3].pWidth = _local2; NPS_HealthBars[_local3].width = _local2; _local3--; }; }; } public function NPH_tower_select_cannon_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Cannon Tower (75g)"; text_towerinfo.text = "Medium Dmg, Splash Dmg. (Normal Damage)"; } public function NP_musicmute_mouse_up(_arg1:MouseEvent):void{ if (NP_Muted == false){ NP_channel.stop(); NP_Muted = true; } else { if (NP_CurrentSong == 1){ NP_channel = NP_Ambient1.play(0, 99999); }; if (NP_CurrentSong == 2){ NP_channel = NP_Ambient2.play(0, 99999); }; if (NP_CurrentSong == 3){ NP_channel = NP_Ambient3.play(0, 99999); }; if (NP_CurrentSong == 4){ NP_channel = NP_Ambient4.play(0, 99999); }; if (NP_CurrentSong == 5){ NP_channel = NP_Ambient5.play(0, 99999); }; NP_Muted = false; }; } public function NPI_road_deselect(_arg1:MouseEvent):void{ TheGrid1.graphics.clear(); TheGrid1.alpha = 0; NPI_gamemode = "none"; NPI_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; } public function NPH_buy_blizzard_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Blizzard(3 PP)"; text_towerinfo.text = "Calls forth a Blizzard to slow your enemies."; } public function NPI_CheckEnemiesForDirections(){ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; if (NPI_gamemode != "paused"){ _local1 = (NPI_Enemies.length - 1); while (_local1 >= 0) { if (NPI_Enemies[_local1].y > 500){ NPI_Lives = (NPI_Lives - 1); text_lives.text = String(NPI_Lives); if (NPI_Lives < 1){ _local5 = (NPI_HealthBars.length - 1); while (_local5 >= 0) { removeChild(NPI_HealthBars[_local5]); NPI_HealthBars.splice(_local5, 1); _local5--; }; _local6 = (NPI_Bullets.length - 1); while (_local6 >= 0) { if (NPI_Bullets[_local6].pVisible == true){ removeChild(NPI_Bullets[_local6]); }; NPI_Bullets.splice(_local6, 1); _local6--; }; _local7 = (NPI_Towers.length - 1); while (_local7 >= 0) { removeChild(NPI_Towers[_local7]); NPI_Towers.splice(_local7, 1); _local7--; }; _local8 = (NPI_Enemies.length - 1); while (_local8 >= 0) { removeChild(NPI_Enemies[_local8]); NPI_Enemies.splice(_local8, 1); _local8--; }; removeEventListener(Event.ENTER_FRAME, NPI_everytime); removeEventListener(KeyboardEvent.KEY_UP, NPI_reportKeyUp); NPI_channel.stop(); gotoAndStop(130); }; removeChild(NPI_Enemies[_local1]); NPI_Enemies.splice(_local1, 1); _local2 = (NPI_HealthBars.length - 1); while (_local2 >= 0) { if (NPI_HealthBars[_local2].pEnemy == _local1){ NPI_HealthBars[_local2].x = -900; removeChild(NPI_HealthBars[_local2]); NPI_HealthBars.splice(_local2, 1); }; if (NPI_HealthBars[_local2].pEnemy > _local1){ NPI_HealthBars[_local2].pEnemy = (NPI_HealthBars[_local2].pEnemy - 1); }; _local2--; }; _local3 = (NPI_Bullets.length - 1); while (_local3 >= 0) { if (NPI_Bullets[_local3].pTarget > _local1){ NPI_Bullets[_local3].pTarget = (NPI_Bullets[_local3].pTarget - 1); }; if (NPI_Bullets[_local3].pTarget == _local1){ NPI_Bullets[_local3].x = -100; NPI_Bullets[_local3].y = -100; removeChild(NPI_Bullets[_local3].pBullet); NPI_Bullets.splice(_local3, 1); }; _local3--; }; _local4 = (NPI_Towers.length - 1); while (_local4 >= 0) { if (NPI_Towers[_local4].pTarget == _local1){ NPI_Towers[_local4].pTarget = -1; }; if (NPI_Towers[_local4].pTarget > _local1){ NPI_Towers[_local4].pTarget = (NPI_Towers[_local4].pTarget - 1); }; _local4--; }; }; _local1--; }; }; } public function NPH_MoveAndCheckBlizzard():void{ var _local1:int; var _local2:int; if (NPH_gamemode != "paused"){ _local1 = (NPH_Blizzards.length - 1); while (_local1 >= 0) { _local2 = (NPH_Enemies.length - 1); while (_local2 >= 0) { if (NPH_Enemies[_local2].hitTestObject(NPH_Blizzards[_local1])){ NPH_Enemies[_local2].pSpeed = 0; }; _local2--; }; if (NPH_Blizzards[_local1].y < -128){ drawonme.removeChild(NPH_Blizzards[_local1]); NPH_Blizzards.splice(_local1, 1); }; _local1--; }; }; } public function NPS_MoveAndCheckJudgement():void{ var _local1:int; if (NPS_gamemode != "paused"){ _local1 = (NPS_Judgement.length - 1); while (_local1 >= 0) { if (NPS_Judgement[_local1].y < -114){ drawonme.removeChild(NPS_Judgement[_local1]); NPS_Judgement.splice(_local1, 1); }; _local1--; }; }; } public function NPS_buy_angel_death_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:angel_of_death; if (NPS_gamemode != "paused"){ if (NPS_Prayer >= 10){ if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_Prayer = (NPS_Prayer - 10); text_prayer.text = String(NPS_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new angel_of_death(); drawonme.addChild(_local3); NPS_AngelsOfDeath.push(_local3); _local2++; }; }; }; } public function NPI_playbutton_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; var _local3:int; var _local4:int; var _local5:int; var _local6:int; NPI_gamemode = "none"; playbutton.x = 900; pausebutton.x = 99; NPI_PausedTimer2 = getTimer(); _local2 = (NPI_PausedTimer2 - NPI_PausedTimer1); _local3 = (NPI_Towers.length - 1); while (_local3 >= 0) { NPI_Towers[_local3].pLastFire = (NPI_Towers[_local3].pLastFire + _local2); _local3--; }; NPI_LastPrayerUpdate = (NPI_LastPrayerUpdate + _local2); NPI_LastGoldUpdate = (NPI_LastGoldUpdate + _local2); NPI_LastWave = (NPI_LastWave + _local2); if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; _local4 = (NPI_Enemies.length - 1); while (_local4 >= 0) { NPI_Enemies[_local4].pPaused = false; _local4--; }; _local5 = (NPI_AngelsOfDeath.length - 1); while (_local5 >= 0) { NPI_AngelsOfDeath[_local5].pPaused = false; _local5--; }; _local6 = (NPI_Blizzards.length - 1); while (_local6 >= 0) { NPI_Blizzards[_local6].pPaused = false; _local6--; }; } public function NPS_musicleft_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NP_MoveAndCheckJudgement():void{ var _local1:int; if (NP_gamemode != "paused"){ _local1 = (NP_Judgement.length - 1); while (_local1 >= 0) { if (NP_Judgement[_local1].y < -114){ drawonme.removeChild(NP_Judgement[_local1]); NP_Judgement.splice(_local1, 1); }; _local1--; }; }; } public function NP_tower_select_arrow_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Arrow"){ if (NP_Muted == false){ NP_ButtonClick.play(); }; NP_gamemode = "off"; TheGrid1.alpha = 0; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Arrow"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Arrow"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Arrow"; }; }; }; } public function NPS_musicleft_mouse_up(_arg1:MouseEvent):void{ if (NPS_Muted == false){ NPS_CurrentSong--; if (NPS_CurrentSong == 0){ NPS_CurrentSong = 5; }; NPS_channel.stop(); if (NPS_CurrentSong == 1){ NPS_channel = NPS_Ambient1.play(0, 99999); }; if (NPS_CurrentSong == 2){ NPS_channel = NPS_Ambient2.play(0, 99999); }; if (NPS_CurrentSong == 3){ NPS_channel = NPS_Ambient3.play(0, 99999); }; if (NPS_CurrentSong == 4){ NPS_channel = NPS_Ambient4.play(0, 99999); }; if (NPS_CurrentSong == 5){ NPS_channel = NPS_Ambient5.play(0, 99999); }; }; } public function NP_musicleft_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NPI_tower_select_arrow_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arrow Tower (30g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Normal Damage)"; } public function NPS_CheckEnemiesForHit():void{ var i:int; var k:int; var xdist:Number; var ydist:Number; var distancefromthis:Number; var a:int; if (NPS_gamemode != "paused"){ try { i = (NPS_Enemies.length - 1); while (i >= 0) { k = (NPS_Bullets.length - 1); while (k >= 0) { if (NPS_Enemies[i].hitTestObject(NPS_Bullets[k])){ NPS_Enemies[i].GotHit(NPS_Bullets[k].pDamage, NPS_Bullets[k].pBulletType); if (NPS_Bullets[k].pBulletType == 2){ if (NPS_Enemies[i].pSpeed > 0.3){ NPS_Enemies[i].pSpeed = (NPS_Enemies[i].pSpeed - 0.2); }; }; if (NPS_Bullets[k].pBulletType == 4){ a = (NPS_Enemies.length - 1); while (a >= 0) { xdist = Math.round((NPS_Bullets[k].x - NPS_Enemies[a].x)); ydist = Math.round((NPS_Bullets[k].y - NPS_Enemies[a].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < 50){ if (a != NPS_Bullets[k].pTarget){ NPS_Enemies[a].GotHit(((5 * NPS_Towers[NPS_Bullets[k].pTower].pLevel) * 0.75), 4); }; }; a = (a - 1); }; }; NPS_Bullets[k].x = -100; NPS_Bullets[k].y = -100; if (NPS_Bullets[k].pVisible == true){ removeChild(NPS_Bullets[k].pBullet); }; NPS_Bullets.splice(k, 1); }; k = (k - 1); }; i = (i - 1); }; } catch(e:TypeError) { }; }; } public function NPS_nextlevelbutton_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_Enemies.length < 51){ if (NPS_GameLevel != 0){ NPS_GameScore = (NPS_GameScore + Math.round((((NPS_WaveDelay + NPS_LastWave) - getTimer()) / 1000))); text_score.text = String(NPS_GameScore); }; if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_placeenemies(); }; }; } public function NPH_buy_angel_death_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Angel of Death(10 PP)"; text_towerinfo.text = "Calls forth the Angel of Death."; } public function NP_buy_blizzard_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Blizzard(3 PP)"; text_towerinfo.text = "Calls forth a Blizzard to slow your enemies."; } public function NPH_tower_select_arrow_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arrow Tower (30g)"; text_towerinfo.text = "Low Dmg, Fast Speed. (Normal Damage)"; } public function NPH_placeenemies():void{ var _local1:*; var _local2:script_enemy_orc; var _local3:enemy_health_bar; var _local4:script_enemy_armororc; var _local5:enemy_health_bar; var _local6:script_enemy_goblin; var _local7:enemy_health_bar; var _local8:script_enemy_fasttroll; var _local9:enemy_health_bar; var _local10:script_enemy_tauren; var _local11:enemy_health_bar; var _local12:script_enemy_armortroll; var _local13:enemy_health_bar; var _local14:script_enemy_lion; var _local15:enemy_health_bar; var _local16:script_enemy_undead; var _local17:enemy_health_bar; var _local18:script_enemy_clothundead; var _local19:enemy_health_bar; var _local20:script_enemy_demon; var _local21:enemy_health_bar; var _local22:script_enemy_boss1; var _local23:enemy_health_bar; if (NPH_gamemode != "paused"){ NPH_GameLevel = (NPH_GameLevel + 1); NPH_WaveDelay = (NPH_WaveDelay - 500); if (NPH_WaveDelay < 10000){ NPH_WaveDelay = 10000; }; NPH_Path = Pathfinding.findPath(NPH_Map, NPH_MapStart.y, NPH_MapStart.x, NPH_MapEnd.y, NPH_MapEnd.x); _local1 = 0; while (_local1 < 25) { if (NPH_LastEnemyType == 1){ _local2 = new script_enemy_orc(_local1, NPH_GameLevel, "hard"); addChild(_local2); NPH_Enemies.push(_local2); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local3 = new enemy_health_bar(); _local3.pEnemy = (NPH_Enemies.length - 1); _local3.x = (_local2.x - 13); _local3.y = (_local2.y - 16); _local3.pWidth = 32; text_enemy_hp.text = String(Math.round(_local2.pStartHealth)); addChild(_local3); NPH_HealthBars.push(_local3); _local2.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NPH_LastEnemyType == 2){ _local4 = new script_enemy_armororc(_local1, NPH_GameLevel, "hard"); addChild(_local4); NPH_Enemies.push(_local4); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local5 = new enemy_health_bar(); _local5.pEnemy = (NPH_Enemies.length - 1); _local5.x = (_local4.x - 13); _local5.y = (_local4.y - 16); _local5.pWidth = 32; text_enemy_hp.text = String(Math.round(_local4.pStartHealth)); addChild(_local5); NPH_HealthBars.push(_local5); _local4.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPH_LastEnemyType == 3){ _local6 = new script_enemy_goblin(_local1, NPH_GameLevel, "hard"); addChild(_local6); NPH_Enemies.push(_local6); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local7 = new enemy_health_bar(); _local7.pEnemy = (NPH_Enemies.length - 1); _local7.x = (_local6.x - 13); _local7.y = (_local6.y - 16); _local7.pWidth = 32; text_enemy_hp.text = String(Math.round(_local6.pStartHealth)); addChild(_local7); NPH_HealthBars.push(_local7); _local6.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NPH_LastEnemyType == 4){ _local8 = new script_enemy_fasttroll(_local1, NPH_GameLevel, "hard"); addChild(_local8); NPH_Enemies.push(_local8); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local9 = new enemy_health_bar(); _local9.pEnemy = (NPH_Enemies.length - 1); _local9.x = (_local8.x - 13); _local9.y = (_local8.y - 16); _local9.pWidth = 32; text_enemy_hp.text = String(Math.round(_local8.pStartHealth)); addChild(_local9); NPH_HealthBars.push(_local9); _local8.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPH_LastEnemyType == 5){ _local10 = new script_enemy_tauren(_local1, NPH_GameLevel, "hard"); addChild(_local10); NPH_Enemies.push(_local10); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local11 = new enemy_health_bar(); _local11.pEnemy = (NPH_Enemies.length - 1); _local11.x = (_local10.x - 13); _local11.y = (_local10.y - 16); _local11.pWidth = 32; text_enemy_hp.text = String(Math.round(_local10.pStartHealth)); addChild(_local11); NPH_HealthBars.push(_local11); _local10.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NPH_LastEnemyType == 6){ _local12 = new script_enemy_armortroll(_local1, NPH_GameLevel, "hard"); addChild(_local12); NPH_Enemies.push(_local12); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local13 = new enemy_health_bar(); _local13.pEnemy = (NPH_Enemies.length - 1); _local13.x = (_local12.x - 13); _local13.y = (_local12.y - 16); _local13.pWidth = 32; text_enemy_hp.text = String(Math.round(_local12.pStartHealth)); addChild(_local13); NPH_HealthBars.push(_local13); _local12.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPH_LastEnemyType == 7){ _local14 = new script_enemy_lion(_local1, NPH_GameLevel, "hard"); addChild(_local14); NPH_Enemies.push(_local14); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local15 = new enemy_health_bar(); _local15.pEnemy = (NPH_Enemies.length - 1); _local15.x = (_local14.x - 13); _local15.y = (_local14.y - 16); _local15.pWidth = 32; text_enemy_hp.text = String(Math.round(_local14.pStartHealth)); addChild(_local15); NPH_HealthBars.push(_local15); _local14.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NPH_LastEnemyType == 8){ _local16 = new script_enemy_undead(_local1, NPH_GameLevel, "hard"); addChild(_local16); NPH_Enemies.push(_local16); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local17 = new enemy_health_bar(); _local17.pEnemy = (NPH_Enemies.length - 1); _local17.x = (_local16.x - 13); _local17.y = (_local16.y - 16); _local17.pWidth = 32; text_enemy_hp.text = String(Math.round(_local16.pStartHealth)); addChild(_local17); NPH_HealthBars.push(_local17); _local16.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPH_LastEnemyType == 9){ _local18 = new script_enemy_clothundead(_local1, NPH_GameLevel, "hard"); addChild(_local18); NPH_Enemies.push(_local18); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local19 = new enemy_health_bar(); _local19.pEnemy = (NPH_Enemies.length - 1); _local19.x = (_local18.x - 13); _local19.y = (_local18.y - 16); _local19.pWidth = 32; text_enemy_hp.text = String(Math.round(_local18.pStartHealth)); addChild(_local19); NPH_HealthBars.push(_local19); _local18.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Immune to magic!"; } else { if (NPH_LastEnemyType == 10){ _local20 = new script_enemy_demon(_local1, NPH_GameLevel, "hard"); addChild(_local20); NPH_Enemies.push(_local20); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local21 = new enemy_health_bar(); _local21.pEnemy = (NPH_Enemies.length - 1); _local21.x = (_local20.x - 13); _local21.y = (_local20.y - 16); _local21.pWidth = 32; text_enemy_hp.text = String(Math.round(_local20.pStartHealth)); addChild(_local21); NPH_HealthBars.push(_local21); _local20.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Boss Round"; }; }; }; }; }; }; }; }; }; }; _local1++; }; if (NPH_LastEnemyType == 11){ _local22 = new script_enemy_boss1(0, NPH_GameLevel, "hard"); addChild(_local22); NPH_Enemies.push(_local22); NPH_LastWave = getTimer(); text_level.text = String(NPH_GameLevel); _local23 = new enemy_health_bar(); _local23.pEnemy = (NPH_Enemies.length - 1); _local23.x = (_local22.x - 13); _local23.y = (_local22.y - 16); _local23.pWidth = 32; text_enemy_hp.text = String(Math.round(_local22.pStartHealth)); addChild(_local23); NPH_HealthBars.push(_local23); _local22.pPath = NPH_Path; text_nexttype.text = "Next Enemy Type : Normal"; }; NPH_LastEnemyType = (NPH_LastEnemyType + 1); if (NPH_LastEnemyType == 12){ NPH_LastEnemyType = 1; }; }; } public function NPH_buy_church_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Church (750g)"; text_towerinfo.text = "Adds Prayer Points. Limit 1."; } public function play30min(_arg1:MouseEvent):void{ gotoAndStop(85); } public function NPI_musicleft_mouse_up(_arg1:MouseEvent):void{ if (NPI_Muted == false){ NPI_CurrentSong--; if (NPI_CurrentSong == 0){ NPI_CurrentSong = 5; }; NPI_channel.stop(); if (NPI_CurrentSong == 1){ NPI_channel = NPI_Ambient1.play(0, 99999); }; if (NPI_CurrentSong == 2){ NPI_channel = NPI_Ambient2.play(0, 99999); }; if (NPI_CurrentSong == 3){ NPI_channel = NPI_Ambient3.play(0, 99999); }; if (NPI_CurrentSong == 4){ NPI_channel = NPI_Ambient4.play(0, 99999); }; if (NPI_CurrentSong == 5){ NPI_channel = NPI_Ambient5.play(0, 99999); }; }; } public function NPS_reportKeyUp(_arg1:KeyboardEvent):void{ var _local2:Number; var _local3:int; if (_arg1.keyCode == 49){ NPS_tower_select_arrow_mouse_up(NPS_MouseEvent); }; if (_arg1.keyCode == 50){ NPS_tower_select_cannon_mouse_up(NPS_MouseEvent); }; if (_arg1.keyCode == 51){ NPS_tower_select_arcane_mouse_up(NPS_MouseEvent); }; if (_arg1.keyCode == 52){ NPS_tower_select_fire_mouse_up(NPS_MouseEvent); }; if (_arg1.keyCode == 53){ NPS_tower_select_ice_mouse_up(NPS_MouseEvent); }; if (_arg1.keyCode == 85){ if (NPS_gamemode != "paused"){ if (NPS_SelectedTower != -1){ _local3 = 0; while (_local3 <= 501) { if (NPS_Towers[NPS_SelectedTower].pLevel < 501){ if (NPS_Gold >= (0.5 * (NPS_Towers[NPS_SelectedTower].pCost * (NPS_Towers[NPS_SelectedTower].pLevel + 1)))){ NPS_Gold = (NPS_Gold - (0.5 * (NPS_Towers[NPS_SelectedTower].pCost * (NPS_Towers[NPS_SelectedTower].pLevel + 1)))); NPS_Gold = Math.round(NPS_Gold); text_gold.text = String(NPS_Gold); if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_Towers[NPS_SelectedTower].pLevel = (NPS_Towers[NPS_SelectedTower].pLevel + 1); NPS_Towers[NPS_SelectedTower].pDamage = (NPS_Towers[NPS_SelectedTower].pOrigDamage * ((NPS_Towers[NPS_SelectedTower].pLevel / 1.1) * ((NPS_Towers[NPS_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; text_tower_range.text = ("Range - " + NPS_Towers[NPS_SelectedTower].pRange); text_tower_damage.text = ("Damage - " + NPS_Towers[NPS_SelectedTower].pDamage.toFixed(2)); text_tower_level.text = ("Level - " + String(NPS_Towers[NPS_SelectedTower].pLevel)); text_tower_sell.text = ("Sell Value - " + String(int(((NPS_Towers[NPS_SelectedTower].pLevel * NPS_Towers[NPS_SelectedTower].pCost) * 0.7)))); }; }; _local3++; }; }; }; }; if (_arg1.keyCode == 83){ NPS_sell_tower_click(NPS_MouseEvent); }; } public function playnopathsnormal(_arg1:MouseEvent):void{ gotoAndStop(105); } public function NP_sell_tower_click(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:int; if (NP_gamemode != "paused"){ if (NP_SelectedTower != -1){ if (NP_Towers[NP_SelectedTower].pTowerType == 10){ NP_PlacedMine = false; text_next_gold.x = 1000; }; if (NP_Towers[NP_SelectedTower].pTowerType == 11){ NP_PlacedChurch = false; text_next_prayer.x = 1000; }; NP_Map[Math.round((NP_Towers[NP_SelectedTower].y / 32))][Math.round((NP_Towers[NP_SelectedTower].x / 32))] = 1; _local4 = (NP_Enemies.length - 1); while (_local4 >= 0) { if (NP_Enemies[_local4].y < 45){ _local2 = new Point(Math.round(NP_Enemies[_local4].pPath[NP_Enemies[_local4].pPathIndex][1]), Math.round(NP_Enemies[_local4].pPath[NP_Enemies[_local4].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NP_Path = Pathfinding.findPath(NP_Map, _local2.y, _local2.x, NP_MapEnd.y, NP_MapEnd.x); NP_Enemies[_local4].pPath = NP_Path; NP_Enemies[_local4].mapchange(); }; _local4--; }; NP_Gold = (NP_Gold + int((0.95 * (NP_Towers[NP_SelectedTower].pCost * NP_Towers[NP_SelectedTower].pLevel)))); NP_Gold = Math.round(NP_Gold); text_gold.text = String(NP_Gold); removeChild(NP_Towers[NP_SelectedTower]); NP_Towers.splice(NP_SelectedTower, 1); NP_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; upgrade_tower.x = 900; text_tower_sell.x = 900; }; }; } public function NPI_CheckEnemiesForHit():void{ var i:int; var k:int; var xdist:Number; var ydist:Number; var distancefromthis:Number; var a:int; if (NPI_gamemode != "paused"){ try { i = (NPI_Enemies.length - 1); while (i >= 0) { k = (NPI_Bullets.length - 1); while (k >= 0) { if (NPI_Enemies[i].hitTestObject(NPI_Bullets[k])){ NPI_Enemies[i].GotHit(NPI_Bullets[k].pDamage, NPI_Bullets[k].pBulletType); if (NPI_Bullets[k].pBulletType == 2){ if (NPI_Enemies[i].pSpeed > 0.3){ NPI_Enemies[i].pSpeed = (NPI_Enemies[i].pSpeed - 0.2); }; }; if (NPI_Bullets[k].pBulletType == 4){ a = (NPI_Enemies.length - 1); while (a >= 0) { xdist = Math.round((NPI_Bullets[k].x - NPI_Enemies[a].x)); ydist = Math.round((NPI_Bullets[k].y - NPI_Enemies[a].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < 50){ if (a != NPI_Bullets[k].pTarget){ NPI_Enemies[a].GotHit(((5 * NPI_Towers[NPI_Bullets[k].pTower].pLevel) * 0.75), 4); }; }; a = (a - 1); }; }; NPI_Bullets[k].x = -100; NPI_Bullets[k].y = -100; if (NPI_Bullets[k].pVisible == true){ removeChild(NPI_Bullets[k].pBullet); }; NPI_Bullets.splice(k, 1); }; k = (k - 1); }; i = (i - 1); }; } catch(e:TypeError) { }; }; } public function NPS_restart_yes(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = (NPS_HealthBars.length - 1); while (_local2 >= 0) { removeChild(NPS_HealthBars[_local2]); NPS_HealthBars.splice(_local2, 1); _local2--; }; _local3 = (NPS_Bullets.length - 1); while (_local3 >= 0) { if (NPS_Bullets[_local3].pVisible == true){ removeChild(NPS_Bullets[_local3]); }; NPS_Bullets.splice(_local3, 1); _local3--; }; _local4 = (NPS_Towers.length - 1); while (_local4 >= 0) { removeChild(NPS_Towers[_local4]); NPS_Towers.splice(_local4, 1); _local4--; }; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { removeChild(NPS_Enemies[_local5]); NPS_Enemies.splice(_local5, 1); _local5--; }; removeEventListener(Event.ENTER_FRAME, NPS_everytime); removeEventListener(KeyboardEvent.KEY_UP, NPS_reportKeyUp); NPS_channel.stop(); gotoAndStop(10); } public function NP_MoveAndCheckAngelsOfDeath():void{ var _local1:int; var _local2:int; if (NP_gamemode != "paused"){ _local1 = (NP_AngelsOfDeath.length - 1); while (_local1 >= 0) { _local2 = (NP_Enemies.length - 1); while (_local2 >= 0) { if (NP_Enemies[_local2].hitTestObject(NP_AngelsOfDeath[_local1])){ NP_Enemies[_local2].GotHit(25, 1); }; _local2--; }; if (NP_AngelsOfDeath[_local1].y < -64){ drawonme.removeChild(NP_AngelsOfDeath[_local1]); NP_AngelsOfDeath.splice(_local1, 1); }; _local1--; }; }; } public function NPH_MoveAndCheckAngelsOfDeath():void{ var _local1:int; var _local2:int; if (NPH_gamemode != "paused"){ _local1 = (NPH_AngelsOfDeath.length - 1); while (_local1 >= 0) { _local2 = (NPH_Enemies.length - 1); while (_local2 >= 0) { if (NPH_Enemies[_local2].hitTestObject(NPH_AngelsOfDeath[_local1])){ NPH_Enemies[_local2].GotHit(25, 1); }; _local2--; }; if (NPH_AngelsOfDeath[_local1].y < -64){ drawonme.removeChild(NPH_AngelsOfDeath[_local1]); NPH_AngelsOfDeath.splice(_local1, 1); }; _local1--; }; }; } public function restart_game9(_arg1:MouseEvent):void{ restart_sure.x = 51; restart_yes.x = 142.9; restart_no.x = 309; } public function NP_tower_select_arcane_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Arcane"){ NP_gamemode = "off"; TheGrid1.alpha = 0; if (NP_Muted == false){ NP_ButtonClick.play(); }; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Arcane"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Arcane"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Arcane"; }; }; }; } function frame1(){ MochiBot.track(this, "673afdb4"); MochiAd.showPreloaderAd({clip:this.root, id:"d8d892ac1120ac68", res:"640x480"}); } public function NPS_tower_select_arrow_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Arrow"){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; NPS_gamemode = "off"; TheGrid1.alpha = 0; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Arrow"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Arrow"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Arrow"; }; }; }; } public function NPI_buy_angel_death_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:angel_of_death; if (NPI_gamemode != "paused"){ if (NPI_Prayer >= 10){ if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_Prayer = (NPI_Prayer - 10); text_prayer.text = String(NPI_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new angel_of_death(); drawonme.addChild(_local3); NPI_AngelsOfDeath.push(_local3); _local2++; }; }; }; } public function NPH_buy_judgement_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:judgement; if (NPH_gamemode != "paused"){ if (NPH_Prayer >= 15){ if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_Prayer = (NPH_Prayer - 15); text_prayer.text = String(NPH_Prayer); _local2 = 0; while (_local2 < (NPH_Enemies.length - 1)) { _local3 = new judgement(); _local3.x = NPH_Enemies[_local2].x; _local3.y = NPH_Enemies[_local2].y; NPH_Enemies[_local2].GotHit(999999, 1); drawonme.addChild(_local3); NPH_Judgement.push(_local3); _local2++; }; }; }; } public function NPI_CheckEnemyHealth():void{ var i:int; var h:int; var k:int; var a:int; if (NPI_gamemode != "paused"){ try { i = (NPI_Enemies.length - 1); while (i >= 0) { if (NPI_Enemies[i].pHealth <= 0){ NPI_Enemies[i].x = -500; NPI_Enemies[i].y = -500; if (NPI_Enemies[i].pType == 5){ NPI_Gold = (NPI_Gold + Math.round(((1.75 * NPI_GameLevel) + 0.5))); NPI_GameScore = (NPI_GameScore + 50); } else { NPI_Gold = (NPI_Gold + Math.round(((0.25 * NPI_GameLevel) + 0.5))); NPI_GameScore = (NPI_GameScore + 10); }; removeChild(NPI_Enemies[i]); NPI_Enemies.splice(i, 1); text_gold.text = String(NPI_Gold); text_score.text = String(NPI_GameScore); h = (NPI_HealthBars.length - 1); while (h >= 0) { if (NPI_HealthBars[h].pEnemy == i){ NPI_HealthBars[h].x = -900; removeChild(NPI_HealthBars[h]); NPI_HealthBars.splice(h, 1); }; if (NPI_HealthBars[h].pEnemy > i){ NPI_HealthBars[h].pEnemy = (NPI_HealthBars[h].pEnemy - 1); }; h = (h - 1); }; k = (NPI_Bullets.length - 1); while (k >= 0) { if (k != i){ if (NPI_Bullets[k].pTarget > i){ NPI_Bullets[k].pTarget = (NPI_Bullets[k].pTarget - 1); }; }; if (NPI_Bullets[k].pTarget == i){ NPI_Bullets[k].x = -100; NPI_Bullets[k].y = -100; if (NPI_Bullets[k].pVisible == true){ removeChild(NPI_Bullets[k].pBullet); }; NPI_Bullets.splice(k, 1); }; k = (k - 1); }; a = (NPI_Towers.length - 1); while (a >= 0) { if (NPI_Towers[a].pTarget == i){ NPI_Towers[a].pTarget = -1; }; if (NPI_Towers[a].pTarget > i){ NPI_Towers[a].pTarget = (NPI_Towers[a].pTarget - 1); }; a = (a - 1); }; }; i = (i - 1); }; } catch(e:TypeError) { }; }; } function frame5(){ stop(); pagedelay = 6000; lastpage = getTimer(); addEventListener(Event.ENTER_FRAME, everytimesponsor); sponsorlogo.addEventListener(MouseEvent.MOUSE_UP, sponsor); } public function NPS_tower_select_deselect(_arg1:MouseEvent):void{ var event = _arg1; try { text_towertype.text = ""; text_towerinfo.text = ""; text_tower_level.text = ("Level - " + NPS_Towers[NPS_SelectedTower].pLevel); text_tower_damage.text = ("Damage - " + NPS_Towers[NPS_SelectedTower].pDamage.toFixed(2)); } catch(e:TypeError) { }; } public function playthegame11(_arg1:MouseEvent):void{ gotoAndStop(95); } public function NPH_CheckTowerFireBullet():void{ var xdist:Number; var ydist:Number; var distancefromthis:Number; var closest:Number; var closestmob:Number; var i:int; var a:int; var k:int; var Bullet1:script_bullet_arrow; var Bullet2:script_bullet_ice; var Bullet3:script_bullet_arcane; var Bullet4:script_bullet_cannon; var Bullet5:script_bullet_fire; closest = 5000; closestmob = -1; if (NPH_gamemode != "paused"){ try { i = (NPH_Towers.length - 1); while (i >= 0) { if (NPH_Towers[i].pTowerType <= 5){ closest = 5000; NPH_Towers[i].pTarget = -1; k = (NPH_Enemies.length - 1); while (k >= 0) { xdist = Math.round(((NPH_Towers[i].x + 16) - NPH_Enemies[k].x)); ydist = Math.round(((NPH_Towers[i].y + 16) - NPH_Enemies[k].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NPH_Towers[i].pRange){ if (NPH_Enemies[k].pType == 4){ if (NPH_Towers[i].pTowerType != 2){ if (NPH_Towers[i].pTowerType != 3){ if (NPH_Towers[i].pTowerType != 5){ NPH_Towers[i].pTarget = k; }; }; }; }; if (NPH_Enemies[k].pType != 4){ NPH_Towers[i].pTarget = k; }; }; k = (k - 1); }; }; i = (i - 1); }; a = (NPH_Towers.length - 1); while (a >= 0) { if (NPH_Towers[a].pTowerType <= 5){ if (NPH_Enemies.length > 0){ if (NPH_Towers[a].pTarget != -1){ if (NPH_Enemies[NPH_Towers[a].pTarget].pHealth > 0){ xdist = Math.round(((NPH_Towers[a].x + 16) - NPH_Enemies[NPH_Towers[a].pTarget].x)); ydist = Math.round(((NPH_Towers[a].y + 16) - NPH_Enemies[NPH_Towers[a].pTarget].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NPH_Towers[a].pRange){ if (NPH_Enemies[NPH_Towers[a].pTarget].y > 0){ if (getTimer() > (NPH_Towers[a].pLastFire + NPH_Towers[a].pSpeed)){ NPH_Towers[a].pLastFire = getTimer(); if (NPH_Towers[a].pTowerType == 1){ Bullet1 = new script_bullet_arrow(NPH_Towers[a].pTarget); }; if (NPH_Towers[a].pTowerType == 2){ Bullet2 = new script_bullet_ice(NPH_Towers[a].pTarget); }; if (NPH_Towers[a].pTowerType == 3){ Bullet3 = new script_bullet_arcane(NPH_Towers[a].pTarget); }; if (NPH_Towers[a].pTowerType == 4){ Bullet4 = new script_bullet_cannon(NPH_Towers[a].pTarget); }; if (NPH_Towers[a].pTowerType == 5){ Bullet5 = new script_bullet_fire(NPH_Towers[a].pTarget); }; if (NPH_Towers[a].pTowerType == 1){ Bullet1.x = (NPH_Towers[a].x + 16); Bullet1.y = (NPH_Towers[a].y + 16); Bullet1.pDamage = NPH_Towers[a].pDamage; Bullet1.pBullet = Bullet1; if (NPH_Bullets.length < 100){ Bullet1.pVisible = true; addChild(Bullet1); }; NPH_Bullets.push(Bullet1); Bullet1.pTower = a; }; if (NPH_Towers[a].pTowerType == 2){ Bullet2.x = (NPH_Towers[a].x + 16); Bullet2.y = (NPH_Towers[a].y + 16); Bullet2.pDamage = NPH_Towers[a].pDamage; Bullet2.pBullet = Bullet2; if (NPH_Bullets.length < 100){ Bullet2.pVisible = true; addChild(Bullet2); }; NPH_Bullets.push(Bullet2); Bullet2.pTower = a; }; if (NPH_Towers[a].pTowerType == 3){ Bullet3.x = (NPH_Towers[a].x + 16); Bullet3.y = (NPH_Towers[a].y + 16); Bullet3.pDamage = NPH_Towers[a].pDamage; Bullet3.pBullet = Bullet3; if (NPH_Bullets.length < 100){ Bullet3.pVisible = true; addChild(Bullet3); }; NPH_Bullets.push(Bullet3); Bullet3.pTower = a; }; if (NPH_Towers[a].pTowerType == 4){ Bullet4.x = (NPH_Towers[a].x + 16); Bullet4.y = (NPH_Towers[a].y + 16); Bullet4.pDamage = NPH_Towers[a].pDamage; Bullet4.pBullet = Bullet4; if (NPH_Bullets.length < 100){ Bullet4.pVisible = true; addChild(Bullet4); }; NPH_Bullets.push(Bullet4); Bullet4.pTower = a; }; if (NPH_Towers[a].pTowerType == 5){ Bullet5.x = (NPH_Towers[a].x + 16); Bullet5.y = (NPH_Towers[a].y + 16); Bullet5.pDamage = NPH_Towers[a].pDamage; Bullet5.pBullet = Bullet5; if (NPH_Bullets.length < 100){ Bullet5.pVisible = true; addChild(Bullet5); }; NPH_Bullets.push(Bullet5); Bullet5.pTower = a; }; }; }; }; }; }; }; }; a = (a - 1); }; } catch(e:TypeError) { }; }; } public function NPH_reportKeyUp(_arg1:KeyboardEvent):void{ var _local2:int; if (_arg1.keyCode == 49){ NPH_tower_select_arrow_mouse_up(NPH_MouseEvent); }; if (_arg1.keyCode == 50){ NPH_tower_select_cannon_mouse_up(NPH_MouseEvent); }; if (_arg1.keyCode == 51){ NPH_tower_select_arcane_mouse_up(NPH_MouseEvent); }; if (_arg1.keyCode == 52){ NPH_tower_select_fire_mouse_up(NPH_MouseEvent); }; if (_arg1.keyCode == 53){ NPH_tower_select_ice_mouse_up(NPH_MouseEvent); }; if (_arg1.keyCode == 85){ if (NPH_gamemode != "paused"){ if (NPH_SelectedTower != -1){ _local2 = 0; while (_local2 <= 41) { if (NPH_Towers[NPH_SelectedTower].pLevel < 41){ if (NPH_Gold >= (0.5 * (NPH_Towers[NPH_SelectedTower].pCost * (NPH_Towers[NPH_SelectedTower].pLevel + 1)))){ NPH_Gold = (NPH_Gold - (0.5 * (NPH_Towers[NPH_SelectedTower].pCost * (NPH_Towers[NPH_SelectedTower].pLevel + 1)))); NPH_Gold = Math.round(NPH_Gold); text_gold.text = String(NPH_Gold); if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_Towers[NPH_SelectedTower].pLevel = (NPH_Towers[NPH_SelectedTower].pLevel + 1); NPH_Towers[NPH_SelectedTower].pDamage = (NPH_Towers[NPH_SelectedTower].pOrigDamage * ((NPH_Towers[NPH_SelectedTower].pLevel / 1.1) * ((NPH_Towers[NPH_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; text_tower_range.text = ("Range - " + NPH_Towers[NPH_SelectedTower].pRange); text_tower_damage.text = ("Damage - " + NPH_Towers[NPH_SelectedTower].pDamage.toFixed(2)); text_tower_level.text = ("Level - " + String(NPH_Towers[NPH_SelectedTower].pLevel)); text_tower_sell.text = ("Sell Value - " + String(int(((NPH_Towers[NPH_SelectedTower].pLevel * NPH_Towers[NPH_SelectedTower].pCost) * 0.7)))); }; }; _local2++; }; }; }; }; if (_arg1.keyCode == 83){ NPH_sell_tower_click(NPH_MouseEvent); }; } public function NP_restart_no(_arg1:MouseEvent):void{ restart_sure.x = 1000; restart_yes.x = 1000; restart_no.x = 1000; } public function playthegame12(_arg1:MouseEvent):void{ gotoAndStop(95); } public function NPS_MoveAndCheckAngelsOfDeath():void{ var _local1:int; var _local2:int; if (NPS_gamemode != "paused"){ _local1 = (NPS_AngelsOfDeath.length - 1); while (_local1 >= 0) { _local2 = (NPS_Enemies.length - 1); while (_local2 >= 0) { if (NPS_Enemies[_local2].hitTestObject(NPS_AngelsOfDeath[_local1])){ NPS_Enemies[_local2].GotHit(25, 1); }; _local2--; }; if (NPS_AngelsOfDeath[_local1].y < -64){ drawonme.removeChild(NPS_AngelsOfDeath[_local1]); NPS_AngelsOfDeath.splice(_local1, 1); }; _local1--; }; }; } public function playthegame10(_arg1:MouseEvent):void{ gotoAndStop(95); } public function NPI_tower_select_cannon_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Cannon"){ NPI_gamemode = "off"; TheGrid1.alpha = 0; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Cannon"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Cannon"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; NPI_selectedtowertype = "Cannon"; }; }; }; } public function NP_tower_select_deselect(_arg1:MouseEvent):void{ var event = _arg1; try { text_towertype.text = ""; text_towerinfo.text = ""; text_tower_level.text = ("Level - " + NP_Towers[NP_SelectedTower].pLevel); text_tower_damage.text = ("Damage - " + NP_Towers[NP_SelectedTower].pDamage.toFixed(2)); } catch(e:TypeError) { }; } public function NPH_select_mine_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Mine"){ if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_gamemode = "off"; TheGrid1.alpha = 0; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Mine"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Mine"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Mine"; }; }; }; } public function NPH_restart_yes(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = (NPH_HealthBars.length - 1); while (_local2 >= 0) { removeChild(NPH_HealthBars[_local2]); NPH_HealthBars.splice(_local2, 1); _local2--; }; _local3 = (NPH_Bullets.length - 1); while (_local3 >= 0) { if (NPH_Bullets[_local3].pVisible == true){ removeChild(NPH_Bullets[_local3]); }; NPH_Bullets.splice(_local3, 1); _local3--; }; _local4 = (NPH_Towers.length - 1); while (_local4 >= 0) { removeChild(NPH_Towers[_local4]); NPH_Towers.splice(_local4, 1); _local4--; }; _local5 = (NPH_Enemies.length - 1); while (_local5 >= 0) { removeChild(NPH_Enemies[_local5]); NPH_Enemies.splice(_local5, 1); _local5--; }; removeEventListener(Event.ENTER_FRAME, NPH_everytime); removeEventListener(KeyboardEvent.KEY_UP, NPH_reportKeyUp); NPH_channel.stop(); gotoAndStop(10); } public function NPI_nextlevelbutton_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_Enemies.length < 51){ if (NPI_GameLevel != 0){ NPI_GameScore = (NPI_GameScore + Math.round((((NPI_WaveDelay + NPI_LastWave) - getTimer()) / 1000))); text_score.text = String(NPI_GameScore); }; if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_placeenemies(); }; }; } public function NPI_everytime(_arg1:Event):void{ var b:int; var mX:int; var mY:int; var didHit:Boolean; var event = _arg1; try { if (NPI_gamemode != "paused"){ NPI_CheckEnemiesForDirections(); NPI_CheckTowerFireBullet(); NPI_MoveBullets(); NPI_CheckEnemiesForHit(); NPI_CheckEnemyHealth(); NPI_UpdateEnemyHealthBar(); NPI_CheckSelectedTower(); NPI_MoveAndCheckAngelsOfDeath(); NPI_MoveAndCheckBlizzard(); NPI_MoveAndCheckJudgement(); if (getTimer() > (NPI_LastWave + NPI_WaveDelay)){ NPI_placeenemies(); }; text_next_level.text = String(Math.round((((NPI_WaveDelay + NPI_LastWave) - getTimer()) / 1000))); if (NPI_PlacedMine == true){ text_next_gold.text = String(Math.round((((NPI_GoldUpdateSpeed + NPI_LastGoldUpdate) - getTimer()) / 1000))); if (getTimer() > (NPI_LastGoldUpdate + NPI_GoldUpdateSpeed)){ NPI_Gold = (NPI_Gold + (NPI_Gold * 0.02)); NPI_Gold = Math.round(NPI_Gold); text_gold.text = String(NPI_Gold); NPI_LastGoldUpdate = getTimer(); }; }; if (NPI_PlacedChurch == true){ text_next_prayer.text = String(Math.round((((NPI_PrayerUpdateSpeed + NPI_LastPrayerUpdate) - getTimer()) / 1000))); if (getTimer() > (NPI_LastPrayerUpdate + NPI_PrayerUpdateSpeed)){ NPI_Prayer = (NPI_Prayer + 1); text_prayer.text = String(NPI_Prayer); NPI_LastPrayerUpdate = getTimer(); }; }; if (NPI_gamemode == "set_tower"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ TheGrid1.graphics.clear(); if (didHit == false){ TheGrid1.graphics.moveTo(mX, mY); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.lineTo(mX, mY); TheGrid1.graphics.lineTo((mX + 32), mY); TheGrid1.graphics.lineTo((mX + 32), (mY + 32)); TheGrid1.graphics.lineTo(mX, (mY + 32)); TheGrid1.graphics.endFill(); }; }; }; if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) <= 13)) && ((int((root.mouseY / 32)) >= 2)))){ if (NPI_selectedtowertype == "Arrow"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPI_selectedtowertype == "Arcane"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPI_selectedtowertype == "Cannon"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 125); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 124); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 123); TheGrid1.graphics.endFill(); }; if (NPI_selectedtowertype == "Fire"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 175); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 174); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 173); TheGrid1.graphics.endFill(); }; if (NPI_selectedtowertype == "Ice"){ mX = (int((root.mouseX / 32)) * 32); mY = (int((root.mouseY / 32)) * 32); TheGrid1.graphics.beginFill(88193, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 100); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0, 0.5); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 99); TheGrid1.graphics.endFill(); TheGrid1.graphics.beginFill(0xFFFFFF, 1); TheGrid1.graphics.drawCircle((mX + 16), (mY + 16), 98); TheGrid1.graphics.endFill(); }; }; }; }; b = (NPI_Towers.length - 1); while (b >= 0) { NPI_Towers[b].graphics.clear(); b = (b - 1); }; drawonme.graphics.clear(); if (NPI_SelectedTower != -1){ mX = 0; mY = 0; NPI_Towers[NPI_SelectedTower].graphics.clear(); NPI_Towers[NPI_SelectedTower].graphics.moveTo(mX, mY); NPI_Towers[NPI_SelectedTower].graphics.beginFill(0xFFFFFF, 0.5); NPI_Towers[NPI_SelectedTower].graphics.lineTo(mX, mY); NPI_Towers[NPI_SelectedTower].graphics.lineTo((mX + 32), mY); NPI_Towers[NPI_SelectedTower].graphics.lineTo((mX + 32), (mY + 32)); NPI_Towers[NPI_SelectedTower].graphics.lineTo(mX, (mY + 32)); NPI_Towers[NPI_SelectedTower].graphics.endFill(); if (NPI_Towers[NPI_SelectedTower].pTowerType <= 5){ upgrade_tower.x = 524; } else { upgrade_tower.x = 900; }; drawonme.graphics.clear(); drawonme.graphics.beginFill(0xFFFFFF, 0.2); drawonme.graphics.drawCircle((NPI_Towers[NPI_SelectedTower].x + 16), (NPI_Towers[NPI_SelectedTower].y + 16), NPI_Towers[NPI_SelectedTower].pRange); drawonme.graphics.endFill(); }; }; } catch(e:TypeError) { }; } public function NP_buy_angel_death_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Angel of Death(10 PP)"; text_towerinfo.text = "Calls forth the Angel of Death."; } public function NPH_musicmute_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mute Sound"; text_towerinfo.text = "Mutes all sound."; } public function NPI_MoveBullets():void{ var i:int; var a:int; if (NPI_gamemode != "paused"){ try { i = (NPI_Bullets.length - 1); while (i >= 0) { NPI_Bullets[i].movebullet(NPI_Enemies[NPI_Bullets[i].pTarget].x, NPI_Enemies[NPI_Bullets[i].pTarget].y); i = (i - 1); }; } catch(e:TypeError) { a = (NPI_Bullets.length - 1); while (a >= 0) { NPI_Bullets[a].x = -900; NPI_Bullets[a].y = -900; NPI_Bullets[a].pTarget = -1; if (NPI_Bullets[a].pVisible == true){ removeChild(NPI_Bullets[a].pBullet); }; NPI_Bullets.splice(a, 1); a = (a - 1); }; }; }; } public function NPH_restart_no(_arg1:MouseEvent):void{ restart_sure.x = 1000; restart_yes.x = 1000; restart_no.x = 1000; } public function NPI_MoveAndCheckAngelsOfDeath():void{ var _local1:int; var _local2:int; if (NPI_gamemode != "paused"){ _local1 = (NPI_AngelsOfDeath.length - 1); while (_local1 >= 0) { _local2 = (NPI_Enemies.length - 1); while (_local2 >= 0) { if (NPI_Enemies[_local2].hitTestObject(NPI_AngelsOfDeath[_local1])){ NPI_Enemies[_local2].GotHit(25, 1); }; _local2--; }; if (NPI_AngelsOfDeath[_local1].y < -64){ drawonme.removeChild(NPI_AngelsOfDeath[_local1]); NPI_AngelsOfDeath.splice(_local1, 1); }; _local1--; }; }; } public function NP_tower_select_ice_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Ice Tower (25g)"; text_towerinfo.text = "Slows enemies down. (Magic Damage)"; } public function NPS_the_grid_place_tower(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Boolean; var _local4:Number; var _local5:*; var _local6:int; var _local7:tower_arrow; var _local8:tower_arcane; var _local9:tower_cannon; var _local10:tower_ice; var _local11:tower_fire; var _local12:building_mine; var _local13:building_church; if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if ((((int((root.mouseX / 32)) >= 1)) && ((int((root.mouseX / 32)) <= 14)))){ if ((((int((root.mouseY / 32)) >= 2)) && ((int((root.mouseY / 32)) <= 13)))){ if (NPS_selectedtowertype == "Arrow"){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 30)) && ((_local3 == true)))){ _local7 = new tower_arrow(); _local7.x = (int((root.mouseX / 32)) * 32); _local7.y = (int((root.mouseY / 32)) * 32); addChild(_local7); NPS_Towers.push(_local7); NPS_Gold = (NPS_Gold - 30); text_gold.text = String(NPS_Gold); NPS_Map[Math.round((_local7.y / 32))][Math.round((_local7.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPS_selectedtowertype == "Arcane"){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 125)) && ((_local3 == true)))){ _local8 = new tower_arcane(); _local8.x = (int((root.mouseX / 32)) * 32); _local8.y = (int((root.mouseY / 32)) * 32); addChild(_local8); NPS_Towers.push(_local8); NPS_Gold = (NPS_Gold - 125); text_gold.text = String(NPS_Gold); NPS_Map[Math.round((_local8.y / 32))][Math.round((_local8.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPS_selectedtowertype == "Cannon"){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 75)) && ((_local3 == true)))){ _local9 = new tower_cannon(); _local9.x = (int((root.mouseX / 32)) * 32); _local9.y = (int((root.mouseY / 32)) * 32); addChild(_local9); NPS_Towers.push(_local9); NPS_Gold = (NPS_Gold - 75); text_gold.text = String(NPS_Gold); NPS_Map[Math.round((_local9.y / 32))][Math.round((_local9.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPS_selectedtowertype == "Ice"){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 25)) && ((_local3 == true)))){ _local10 = new tower_ice(); _local10.x = (int((root.mouseX / 32)) * 32); _local10.y = (int((root.mouseY / 32)) * 32); addChild(_local10); NPS_Towers.push(_local10); NPS_Gold = (NPS_Gold - 25); text_gold.text = String(NPS_Gold); NPS_Map[Math.round((_local10.y / 32))][Math.round((_local10.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPS_selectedtowertype == "Fire"){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 100)) && ((_local3 == true)))){ _local11 = new tower_fire(); _local11.x = (int((root.mouseX / 32)) * 32); _local11.y = (int((root.mouseY / 32)) * 32); addChild(_local11); NPS_Towers.push(_local11); NPS_Gold = (NPS_Gold - 100); text_gold.text = String(NPS_Gold); NPS_Map[Math.round((_local11.y / 32))][Math.round((_local11.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; if (NPS_selectedtowertype == "Mine"){ if (NPS_PlacedMine == false){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 750)) && ((_local3 == true)))){ _local12 = new building_mine(); _local12.x = (int((root.mouseX / 32)) * 32); _local12.y = (int((root.mouseY / 32)) * 32); addChild(_local12); NPS_Towers.push(_local12); text_next_gold.x = (_local12.x + 3); text_next_gold.y = (_local12.y + 18); addChild(text_next_gold); NPS_Gold = (NPS_Gold - 750); text_gold.text = String(NPS_Gold); NPS_PlacedMine = true; NPS_LastGoldUpdate = getTimer(); NPS_Map[Math.round((_local12.y / 32))][Math.round((_local12.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; if (NPS_selectedtowertype == "Church"){ if (NPS_PlacedChurch == false){ _local3 = true; NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 0; if (Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x) != null){ _local6 = (NPS_Enemies.length - 1); while (_local6 >= 0) { if ((((int((root.mouseY / 32)) == int((NPS_Enemies[_local6].y / 32)))) && ((int((root.mouseX / 32)) == int((NPS_Enemies[_local6].x / 32)))))){ _local3 = false; }; _local6--; }; if ((((NPS_Gold >= 1000)) && ((_local3 == true)))){ _local13 = new building_church(); _local13.x = (int((root.mouseX / 32)) * 32); _local13.y = (int((root.mouseY / 32)) * 32); addChild(_local13); NPS_Towers.push(_local13); text_next_prayer.x = (_local13.x + 5); text_next_prayer.y = (_local13.y + 18); addChild(text_next_prayer); NPS_Gold = (NPS_Gold - 1000); text_gold.text = String(NPS_Gold); NPS_PlacedChurch = true; NPS_LastPrayerUpdate = getTimer(); NPS_Map[Math.round((_local13.y / 32))][Math.round((_local13.x / 32))] = 0; _local5 = (NPS_Enemies.length - 1); while (_local5 >= 0) { if (NPS_Enemies[_local5].y < 250){ _local2 = new Point(Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][1]), Math.round(NPS_Enemies[_local5].pPath[NPS_Enemies[_local5].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); if (NPS_Path == null){ }; NPS_Enemies[_local5].pPath = NPS_Path; NPS_Enemies[_local5].mapchange(); }; _local5--; }; }; } else { NPS_Map[int((root.mouseY / 32))][int((root.mouseX / 32))] = 1; }; }; }; }; }; }; NPS_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; upgrade_tower.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; text_tower_sell.x = 900; }; } public function play10min(_arg1:MouseEvent):void{ gotoAndStop(75); } function frame200(){ stop(); play_game.addEventListener(MouseEvent.MOUSE_UP, backtomenu); } public function NPS_CheckSelectedTower():void{ var _local1:int; var _local2:int; if (NPS_gamemode != "paused"){ _local1 = (NPS_Towers.length - 1); while (_local1 >= 0) { if (NPS_Towers[_local1].CheckSelected() == true){ NPS_SelectedTower = _local1; sell_tower.x = 524; text_tower_damage.x = 484; text_tower_level.x = 484; text_tower_range.x = 484; text_tower_sell.x = 484; text_tower_damage.text = ("Damage - " + NPS_Towers[_local1].pDamage.toFixed(2)); text_tower_range.text = ("Range - " + NPS_Towers[_local1].pRange); text_tower_level.text = ("Level - " + NPS_Towers[_local1].pLevel); text_tower_sell.text = ("Sell Value - " + String(int(((NPS_Towers[_local1].pLevel * NPS_Towers[_local1].pCost) * 0.95)))); NPS_gamemode = "none"; TheGrid1.alpha = 0; NPS_selectedtowertype = "none"; }; _local1--; }; _local2 = (NPS_Towers.length - 1); while (_local2 >= 0) { NPS_Towers[_local2].pSelected = false; _local2--; }; }; } public function NP_reportKeyUp(_arg1:KeyboardEvent):void{ var _local2:Number; var _local3:int; if (_arg1.keyCode == 49){ NP_tower_select_arrow_mouse_up(NP_MouseEvent); }; if (_arg1.keyCode == 50){ NP_tower_select_cannon_mouse_up(NP_MouseEvent); }; if (_arg1.keyCode == 51){ NP_tower_select_arcane_mouse_up(NP_MouseEvent); }; if (_arg1.keyCode == 52){ NP_tower_select_fire_mouse_up(NP_MouseEvent); }; if (_arg1.keyCode == 53){ NP_tower_select_ice_mouse_up(NP_MouseEvent); }; if (_arg1.keyCode == 85){ if (NP_gamemode != "paused"){ if (NP_SelectedTower != -1){ _local3 = 0; while (_local3 <= 51) { if (NP_Towers[NP_SelectedTower].pLevel < 51){ if (NP_Gold >= (0.5 * (NP_Towers[NP_SelectedTower].pCost * (NP_Towers[NP_SelectedTower].pLevel + 1)))){ NP_Gold = (NP_Gold - (0.5 * (NP_Towers[NP_SelectedTower].pCost * (NP_Towers[NP_SelectedTower].pLevel + 1)))); NP_Gold = Math.round(NP_Gold); text_gold.text = String(NP_Gold); if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_Towers[NP_SelectedTower].pLevel = (NP_Towers[NP_SelectedTower].pLevel + 1); NP_Towers[NP_SelectedTower].pDamage = (NP_Towers[NP_SelectedTower].pOrigDamage * ((NP_Towers[NP_SelectedTower].pLevel / 1.1) * ((NP_Towers[NP_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; text_tower_range.text = ("Range - " + NP_Towers[NP_SelectedTower].pRange); text_tower_damage.text = ("Damage - " + NP_Towers[NP_SelectedTower].pDamage.toFixed(2)); text_tower_level.text = ("Level - " + String(NP_Towers[NP_SelectedTower].pLevel)); text_tower_sell.text = ("Sell Value - " + String(int(((NP_Towers[NP_SelectedTower].pLevel * NP_Towers[NP_SelectedTower].pCost) * 0.7)))); }; }; _local3++; }; }; }; }; if (_arg1.keyCode == 83){ NP_sell_tower_click(NP_MouseEvent); }; } public function NPS_buy_angel_death_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Angel of Death(10 PP)"; text_towerinfo.text = "Calls forth the Angel of Death."; } public function NP_buy_church_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Church (500g)"; text_towerinfo.text = "Adds Prayer Points. Limit 1."; } public function NPI_CheckSelectedTower():void{ var _local1:int; var _local2:int; if (NPI_gamemode != "paused"){ _local1 = (NPI_Towers.length - 1); while (_local1 >= 0) { if (NPI_Towers[_local1].CheckSelected() == true){ NPI_SelectedTower = _local1; sell_tower.x = 524; text_tower_damage.x = 484; text_tower_level.x = 484; text_tower_range.x = 484; text_tower_sell.x = 484; text_tower_damage.text = ("Damage - " + NPI_Towers[_local1].pDamage.toFixed(2)); text_tower_range.text = ("Range - " + NPI_Towers[_local1].pRange); text_tower_level.text = ("Level - " + NPI_Towers[_local1].pLevel); text_tower_sell.text = ("Sell Value - " + String(int(((NPI_Towers[_local1].pLevel * NPI_Towers[_local1].pCost) * 0.95)))); NPI_gamemode = "none"; TheGrid1.alpha = 0; NPI_selectedtowertype = "none"; }; _local1--; }; _local2 = (NPI_Towers.length - 1); while (_local2 >= 0) { NPI_Towers[_local2].pSelected = false; _local2--; }; }; } public function NPH_musicright_mouse_up(_arg1:MouseEvent):void{ if (NPH_Muted == false){ NPH_CurrentSong++; if (NPH_CurrentSong == 6){ NPH_CurrentSong = 1; }; NPH_channel.stop(); if (NPH_CurrentSong == 1){ NPH_channel = NPH_Ambient1.play(0, 99999); }; if (NPH_CurrentSong == 2){ NPH_channel = NPH_Ambient2.play(0, 99999); }; if (NPH_CurrentSong == 3){ NPH_channel = NPH_Ambient3.play(0, 99999); }; if (NPH_CurrentSong == 4){ NPH_channel = NPH_Ambient4.play(0, 99999); }; if (NPH_CurrentSong == 5){ NPH_channel = NPH_Ambient5.play(0, 99999); }; }; } public function everytimesponsor(_arg1:Event):void{ if (getTimer() > (pagedelay + lastpage)){ gotoAndStop(10); removeEventListener(Event.ENTER_FRAME, everytimesponsor); }; } public function NPI_placeenemies():void{ var _local1:*; var _local2:script_enemy_orc; var _local3:enemy_health_bar; var _local4:script_enemy_armororc; var _local5:enemy_health_bar; var _local6:script_enemy_goblin; var _local7:enemy_health_bar; var _local8:script_enemy_fasttroll; var _local9:enemy_health_bar; var _local10:script_enemy_tauren; var _local11:enemy_health_bar; var _local12:script_enemy_armortroll; var _local13:enemy_health_bar; var _local14:script_enemy_lion; var _local15:enemy_health_bar; var _local16:script_enemy_undead; var _local17:enemy_health_bar; var _local18:script_enemy_clothundead; var _local19:enemy_health_bar; var _local20:script_enemy_demon; var _local21:enemy_health_bar; var _local22:script_enemy_boss1; var _local23:enemy_health_bar; if (NPI_gamemode != "paused"){ NPI_GameLevel = (NPI_GameLevel + 1); NPI_WaveDelay = (NPI_WaveDelay - 500); if (NPI_WaveDelay < 10000){ NPI_WaveDelay = 10000; }; NPI_Path = Pathfinding.findPath(NPI_Map, NPI_MapStart.y, NPI_MapStart.x, NPI_MapEnd.y, NPI_MapEnd.x); _local1 = 0; while (_local1 < 25) { if (NPI_LastEnemyType == 1){ _local2 = new script_enemy_orc(_local1, NPI_GameLevel, "insane"); addChild(_local2); NPI_Enemies.push(_local2); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local3 = new enemy_health_bar(); _local3.pEnemy = (NPI_Enemies.length - 1); _local3.x = (_local2.x - 13); _local3.y = (_local2.y - 16); _local3.pWidth = 32; text_enemy_hp.text = String(Math.round(_local2.pStartHealth)); addChild(_local3); NPI_HealthBars.push(_local3); _local2.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NPI_LastEnemyType == 2){ _local4 = new script_enemy_armororc(_local1, NPI_GameLevel, "insane"); addChild(_local4); NPI_Enemies.push(_local4); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local5 = new enemy_health_bar(); _local5.pEnemy = (NPI_Enemies.length - 1); _local5.x = (_local4.x - 13); _local5.y = (_local4.y - 16); _local5.pWidth = 32; text_enemy_hp.text = String(Math.round(_local4.pStartHealth)); addChild(_local5); NPI_HealthBars.push(_local5); _local4.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPI_LastEnemyType == 3){ _local6 = new script_enemy_goblin(_local1, NPI_GameLevel, "insane"); addChild(_local6); NPI_Enemies.push(_local6); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local7 = new enemy_health_bar(); _local7.pEnemy = (NPI_Enemies.length - 1); _local7.x = (_local6.x - 13); _local7.y = (_local6.y - 16); _local7.pWidth = 32; text_enemy_hp.text = String(Math.round(_local6.pStartHealth)); addChild(_local7); NPI_HealthBars.push(_local7); _local6.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NPI_LastEnemyType == 4){ _local8 = new script_enemy_fasttroll(_local1, NPI_GameLevel, "insane"); addChild(_local8); NPI_Enemies.push(_local8); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local9 = new enemy_health_bar(); _local9.pEnemy = (NPI_Enemies.length - 1); _local9.x = (_local8.x - 13); _local9.y = (_local8.y - 16); _local9.pWidth = 32; text_enemy_hp.text = String(Math.round(_local8.pStartHealth)); addChild(_local9); NPI_HealthBars.push(_local9); _local8.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPI_LastEnemyType == 5){ _local10 = new script_enemy_tauren(_local1, NPI_GameLevel, "insane"); addChild(_local10); NPI_Enemies.push(_local10); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local11 = new enemy_health_bar(); _local11.pEnemy = (NPI_Enemies.length - 1); _local11.x = (_local10.x - 13); _local11.y = (_local10.y - 16); _local11.pWidth = 32; text_enemy_hp.text = String(Math.round(_local10.pStartHealth)); addChild(_local11); NPI_HealthBars.push(_local11); _local10.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NPI_LastEnemyType == 6){ _local12 = new script_enemy_armortroll(_local1, NPI_GameLevel, "insane"); addChild(_local12); NPI_Enemies.push(_local12); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local13 = new enemy_health_bar(); _local13.pEnemy = (NPI_Enemies.length - 1); _local13.x = (_local12.x - 13); _local13.y = (_local12.y - 16); _local13.pWidth = 32; text_enemy_hp.text = String(Math.round(_local12.pStartHealth)); addChild(_local13); NPI_HealthBars.push(_local13); _local12.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPI_LastEnemyType == 7){ _local14 = new script_enemy_lion(_local1, NPI_GameLevel, "insane"); addChild(_local14); NPI_Enemies.push(_local14); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local15 = new enemy_health_bar(); _local15.pEnemy = (NPI_Enemies.length - 1); _local15.x = (_local14.x - 13); _local15.y = (_local14.y - 16); _local15.pWidth = 32; text_enemy_hp.text = String(Math.round(_local14.pStartHealth)); addChild(_local15); NPI_HealthBars.push(_local15); _local14.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NPI_LastEnemyType == 8){ _local16 = new script_enemy_undead(_local1, NPI_GameLevel, "insane"); addChild(_local16); NPI_Enemies.push(_local16); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local17 = new enemy_health_bar(); _local17.pEnemy = (NPI_Enemies.length - 1); _local17.x = (_local16.x - 13); _local17.y = (_local16.y - 16); _local17.pWidth = 32; text_enemy_hp.text = String(Math.round(_local16.pStartHealth)); addChild(_local17); NPI_HealthBars.push(_local17); _local16.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPI_LastEnemyType == 9){ _local18 = new script_enemy_clothundead(_local1, NPI_GameLevel, "insane"); addChild(_local18); NPI_Enemies.push(_local18); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local19 = new enemy_health_bar(); _local19.pEnemy = (NPI_Enemies.length - 1); _local19.x = (_local18.x - 13); _local19.y = (_local18.y - 16); _local19.pWidth = 32; text_enemy_hp.text = String(Math.round(_local18.pStartHealth)); addChild(_local19); NPI_HealthBars.push(_local19); _local18.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Immune to magic!"; } else { if (NPI_LastEnemyType == 10){ _local20 = new script_enemy_demon(_local1, NPI_GameLevel, "insane"); addChild(_local20); NPI_Enemies.push(_local20); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local21 = new enemy_health_bar(); _local21.pEnemy = (NPI_Enemies.length - 1); _local21.x = (_local20.x - 13); _local21.y = (_local20.y - 16); _local21.pWidth = 32; text_enemy_hp.text = String(Math.round(_local20.pStartHealth)); addChild(_local21); NPI_HealthBars.push(_local21); _local20.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Boss Round"; }; }; }; }; }; }; }; }; }; }; _local1++; }; if (NPI_LastEnemyType == 11){ _local22 = new script_enemy_boss1(0, NPI_GameLevel, "insane"); addChild(_local22); NPI_Enemies.push(_local22); NPI_LastWave = getTimer(); text_level.text = String(NPI_GameLevel); _local23 = new enemy_health_bar(); _local23.pEnemy = (NPI_Enemies.length - 1); _local23.x = (_local22.x - 13); _local23.y = (_local22.y - 16); _local23.pWidth = 32; text_enemy_hp.text = String(Math.round(_local22.pStartHealth)); addChild(_local23); NPI_HealthBars.push(_local23); _local22.pPath = NPI_Path; text_nexttype.text = "Next Enemy Type : Normal"; }; NPI_LastEnemyType = (NPI_LastEnemyType + 1); if (NPI_LastEnemyType == 12){ NPI_LastEnemyType = 1; }; }; } public function NP_restart_yes(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = (NP_HealthBars.length - 1); while (_local2 >= 0) { removeChild(NP_HealthBars[_local2]); NP_HealthBars.splice(_local2, 1); _local2--; }; _local3 = (NP_Bullets.length - 1); while (_local3 >= 0) { if (NP_Bullets[_local3].pVisible == true){ removeChild(NP_Bullets[_local3]); }; NP_Bullets.splice(_local3, 1); _local3--; }; _local4 = (NP_Towers.length - 1); while (_local4 >= 0) { removeChild(NP_Towers[_local4]); NP_Towers.splice(_local4, 1); _local4--; }; _local5 = (NP_Enemies.length - 1); while (_local5 >= 0) { removeChild(NP_Enemies[_local5]); NP_Enemies.splice(_local5, 1); _local5--; }; removeEventListener(Event.ENTER_FRAME, NP_everytime); removeEventListener(KeyboardEvent.KEY_UP, NP_reportKeyUp); NP_channel.stop(); gotoAndStop(10); } public function restart_game10(_arg1:MouseEvent):void{ restart_sure.x = 51; restart_yes.x = 142.9; restart_no.x = 309; } public function restart_game11(_arg1:MouseEvent):void{ restart_sure.x = 51; restart_yes.x = 142.9; restart_no.x = 309; } public function restart_game12(_arg1:MouseEvent):void{ restart_sure.x = 51; restart_yes.x = 142.9; restart_no.x = 309; } public function NPH_musicleft_mouse_up(_arg1:MouseEvent):void{ if (NPH_Muted == false){ NPH_CurrentSong--; if (NPH_CurrentSong == 0){ NPH_CurrentSong = 5; }; NPH_channel.stop(); if (NPH_CurrentSong == 1){ NPH_channel = NPH_Ambient1.play(0, 99999); }; if (NPH_CurrentSong == 2){ NPH_channel = NPH_Ambient2.play(0, 99999); }; if (NPH_CurrentSong == 3){ NPH_channel = NPH_Ambient3.play(0, 99999); }; if (NPH_CurrentSong == 4){ NPH_channel = NPH_Ambient4.play(0, 99999); }; if (NPH_CurrentSong == 5){ NPH_channel = NPH_Ambient5.play(0, 99999); }; }; } public function NPS_tower_select_arcane_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Arcane"){ NPS_gamemode = "off"; TheGrid1.alpha = 0; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Arcane"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Arcane"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Arcane"; }; }; }; } public function NPH_MoveAndCheckJudgement():void{ var _local1:int; if (NPH_gamemode != "paused"){ _local1 = (NPH_Judgement.length - 1); while (_local1 >= 0) { if (NPH_Judgement[_local1].y < -114){ drawonme.removeChild(NPH_Judgement[_local1]); NPH_Judgement.splice(_local1, 1); }; _local1--; }; }; } public function NPH_CheckEnemiesForHit():void{ var i:int; var k:int; var xdist:Number; var ydist:Number; var distancefromthis:Number; var a:int; if (NPH_gamemode != "paused"){ try { i = (NPH_Enemies.length - 1); while (i >= 0) { k = (NPH_Bullets.length - 1); while (k >= 0) { if (NPH_Enemies[i].hitTestObject(NPH_Bullets[k])){ NPH_Enemies[i].GotHit(NPH_Bullets[k].pDamage, NPH_Bullets[k].pBulletType); if (NPH_Bullets[k].pBulletType == 2){ if (NPH_Enemies[i].pSpeed > 0.3){ NPH_Enemies[i].pSpeed = (NPH_Enemies[i].pSpeed - 0.2); }; }; if (NPH_Bullets[k].pBulletType == 4){ a = (NPH_Enemies.length - 1); while (a >= 0) { xdist = Math.round((NPH_Bullets[k].x - NPH_Enemies[a].x)); ydist = Math.round((NPH_Bullets[k].y - NPH_Enemies[a].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < 50){ if (a != NPH_Bullets[k].pTarget){ NPH_Enemies[a].GotHit(((5 * NPH_Towers[NPH_Bullets[k].pTower].pLevel) * 0.75), 4); }; }; a = (a - 1); }; }; NPH_Bullets[k].x = -100; NPH_Bullets[k].y = -100; if (NPH_Bullets[k].pVisible == true){ removeChild(NPH_Bullets[k].pBullet); }; NPH_Bullets.splice(k, 1); }; k = (k - 1); }; i = (i - 1); }; } catch(e:TypeError) { }; }; } public function NPS_buy_church_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Church"){ if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_gamemode = "off"; TheGrid1.alpha = 0; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Church"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Church"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Church"; }; }; }; } public function NPH_tower_select_arcane_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Arcane"){ NPH_gamemode = "off"; TheGrid1.alpha = 0; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Arcane"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Arcane"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Arcane"; }; }; }; } public function NPS_placeenemies():void{ var _local1:*; var _local2:script_enemy_orc; var _local3:enemy_health_bar; var _local4:script_enemy_armororc; var _local5:enemy_health_bar; var _local6:script_enemy_goblin; var _local7:enemy_health_bar; var _local8:script_enemy_fasttroll; var _local9:enemy_health_bar; var _local10:script_enemy_tauren; var _local11:enemy_health_bar; var _local12:script_enemy_armortroll; var _local13:enemy_health_bar; var _local14:script_enemy_lion; var _local15:enemy_health_bar; var _local16:script_enemy_undead; var _local17:enemy_health_bar; var _local18:script_enemy_clothundead; var _local19:enemy_health_bar; var _local20:script_enemy_demon; var _local21:enemy_health_bar; var _local22:script_enemy_boss1; var _local23:enemy_health_bar; if (NPS_gamemode != "paused"){ NPS_WaveDelay = (NPS_WaveDelay - 500); if (NPS_WaveDelay < 10000){ NPS_WaveDelay = 10000; }; NPS_GameLevel = (NPS_GameLevel + 1); NPS_Path = Pathfinding.findPath(NPS_Map, NPS_MapStart.y, NPS_MapStart.x, NPS_MapEnd.y, NPS_MapEnd.x); _local1 = 0; while (_local1 < 25) { if (NPS_LastEnemyType == 1){ _local2 = new script_enemy_orc(_local1, NPS_GameLevel, "hard"); addChild(_local2); NPS_Enemies.push(_local2); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local3 = new enemy_health_bar(); _local3.pEnemy = (NPS_Enemies.length - 1); _local3.x = (_local2.x - 13); _local3.y = (_local2.y - 16); _local3.pWidth = 32; text_enemy_hp.text = String(Math.round(_local2.pStartHealth)); addChild(_local3); NPS_HealthBars.push(_local3); _local2.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NPS_LastEnemyType == 2){ _local4 = new script_enemy_armororc(_local1, NPS_GameLevel, "hard"); addChild(_local4); NPS_Enemies.push(_local4); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local5 = new enemy_health_bar(); _local5.pEnemy = (NPS_Enemies.length - 1); _local5.x = (_local4.x - 13); _local5.y = (_local4.y - 16); _local5.pWidth = 32; text_enemy_hp.text = String(Math.round(_local4.pStartHealth)); addChild(_local5); NPS_HealthBars.push(_local5); _local4.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPS_LastEnemyType == 3){ _local6 = new script_enemy_goblin(_local1, NPS_GameLevel, "hard"); addChild(_local6); NPS_Enemies.push(_local6); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local7 = new enemy_health_bar(); _local7.pEnemy = (NPS_Enemies.length - 1); _local7.x = (_local6.x - 13); _local7.y = (_local6.y - 16); _local7.pWidth = 32; text_enemy_hp.text = String(Math.round(_local6.pStartHealth)); addChild(_local7); NPS_HealthBars.push(_local7); _local6.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NPS_LastEnemyType == 4){ _local8 = new script_enemy_fasttroll(_local1, NPS_GameLevel, "hard"); addChild(_local8); NPS_Enemies.push(_local8); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local9 = new enemy_health_bar(); _local9.pEnemy = (NPS_Enemies.length - 1); _local9.x = (_local8.x - 13); _local9.y = (_local8.y - 16); _local9.pWidth = 32; text_enemy_hp.text = String(Math.round(_local8.pStartHealth)); addChild(_local9); NPS_HealthBars.push(_local9); _local8.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPS_LastEnemyType == 5){ _local10 = new script_enemy_tauren(_local1, NPS_GameLevel, "hard"); addChild(_local10); NPS_Enemies.push(_local10); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local11 = new enemy_health_bar(); _local11.pEnemy = (NPS_Enemies.length - 1); _local11.x = (_local10.x - 13); _local11.y = (_local10.y - 16); _local11.pWidth = 32; text_enemy_hp.text = String(Math.round(_local10.pStartHealth)); addChild(_local11); NPS_HealthBars.push(_local11); _local10.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Armor"; } else { if (NPS_LastEnemyType == 6){ _local12 = new script_enemy_armortroll(_local1, NPS_GameLevel, "hard"); addChild(_local12); NPS_Enemies.push(_local12); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local13 = new enemy_health_bar(); _local13.pEnemy = (NPS_Enemies.length - 1); _local13.x = (_local12.x - 13); _local13.y = (_local12.y - 16); _local13.pWidth = 32; text_enemy_hp.text = String(Math.round(_local12.pStartHealth)); addChild(_local13); NPS_HealthBars.push(_local13); _local12.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPS_LastEnemyType == 7){ _local14 = new script_enemy_lion(_local1, NPS_GameLevel, "hard"); addChild(_local14); NPS_Enemies.push(_local14); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local15 = new enemy_health_bar(); _local15.pEnemy = (NPS_Enemies.length - 1); _local15.x = (_local14.x - 13); _local15.y = (_local14.y - 16); _local15.pWidth = 32; text_enemy_hp.text = String(Math.round(_local14.pStartHealth)); addChild(_local15); NPS_HealthBars.push(_local15); _local14.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Fast"; } else { if (NPS_LastEnemyType == 8){ _local16 = new script_enemy_undead(_local1, NPS_GameLevel, "hard"); addChild(_local16); NPS_Enemies.push(_local16); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local17 = new enemy_health_bar(); _local17.pEnemy = (NPS_Enemies.length - 1); _local17.x = (_local16.x - 13); _local17.y = (_local16.y - 16); _local17.pWidth = 32; text_enemy_hp.text = String(Math.round(_local16.pStartHealth)); addChild(_local17); NPS_HealthBars.push(_local17); _local16.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Normal"; } else { if (NPS_LastEnemyType == 9){ _local18 = new script_enemy_clothundead(_local1, NPS_GameLevel, "hard"); addChild(_local18); NPS_Enemies.push(_local18); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local19 = new enemy_health_bar(); _local19.pEnemy = (NPS_Enemies.length - 1); _local19.x = (_local18.x - 13); _local19.y = (_local18.y - 16); _local19.pWidth = 32; text_enemy_hp.text = String(Math.round(_local18.pStartHealth)); addChild(_local19); NPS_HealthBars.push(_local19); _local18.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Immune to magic!"; } else { if (NPS_LastEnemyType == 10){ _local20 = new script_enemy_demon(_local1, NPS_GameLevel, "hard"); addChild(_local20); NPS_Enemies.push(_local20); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local21 = new enemy_health_bar(); _local21.pEnemy = (NPS_Enemies.length - 1); _local21.x = (_local20.x - 13); _local21.y = (_local20.y - 16); _local21.pWidth = 32; text_enemy_hp.text = String(Math.round(_local20.pStartHealth)); addChild(_local21); NPS_HealthBars.push(_local21); _local20.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Boss Round"; }; }; }; }; }; }; }; }; }; }; _local1++; }; if (NPS_LastEnemyType == 11){ _local22 = new script_enemy_boss1(0, NPS_GameLevel, "hard"); addChild(_local22); NPS_Enemies.push(_local22); NPS_LastWave = getTimer(); text_level.text = String(NPS_GameLevel); _local23 = new enemy_health_bar(); _local23.pEnemy = (NPS_Enemies.length - 1); _local23.x = (_local22.x - 13); _local23.y = (_local22.y - 16); _local23.pWidth = 32; text_enemy_hp.text = String(Math.round(_local22.pStartHealth)); addChild(_local23); NPS_HealthBars.push(_local23); _local22.pPath = NPS_Path; text_nexttype.text = "Next Enemy Type : Normal"; }; NPS_LastEnemyType = (NPS_LastEnemyType + 1); if (NPS_LastEnemyType == 12){ NPS_LastEnemyType = 1; }; }; } public function NPH_musicleft_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NP_buy_judgement_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:judgement; if (NP_gamemode != "paused"){ if (NP_Prayer >= 15){ if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_Prayer = (NP_Prayer - 15); text_prayer.text = String(NP_Prayer); _local2 = 0; while (_local2 < (NP_Enemies.length - 1)) { _local3 = new judgement(); _local3.x = NP_Enemies[_local2].x; _local3.y = NP_Enemies[_local2].y; NP_Enemies[_local2].GotHit(999999, 1); drawonme.addChild(_local3); NP_Judgement.push(_local3); _local2++; }; }; }; } public function NPS_musicmute_mouse_up(_arg1:MouseEvent):void{ if (NPS_Muted == false){ NPS_channel.stop(); NPS_Muted = true; } else { if (NPS_CurrentSong == 1){ NPS_channel = NPS_Ambient1.play(0, 99999); }; if (NPS_CurrentSong == 2){ NPS_channel = NPS_Ambient2.play(0, 99999); }; if (NPS_CurrentSong == 3){ NPS_channel = NPS_Ambient3.play(0, 99999); }; if (NPS_CurrentSong == 4){ NPS_channel = NPS_Ambient4.play(0, 99999); }; if (NPS_CurrentSong == 5){ NPS_channel = NPS_Ambient5.play(0, 99999); }; NPS_Muted = false; }; } public function NPH_pausebutton_mouse_up(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; NPH_gamemode = "paused"; if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; playbutton.x = 99; pausebutton.x = 900; NPH_PausedTimer1 = getTimer(); _local2 = (NPH_Enemies.length - 1); while (_local2 >= 0) { NPH_Enemies[_local2].pPaused = true; _local2--; }; _local3 = (NPH_AngelsOfDeath.length - 1); while (_local3 >= 0) { NPH_AngelsOfDeath[_local3].pPaused = true; _local3--; }; _local4 = (NPH_Blizzards.length - 1); while (_local4 >= 0) { NPH_Blizzards[_local4].pPaused = true; _local4--; }; } public function NPS_buy_blizzard_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Blizzard(3 PP)"; text_towerinfo.text = "Calls forth a Blizzard to slow your enemies."; } public function NPI_upgrade_tower_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; if (NPI_gamemode != "paused"){ if (NPI_Towers[NPI_SelectedTower].pLevel < 31){ if (NPI_Gold >= (0.5 * (NPI_Towers[NPI_SelectedTower].pCost * (NPI_Towers[NPI_SelectedTower].pLevel + 1)))){ NPI_Gold = (NPI_Gold - (0.5 * (NPI_Towers[NPI_SelectedTower].pCost * (NPI_Towers[NPI_SelectedTower].pLevel + 1)))); NPI_Gold = Math.round(NPI_Gold); text_gold.text = String(NPI_Gold); if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_Towers[NPI_SelectedTower].pLevel = (NPI_Towers[NPI_SelectedTower].pLevel + 1); NPI_Towers[NPI_SelectedTower].pDamage = (NPI_Towers[NPI_SelectedTower].pOrigDamage * ((NPI_Towers[NPI_SelectedTower].pLevel / 1.1) * ((NPI_Towers[NPI_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; _local2 = (NPI_Towers[NPI_SelectedTower].pOrigDamage * (((NPI_Towers[NPI_SelectedTower].pLevel + 1) / 1.1) * (((NPI_Towers[NPI_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NPI_Towers[NPI_SelectedTower].pCost * (NPI_Towers[NPI_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NPI_Towers[NPI_SelectedTower].pLevel) + "(") + (NPI_Towers[NPI_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NPI_Towers[NPI_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); text_tower_range.text = ("Range - " + NPI_Towers[NPI_SelectedTower].pRange); text_tower_sell.text = ("Sell Value - " + String(int(((NPI_Towers[NPI_SelectedTower].pLevel * NPI_Towers[NPI_SelectedTower].pCost) * 0.7)))); }; }; }; } public function NPI_musicright_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NP_MoveAndCheckBlizzard():void{ var _local1:int; var _local2:int; if (NP_gamemode != "paused"){ _local1 = (NP_Blizzards.length - 1); while (_local1 >= 0) { _local2 = (NP_Enemies.length - 1); while (_local2 >= 0) { if (NP_Enemies[_local2].hitTestObject(NP_Blizzards[_local1])){ NP_Enemies[_local2].pSpeed = 0; }; _local2--; }; if (NP_Blizzards[_local1].y < -128){ drawonme.removeChild(NP_Blizzards[_local1]); NP_Blizzards.splice(_local1, 1); }; _local1--; }; }; } public function NPS_MoveBullets():void{ var i:int; var a:int; if (NPS_gamemode != "paused"){ try { i = (NPS_Bullets.length - 1); while (i >= 0) { NPS_Bullets[i].movebullet(NPS_Enemies[NPS_Bullets[i].pTarget].x, NPS_Enemies[NPS_Bullets[i].pTarget].y); i = (i - 1); }; } catch(e:TypeError) { a = (NPS_Bullets.length - 1); while (a >= 0) { NPS_Bullets[a].x = -900; NPS_Bullets[a].y = -900; NPS_Bullets[a].pTarget = -1; if (NPS_Bullets[a].pVisible == true){ removeChild(NPS_Bullets[a].pBullet); }; NPS_Bullets.splice(a, 1); a = (a - 1); }; }; }; } public function NP_tower_select_arcane_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arcane Tower (125g)"; text_towerinfo.text = "Medium Speed, High Dmg. (Magic Damage)"; } public function NPH_playbutton_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; var _local3:int; var _local4:int; var _local5:int; var _local6:int; NPH_gamemode = "none"; playbutton.x = 900; pausebutton.x = 99; NPH_PausedTimer2 = getTimer(); _local2 = (NPH_PausedTimer2 - NPH_PausedTimer1); _local3 = (NPH_Towers.length - 1); while (_local3 >= 0) { NPH_Towers[_local3].pLastFire = (NPH_Towers[_local3].pLastFire + _local2); _local3--; }; NPH_LastPrayerUpdate = (NPH_LastPrayerUpdate + _local2); NPH_LastGoldUpdate = (NPH_LastGoldUpdate + _local2); NPH_LastWave = (NPH_LastWave + _local2); if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; _local4 = (NPH_Enemies.length - 1); while (_local4 >= 0) { NPH_Enemies[_local4].pPaused = false; _local4--; }; _local5 = (NPH_AngelsOfDeath.length - 1); while (_local5 >= 0) { NPH_AngelsOfDeath[_local5].pPaused = false; _local5--; }; _local6 = (NPH_Blizzards.length - 1); while (_local6 >= 0) { NPH_Blizzards[_local6].pPaused = false; _local6--; }; } public function NP_checkpathcollision(_arg1, _arg2):Boolean{ var _local3:*; var _local4:int; _local3 = (_arg1 + 1); _local4 = (_arg2 + 1); return (false); } public function NPI_musicmute_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Mute Sound"; text_towerinfo.text = "Mutes all sound."; } public function NPI_MoveAndCheckBlizzard():void{ var _local1:int; var _local2:int; if (NPI_gamemode != "paused"){ _local1 = (NPI_Blizzards.length - 1); while (_local1 >= 0) { _local2 = (NPI_Enemies.length - 1); while (_local2 >= 0) { if (NPI_Enemies[_local2].hitTestObject(NPI_Blizzards[_local1])){ NPI_Enemies[_local2].pSpeed = 0; }; _local2--; }; if (NPI_Blizzards[_local1].y < -128){ drawonme.removeChild(NPI_Blizzards[_local1]); NPI_Blizzards.splice(_local1, 1); }; _local1--; }; }; } public function NPI_tower_select_fire_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Fire"){ NPI_gamemode = "off"; TheGrid1.alpha = 0; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Fire"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Fire"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; NPI_selectedtowertype = "Fire"; }; }; }; } public function NPI_musicmute_mouse_up(_arg1:MouseEvent):void{ if (NPI_Muted == false){ NPI_channel.stop(); NPI_Muted = true; } else { if (NPI_CurrentSong == 1){ NPI_channel = NPI_Ambient1.play(0, 99999); }; if (NPI_CurrentSong == 2){ NPI_channel = NPI_Ambient2.play(0, 99999); }; if (NPI_CurrentSong == 3){ NPI_channel = NPI_Ambient3.play(0, 99999); }; if (NPI_CurrentSong == 4){ NPI_channel = NPI_Ambient4.play(0, 99999); }; if (NPI_CurrentSong == 5){ NPI_channel = NPI_Ambient5.play(0, 99999); }; NPI_Muted = false; }; } public function NP_buy_church_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Church"){ if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_gamemode = "off"; TheGrid1.alpha = 0; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Church"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Church"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Church"; }; }; }; } public function NPS_tower_select_ice_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Ice Tower (25g)"; text_towerinfo.text = "Slows enemies down. (Magic Damage)"; } public function NP_tower_select_cannon_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Cannon Tower (75g)"; text_towerinfo.text = "Medium Dmg, Splash Dmg. (Normal Damage)"; } public function NP_tower_select_fire_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Fire"){ NP_gamemode = "off"; TheGrid1.alpha = 0; if (NP_Muted == false){ NP_ButtonClick.play(); }; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Fire"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Fire"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NP_Muted == false){ NP_ButtonClick.play(); }; NP_selectedtowertype = "Fire"; }; }; }; } public function NPH_MoveBullets():void{ var i:int; var a:int; if (NPH_gamemode != "paused"){ try { i = (NPH_Bullets.length - 1); while (i >= 0) { NPH_Bullets[i].movebullet(NPH_Enemies[NPH_Bullets[i].pTarget].x, NPH_Enemies[NPH_Bullets[i].pTarget].y); i = (i - 1); }; } catch(e:TypeError) { a = (NPH_Bullets.length - 1); while (a >= 0) { NPH_Bullets[a].x = -900; NPH_Bullets[a].y = -900; NPH_Bullets[a].pTarget = -1; if (NPH_Bullets[a].pVisible == true){ removeChild(NPH_Bullets[a].pBullet); }; NPH_Bullets.splice(a, 1); a = (a - 1); }; }; }; } public function NPH_UpdateEnemyHealthBar():void{ var _local1:Number; var _local2:Number; var _local3:int; if (NPH_gamemode != "paused"){ _local3 = (NPH_HealthBars.length - 1); while (_local3 >= 0) { _local1 = (NPH_Enemies[NPH_HealthBars[_local3].pEnemy].pHealth / NPH_Enemies[NPH_HealthBars[_local3].pEnemy].pStartHealth); _local1 = (_local1 * 100); _local2 = ((27 * _local1) / 100); NPH_HealthBars[_local3].x = (NPH_Enemies[NPH_HealthBars[_local3].pEnemy].x - 13); NPH_HealthBars[_local3].y = (NPH_Enemies[NPH_HealthBars[_local3].pEnemy].y - 16); NPH_HealthBars[_local3].pWidth = _local2; NPH_HealthBars[_local3].width = _local2; _local3--; }; }; } public function NPH_tower_select_ice_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Ice Tower (25g)"; text_towerinfo.text = "Slows enemies down. (Magic Damage)"; } public function NPI_buy_blizzard_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Blizzard(3 PP)"; text_towerinfo.text = "Calls forth a Blizzard to slow your enemies."; } public function NPH_tower_select_deselect(_arg1:MouseEvent):void{ var event = _arg1; try { text_towertype.text = ""; text_towerinfo.text = ""; text_tower_level.text = ("Level - " + NPH_Towers[NPH_SelectedTower].pLevel); text_tower_damage.text = ("Damage - " + NPH_Towers[NPH_SelectedTower].pDamage.toFixed(2)); } catch(e:TypeError) { }; } public function NP_CheckEnemyHealth():void{ var i:int; var h:int; var k:int; var a:int; if (NP_gamemode != "paused"){ try { i = (NP_Enemies.length - 1); while (i >= 0) { if (NP_Enemies[i].pHealth <= 0){ NP_Enemies[i].x = -500; NP_Enemies[i].y = -500; if (NP_Enemies[i].pType == 5){ NP_Gold = (NP_Gold + Math.round(((1.75 * NP_GameLevel) + 0.5))); NP_GameScore = (NP_GameScore + 50); } else { NP_Gold = (NP_Gold + Math.round(((0.25 * NP_GameLevel) + 0.5))); NP_GameScore = (NP_GameScore + 10); }; removeChild(NP_Enemies[i]); NP_Enemies.splice(i, 1); text_gold.text = String(NP_Gold); text_score.text = String(NP_GameScore); h = (NP_HealthBars.length - 1); while (h >= 0) { if (NP_HealthBars[h].pEnemy == i){ NP_HealthBars[h].x = -900; removeChild(NP_HealthBars[h]); NP_HealthBars.splice(h, 1); }; if (NP_HealthBars[h].pEnemy > i){ NP_HealthBars[h].pEnemy = (NP_HealthBars[h].pEnemy - 1); }; h = (h - 1); }; k = (NP_Bullets.length - 1); while (k >= 0) { if (k != i){ if (NP_Bullets[k].pTarget > i){ NP_Bullets[k].pTarget = (NP_Bullets[k].pTarget - 1); }; }; if (NP_Bullets[k].pTarget == i){ NP_Bullets[k].x = -100; NP_Bullets[k].y = -100; if (NP_Bullets[k].pVisible == true){ removeChild(NP_Bullets[k].pBullet); }; NP_Bullets.splice(k, 1); }; k = (k - 1); }; a = (NP_Towers.length - 1); while (a >= 0) { if (NP_Towers[a].pTarget == i){ NP_Towers[a].pTarget = -1; }; if (NP_Towers[a].pTarget > i){ NP_Towers[a].pTarget = (NP_Towers[a].pTarget - 1); }; a = (a - 1); }; }; i = (i - 1); }; } catch(e:TypeError) { }; }; } public function NPS_buy_blizzard_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:blizzard_graphic; if (NPS_gamemode != "paused"){ if (NPS_Prayer >= 3){ if (NPS_Muted == false){ if (NPS_Muted == false){ NPS_ButtonClick.play(); }; }; NPS_Prayer = (NPS_Prayer - 3); text_prayer.text = String(NPS_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new blizzard_graphic(); drawonme.addChild(_local3); NPS_Blizzards.push(_local3); _local2++; }; }; }; } public function NP_upgrade_tower_mouse_enter(_arg1:MouseEvent):void{ var _local2:Number; _local2 = (NP_Towers[NP_SelectedTower].pOrigDamage * (((NP_Towers[NP_SelectedTower].pLevel + 1) / 1.1) * (((NP_Towers[NP_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NP_Towers[NP_SelectedTower].pCost * (NP_Towers[NP_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NP_Towers[NP_SelectedTower].pLevel) + "(") + (NP_Towers[NP_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NP_Towers[NP_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); } public function NPH_tower_select_fire_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Fire"){ NPH_gamemode = "off"; TheGrid1.alpha = 0; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Fire"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Fire"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; NPH_selectedtowertype = "Fire"; }; }; }; } public function NPH_upgrade_tower_mouse_enter(_arg1:MouseEvent):void{ var _local2:Number; _local2 = (NPH_Towers[NPH_SelectedTower].pOrigDamage * (((NPH_Towers[NPH_SelectedTower].pLevel + 1) / 1.1) * (((NPH_Towers[NPH_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NPH_Towers[NPH_SelectedTower].pCost * (NPH_Towers[NPH_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NPH_Towers[NPH_SelectedTower].pLevel) + "(") + (NPH_Towers[NPH_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NPH_Towers[NPH_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); } public function NPI_buy_church_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Church"){ if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_gamemode = "off"; TheGrid1.alpha = 0; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Church"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Church"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Church"; }; }; }; } public function NPH_upgrade_tower_mouse_up(_arg1:MouseEvent):void{ var _local2:Number; if (NPH_gamemode != "paused"){ if (NPH_Towers[NPH_SelectedTower].pLevel < 41){ if (NPH_Gold >= (0.5 * (NPH_Towers[NPH_SelectedTower].pCost * (NPH_Towers[NPH_SelectedTower].pLevel + 1)))){ NPH_Gold = (NPH_Gold - (0.5 * (NPH_Towers[NPH_SelectedTower].pCost * (NPH_Towers[NPH_SelectedTower].pLevel + 1)))); NPH_Gold = Math.round(NPH_Gold); text_gold.text = String(NPH_Gold); if (NPH_Muted == false){ if (NPH_Muted == false){ NPH_ButtonClick.play(); }; }; NPH_Towers[NPH_SelectedTower].pLevel = (NPH_Towers[NPH_SelectedTower].pLevel + 1); NPH_Towers[NPH_SelectedTower].pDamage = (NPH_Towers[NPH_SelectedTower].pOrigDamage * ((NPH_Towers[NPH_SelectedTower].pLevel / 1.1) * ((NPH_Towers[NPH_SelectedTower].pLevel / 10) + 1))); upgrade_tower.x = 900; _local2 = (NPH_Towers[NPH_SelectedTower].pOrigDamage * (((NPH_Towers[NPH_SelectedTower].pLevel + 1) / 1.1) * (((NPH_Towers[NPH_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NPH_Towers[NPH_SelectedTower].pCost * (NPH_Towers[NPH_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NPH_Towers[NPH_SelectedTower].pLevel) + "(") + (NPH_Towers[NPH_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NPH_Towers[NPH_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); text_tower_range.text = ("Range - " + NPH_Towers[NPH_SelectedTower].pRange); text_tower_sell.text = ("Sell Value - " + String(int(((NPH_Towers[NPH_SelectedTower].pLevel * NPH_Towers[NPH_SelectedTower].pCost) * 0.7)))); }; }; }; } public function NP_buy_blizzard_mouse_up(_arg1:MouseEvent):void{ var _local2:*; var _local3:blizzard_graphic; if (NP_gamemode != "paused"){ if (NP_Prayer >= 3){ if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_Prayer = (NP_Prayer - 3); text_prayer.text = String(NP_Prayer); _local2 = 0; while (_local2 < 10) { _local3 = new blizzard_graphic(); drawonme.addChild(_local3); NP_Blizzards.push(_local3); _local2++; }; }; }; } public function NP_CheckTowerFireBullet():void{ var xdist:Number; var ydist:Number; var distancefromthis:Number; var closest:Number; var closestmob:Number; var i:int; var a:int; var k:int; var Bullet1:script_bullet_arrow; var Bullet2:script_bullet_ice; var Bullet3:script_bullet_arcane; var Bullet4:script_bullet_cannon; var Bullet5:script_bullet_fire; closest = 5000; closestmob = -1; if (NP_gamemode != "paused"){ try { i = (NP_Towers.length - 1); while (i >= 0) { if (NP_Towers[i].pTowerType <= 5){ closest = 5000; NP_Towers[i].pTarget = -1; k = (NP_Enemies.length - 1); while (k >= 0) { xdist = Math.round(((NP_Towers[i].x + 16) - NP_Enemies[k].x)); ydist = Math.round(((NP_Towers[i].y + 16) - NP_Enemies[k].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NP_Towers[i].pRange){ if (NP_Enemies[k].pType == 4){ if (NP_Towers[i].pTowerType != 2){ if (NP_Towers[i].pTowerType != 3){ if (NP_Towers[i].pTowerType != 5){ NP_Towers[i].pTarget = k; }; }; }; }; if (NP_Enemies[k].pType != 4){ NP_Towers[i].pTarget = k; }; }; k = (k - 1); }; }; i = (i - 1); }; a = (NP_Towers.length - 1); while (a >= 0) { if (NP_Towers[a].pTowerType <= 5){ if (NP_Enemies.length > 0){ if (NP_Towers[a].pTarget != -1){ if (NP_Enemies[NP_Towers[a].pTarget].pHealth > 0){ xdist = Math.round(((NP_Towers[a].x + 16) - NP_Enemies[NP_Towers[a].pTarget].x)); ydist = Math.round(((NP_Towers[a].y + 16) - NP_Enemies[NP_Towers[a].pTarget].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NP_Towers[a].pRange){ if (NP_Enemies[NP_Towers[a].pTarget].y > 0){ if (getTimer() > (NP_Towers[a].pLastFire + NP_Towers[a].pSpeed)){ NP_Towers[a].pLastFire = getTimer(); if (NP_Towers[a].pTowerType == 1){ Bullet1 = new script_bullet_arrow(NP_Towers[a].pTarget); }; if (NP_Towers[a].pTowerType == 2){ Bullet2 = new script_bullet_ice(NP_Towers[a].pTarget); }; if (NP_Towers[a].pTowerType == 3){ Bullet3 = new script_bullet_arcane(NP_Towers[a].pTarget); }; if (NP_Towers[a].pTowerType == 4){ Bullet4 = new script_bullet_cannon(NP_Towers[a].pTarget); }; if (NP_Towers[a].pTowerType == 5){ Bullet5 = new script_bullet_fire(NP_Towers[a].pTarget); }; if (NP_Towers[a].pTowerType == 1){ Bullet1.x = (NP_Towers[a].x + 16); Bullet1.y = (NP_Towers[a].y + 16); Bullet1.pDamage = NP_Towers[a].pDamage; Bullet1.pBullet = Bullet1; if (NP_Bullets.length < 100){ Bullet1.pVisible = true; addChild(Bullet1); }; NP_Bullets.push(Bullet1); Bullet1.pTower = a; }; if (NP_Towers[a].pTowerType == 2){ Bullet2.x = (NP_Towers[a].x + 16); Bullet2.y = (NP_Towers[a].y + 16); Bullet2.pDamage = NP_Towers[a].pDamage; Bullet2.pBullet = Bullet2; if (NP_Bullets.length < 100){ Bullet2.pVisible = true; addChild(Bullet2); }; NP_Bullets.push(Bullet2); Bullet2.pTower = a; }; if (NP_Towers[a].pTowerType == 3){ Bullet3.x = (NP_Towers[a].x + 16); Bullet3.y = (NP_Towers[a].y + 16); Bullet3.pDamage = NP_Towers[a].pDamage; Bullet3.pBullet = Bullet3; if (NP_Bullets.length < 100){ Bullet3.pVisible = true; addChild(Bullet3); }; NP_Bullets.push(Bullet3); Bullet3.pTower = a; }; if (NP_Towers[a].pTowerType == 4){ Bullet4.x = (NP_Towers[a].x + 16); Bullet4.y = (NP_Towers[a].y + 16); Bullet4.pDamage = NP_Towers[a].pDamage; Bullet4.pBullet = Bullet4; if (NP_Bullets.length < 100){ Bullet4.pVisible = true; addChild(Bullet4); }; NP_Bullets.push(Bullet4); Bullet4.pTower = a; }; if (NP_Towers[a].pTowerType == 5){ Bullet5.x = (NP_Towers[a].x + 16); Bullet5.y = (NP_Towers[a].y + 16); Bullet5.pDamage = NP_Towers[a].pDamage; Bullet5.pBullet = Bullet5; if (NP_Bullets.length < 100){ Bullet5.pVisible = true; addChild(Bullet5); }; NP_Bullets.push(Bullet5); Bullet5.pTower = a; }; }; }; }; }; }; }; }; a = (a - 1); }; } catch(e:TypeError) { }; }; } public function NPS_sell_tower_click(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:int; if (NPS_gamemode != "paused"){ if (NPS_SelectedTower != -1){ if (NPS_Towers[NPS_SelectedTower].pTowerType == 10){ NPS_PlacedMine = false; text_next_gold.x = 1000; }; if (NPS_Towers[NPS_SelectedTower].pTowerType == 11){ NPS_PlacedChurch = false; text_next_prayer.x = 1000; }; NPS_Map[Math.round((NPS_Towers[NPS_SelectedTower].y / 32))][Math.round((NPS_Towers[NPS_SelectedTower].x / 32))] = 1; _local4 = (NPS_Enemies.length - 1); while (_local4 >= 0) { if (NPS_Enemies[_local4].y < 45){ _local2 = new Point(Math.round(NPS_Enemies[_local4].pPath[NPS_Enemies[_local4].pPathIndex][1]), Math.round(NPS_Enemies[_local4].pPath[NPS_Enemies[_local4].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPS_Path = Pathfinding.findPath(NPS_Map, _local2.y, _local2.x, NPS_MapEnd.y, NPS_MapEnd.x); NPS_Enemies[_local4].pPath = NPS_Path; NPS_Enemies[_local4].mapchange(); }; _local4--; }; NPS_Gold = (NPS_Gold + int((0.95 * (NPS_Towers[NPS_SelectedTower].pCost * NPS_Towers[NPS_SelectedTower].pLevel)))); NPS_Gold = Math.round(NPS_Gold); text_gold.text = String(NPS_Gold); removeChild(NPS_Towers[NPS_SelectedTower]); NPS_Towers.splice(NPS_SelectedTower, 1); NPS_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; upgrade_tower.x = 900; text_tower_sell.x = 900; }; }; } public function NPI_MoveAndCheckJudgement():void{ var _local1:int; if (NPI_gamemode != "paused"){ _local1 = (NPI_Judgement.length - 1); while (_local1 >= 0) { if (NPI_Judgement[_local1].y < -114){ drawonme.removeChild(NPI_Judgement[_local1]); NPI_Judgement.splice(_local1, 1); }; _local1--; }; }; } public function NPH_musicright_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function play5min(_arg1:MouseEvent):void{ gotoAndStop(65); } public function NPS_upgrade_tower_mouse_enter(_arg1:MouseEvent):void{ var _local2:Number; _local2 = (NPS_Towers[NPS_SelectedTower].pOrigDamage * (((NPS_Towers[NPS_SelectedTower].pLevel + 1) / 1.1) * (((NPS_Towers[NPS_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NPS_Towers[NPS_SelectedTower].pCost * (NPS_Towers[NPS_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NPS_Towers[NPS_SelectedTower].pLevel) + "(") + (NPS_Towers[NPS_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NPS_Towers[NPS_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); } public function NPI_tower_select_arcane_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arcane Tower (125g)"; text_towerinfo.text = "Medium Speed, High Dmg. (Magic Damage)"; } public function NP_select_mine_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Mine"){ if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; NP_gamemode = "off"; TheGrid1.alpha = 0; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Mine"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Mine"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ if (NP_Muted == false){ NP_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Mine"; }; }; }; } public function NPH_CheckSelectedTower():void{ var _local1:int; var _local2:int; if (NPH_gamemode != "paused"){ _local1 = (NPH_Towers.length - 1); while (_local1 >= 0) { if (NPH_Towers[_local1].CheckSelected() == true){ NPH_SelectedTower = _local1; sell_tower.x = 524; text_tower_damage.x = 484; text_tower_level.x = 484; text_tower_range.x = 484; text_tower_sell.x = 484; text_tower_damage.text = ("Damage - " + NPH_Towers[_local1].pDamage.toFixed(2)); text_tower_range.text = ("Range - " + NPH_Towers[_local1].pRange); text_tower_level.text = ("Level - " + NPH_Towers[_local1].pLevel); text_tower_sell.text = ("Sell Value - " + String(int(((NPH_Towers[_local1].pLevel * NPH_Towers[_local1].pCost) * 0.95)))); NPH_gamemode = "none"; TheGrid1.alpha = 0; NPH_selectedtowertype = "none"; }; _local1--; }; _local2 = (NPH_Towers.length - 1); while (_local2 >= 0) { NPH_Towers[_local2].pSelected = false; _local2--; }; }; } public function NPI_musicleft_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Change Track"; text_towerinfo.text = "Changes to a new background track."; } public function NPS_tower_select_arcane_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Arcane Tower (125g)"; text_towerinfo.text = "Medium Speed, High Dmg. (Magic Damage)"; } public function NPI_CheckTowerFireBullet():void{ var xdist:Number; var ydist:Number; var distancefromthis:Number; var closest:Number; var closestmob:Number; var i:int; var a:int; var k:int; var Bullet1:script_bullet_arrow; var Bullet2:script_bullet_ice; var Bullet3:script_bullet_arcane; var Bullet4:script_bullet_cannon; var Bullet5:script_bullet_fire; closest = 5000; closestmob = -1; if (NPI_gamemode != "paused"){ try { i = (NPI_Towers.length - 1); while (i >= 0) { if (NPI_Towers[i].pTowerType <= 5){ closest = 5000; NPI_Towers[i].pTarget = -1; k = (NPI_Enemies.length - 1); while (k >= 0) { xdist = Math.round(((NPI_Towers[i].x + 16) - NPI_Enemies[k].x)); ydist = Math.round(((NPI_Towers[i].y + 16) - NPI_Enemies[k].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NPI_Towers[i].pRange){ if (NPI_Enemies[k].pType == 4){ if (NPI_Towers[i].pTowerType != 2){ if (NPI_Towers[i].pTowerType != 3){ if (NPI_Towers[i].pTowerType != 5){ NPI_Towers[i].pTarget = k; }; }; }; }; if (NPI_Enemies[k].pType != 4){ NPI_Towers[i].pTarget = k; }; }; k = (k - 1); }; }; i = (i - 1); }; a = (NPI_Towers.length - 1); while (a >= 0) { if (NPI_Towers[a].pTowerType <= 5){ if (NPI_Enemies.length > 0){ if (NPI_Towers[a].pTarget != -1){ if (NPI_Enemies[NPI_Towers[a].pTarget].pHealth > 0){ xdist = Math.round(((NPI_Towers[a].x + 16) - NPI_Enemies[NPI_Towers[a].pTarget].x)); ydist = Math.round(((NPI_Towers[a].y + 16) - NPI_Enemies[NPI_Towers[a].pTarget].y)); distancefromthis = Math.round(Math.sqrt(((xdist * xdist) + (ydist * ydist)))); if (distancefromthis < NPI_Towers[a].pRange){ if (NPI_Enemies[NPI_Towers[a].pTarget].y > 0){ if (getTimer() > (NPI_Towers[a].pLastFire + NPI_Towers[a].pSpeed)){ NPI_Towers[a].pLastFire = getTimer(); if (NPI_Towers[a].pTowerType == 1){ Bullet1 = new script_bullet_arrow(NPI_Towers[a].pTarget); }; if (NPI_Towers[a].pTowerType == 2){ Bullet2 = new script_bullet_ice(NPI_Towers[a].pTarget); }; if (NPI_Towers[a].pTowerType == 3){ Bullet3 = new script_bullet_arcane(NPI_Towers[a].pTarget); }; if (NPI_Towers[a].pTowerType == 4){ Bullet4 = new script_bullet_cannon(NPI_Towers[a].pTarget); }; if (NPI_Towers[a].pTowerType == 5){ Bullet5 = new script_bullet_fire(NPI_Towers[a].pTarget); }; if (NPI_Towers[a].pTowerType == 1){ Bullet1.x = (NPI_Towers[a].x + 16); Bullet1.y = (NPI_Towers[a].y + 16); Bullet1.pDamage = NPI_Towers[a].pDamage; Bullet1.pBullet = Bullet1; if (NPI_Bullets.length < 100){ Bullet1.pVisible = true; addChild(Bullet1); }; NPI_Bullets.push(Bullet1); Bullet1.pTower = a; }; if (NPI_Towers[a].pTowerType == 2){ Bullet2.x = (NPI_Towers[a].x + 16); Bullet2.y = (NPI_Towers[a].y + 16); Bullet2.pDamage = NPI_Towers[a].pDamage; Bullet2.pBullet = Bullet2; if (NPI_Bullets.length < 100){ Bullet2.pVisible = true; addChild(Bullet2); }; NPI_Bullets.push(Bullet2); Bullet2.pTower = a; }; if (NPI_Towers[a].pTowerType == 3){ Bullet3.x = (NPI_Towers[a].x + 16); Bullet3.y = (NPI_Towers[a].y + 16); Bullet3.pDamage = NPI_Towers[a].pDamage; Bullet3.pBullet = Bullet3; if (NPI_Bullets.length < 100){ Bullet3.pVisible = true; addChild(Bullet3); }; NPI_Bullets.push(Bullet3); Bullet3.pTower = a; }; if (NPI_Towers[a].pTowerType == 4){ Bullet4.x = (NPI_Towers[a].x + 16); Bullet4.y = (NPI_Towers[a].y + 16); Bullet4.pDamage = NPI_Towers[a].pDamage; Bullet4.pBullet = Bullet4; if (NPI_Bullets.length < 100){ Bullet4.pVisible = true; addChild(Bullet4); }; NPI_Bullets.push(Bullet4); Bullet4.pTower = a; }; if (NPI_Towers[a].pTowerType == 5){ Bullet5.x = (NPI_Towers[a].x + 16); Bullet5.y = (NPI_Towers[a].y + 16); Bullet5.pDamage = NPI_Towers[a].pDamage; Bullet5.pBullet = Bullet5; if (NPI_Bullets.length < 100){ Bullet5.pVisible = true; addChild(Bullet5); }; NPI_Bullets.push(Bullet5); Bullet5.pTower = a; }; }; }; }; }; }; }; }; a = (a - 1); }; } catch(e:TypeError) { }; }; } public function NPI_select_mine_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Mine"){ if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; NPI_gamemode = "off"; TheGrid1.alpha = 0; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Mine"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Mine"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Mine"; }; }; }; } public function playinsane(_arg1:MouseEvent):void{ gotoAndStop(55); } public function NPI_tower_select_arrow_mouse_up(_arg1:MouseEvent):void{ if (NPI_gamemode != "paused"){ if (NPI_gamemode == "set_tower"){ if (NPI_selectedtowertype == "Arrow"){ if (NPI_Muted == false){ NPI_ButtonClick.play(); }; NPI_gamemode = "off"; TheGrid1.alpha = 0; NPI_selectedtowertype = "none"; } else { if (NPI_selectedtowertype != "Arrow"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Arrow"; }; }; } else { if (NPI_gamemode != "set_tower"){ NPI_gamemode = "set_tower"; if (NPI_Muted == false){ NPI_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPI_selectedtowertype = "Arrow"; }; }; }; } public function NPI_tower_select_cannon_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Cannon Tower (75g)"; text_towerinfo.text = "Medium Dmg, Splash Dmg. (Normal Damage)"; } public function NPS_tower_select_cannon_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Cannon Tower (75g)"; text_towerinfo.text = "Medium Dmg, Splash Dmg. (Normal Damage)"; } public function NP_MoveBullets():void{ var i:int; var a:int; if (NP_gamemode != "paused"){ try { i = (NP_Bullets.length - 1); while (i >= 0) { NP_Bullets[i].movebullet(NP_Enemies[NP_Bullets[i].pTarget].x, NP_Enemies[NP_Bullets[i].pTarget].y); i = (i - 1); }; } catch(e:TypeError) { a = (NP_Bullets.length - 1); while (a >= 0) { NP_Bullets[a].x = -900; NP_Bullets[a].y = -900; NP_Bullets[a].pTarget = -1; if (NP_Bullets[a].pVisible == true){ removeChild(NP_Bullets[a].pBullet); }; NP_Bullets.splice(a, 1); a = (a - 1); }; }; }; } public function NP_tower_select_cannon_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Cannon"){ NP_gamemode = "off"; TheGrid1.alpha = 0; if (NP_Muted == false){ NP_ButtonClick.play(); }; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Cannon"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Cannon"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NP_Muted == false){ NP_ButtonClick.play(); }; NP_selectedtowertype = "Cannon"; }; }; }; } public function NP_tower_select_ice_mouse_up(_arg1:MouseEvent):void{ if (NP_gamemode != "paused"){ if (NP_gamemode == "set_tower"){ if (NP_selectedtowertype == "Ice"){ NP_gamemode = "off"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0; NP_selectedtowertype = "none"; } else { if (NP_selectedtowertype != "Ice"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Ice"; }; }; } else { if (NP_gamemode != "set_tower"){ NP_gamemode = "set_tower"; if (NP_Muted == false){ NP_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NP_selectedtowertype = "Ice"; }; }; }; } public function NPH_tower_select_ice_mouse_up(_arg1:MouseEvent):void{ if (NPH_gamemode != "paused"){ if (NPH_gamemode == "set_tower"){ if (NPH_selectedtowertype == "Ice"){ NPH_gamemode = "off"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0; NPH_selectedtowertype = "none"; } else { if (NPH_selectedtowertype != "Ice"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Ice"; }; }; } else { if (NPH_gamemode != "set_tower"){ NPH_gamemode = "set_tower"; if (NPH_Muted == false){ NPH_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPH_selectedtowertype = "Ice"; }; }; }; } public function NPI_upgrade_tower_mouse_enter(_arg1:MouseEvent):void{ var _local2:Number; _local2 = (NPI_Towers[NPI_SelectedTower].pOrigDamage * (((NPI_Towers[NPI_SelectedTower].pLevel + 1) / 1.1) * (((NPI_Towers[NPI_SelectedTower].pLevel + 1) / 10) + 1))); text_towertype.text = (("Upgrade(" + (0.5 * (NPI_Towers[NPI_SelectedTower].pCost * (NPI_Towers[NPI_SelectedTower].pLevel + 1)))) + "g)"); text_towerinfo.text = "Increases Tower Damage"; text_tower_level.text = (((("Level - " + NPI_Towers[NPI_SelectedTower].pLevel) + "(") + (NPI_Towers[NPI_SelectedTower].pLevel + 1)) + ")"); text_tower_damage.text = (((("Damage - " + NPI_Towers[NPI_SelectedTower].pDamage.toFixed(2)) + "(") + _local2.toFixed(2)) + ")"); } public function NPH_sell_tower_click(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:int; if (NPH_gamemode != "paused"){ if (NPH_SelectedTower != -1){ if (NPH_Towers[NPH_SelectedTower].pTowerType == 10){ NPH_PlacedMine = false; text_next_gold.x = 1000; }; if (NPH_Towers[NPH_SelectedTower].pTowerType == 11){ NPH_PlacedChurch = false; text_next_prayer.x = 1000; }; NPH_Map[Math.round((NPH_Towers[NPH_SelectedTower].y / 32))][Math.round((NPH_Towers[NPH_SelectedTower].x / 32))] = 1; _local4 = (NPH_Enemies.length - 1); while (_local4 >= 0) { if (NPH_Enemies[_local4].y < 45){ _local2 = new Point(Math.round(NPH_Enemies[_local4].pPath[NPH_Enemies[_local4].pPathIndex][1]), Math.round(NPH_Enemies[_local4].pPath[NPH_Enemies[_local4].pPathIndex][0])); if (_local2.y < 0){ _local2.y = 0; }; NPH_Path = Pathfinding.findPath(NPH_Map, _local2.y, _local2.x, NPH_MapEnd.y, NPH_MapEnd.x); NPH_Enemies[_local4].pPath = NPH_Path; NPH_Enemies[_local4].mapchange(); }; _local4--; }; NPH_Gold = (NPH_Gold + int((0.95 * (NPH_Towers[NPH_SelectedTower].pCost * NPH_Towers[NPH_SelectedTower].pLevel)))); NPH_Gold = Math.round(NPH_Gold); text_gold.text = String(NPH_Gold); removeChild(NPH_Towers[NPH_SelectedTower]); NPH_Towers.splice(NPH_SelectedTower, 1); NPH_SelectedTower = -1; sell_tower.x = 900; text_tower_damage.x = 900; text_tower_level.x = 900; text_tower_range.x = 900; upgrade_tower.x = 900; text_tower_sell.x = 900; }; }; } public function NPS_buy_church_mouse_enter(_arg1:MouseEvent):void{ text_towertype.text = "Church (1000g)"; text_towerinfo.text = "Adds Prayer Points. Limit 1."; } public function NPS_tower_select_ice_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Ice"){ NPS_gamemode = "off"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Ice"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Ice"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Ice"; }; }; }; } public function playthegame9(_arg1:MouseEvent):void{ gotoAndStop(95); } public function NPH_musicmute_mouse_up(_arg1:MouseEvent):void{ if (NPH_Muted == false){ NPH_channel.stop(); NPH_Muted = true; } else { if (NPH_CurrentSong == 1){ NPH_channel = NPH_Ambient1.play(0, 99999); }; if (NPH_CurrentSong == 2){ NPH_channel = NPH_Ambient2.play(0, 99999); }; if (NPH_CurrentSong == 3){ NPH_channel = NPH_Ambient3.play(0, 99999); }; if (NPH_CurrentSong == 4){ NPH_channel = NPH_Ambient4.play(0, 99999); }; if (NPH_CurrentSong == 5){ NPH_channel = NPH_Ambient5.play(0, 99999); }; NPH_Muted = false; }; } public function NPI_tower_select_deselect(_arg1:MouseEvent):void{ var event = _arg1; try { text_towertype.text = ""; text_towerinfo.text = ""; text_tower_level.text = ("Level - " + NPI_Towers[NPI_SelectedTower].pLevel); text_tower_damage.text = ("Damage - " + NPI_Towers[NPI_SelectedTower].pDamage.toFixed(2)); } catch(e:TypeError) { }; } public function NPS_tower_select_fire_mouse_up(_arg1:MouseEvent):void{ if (NPS_gamemode != "paused"){ if (NPS_gamemode == "set_tower"){ if (NPS_selectedtowertype == "Fire"){ NPS_gamemode = "off"; TheGrid1.alpha = 0; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; NPS_selectedtowertype = "none"; } else { if (NPS_selectedtowertype != "Fire"){ NPS_gamemode = "set_tower"; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; TheGrid1.alpha = 0.5; NPS_selectedtowertype = "Fire"; }; }; } else { if (NPS_gamemode != "set_tower"){ NPS_gamemode = "set_tower"; TheGrid1.alpha = 0.5; if (NPS_Muted == false){ NPS_ButtonClick.play(); }; NPS_selectedtowertype = "Fire"; }; }; }; } } }//package Flash_RPG_TD_fla
Section 2
//ambient_1 (ambient_1) package { import flash.media.*; public dynamic class ambient_1 extends Sound { } }//package
Section 3
//ambient_2 (ambient_2) package { import flash.media.*; public dynamic class ambient_2 extends Sound { } }//package
Section 4
//ambient_3 (ambient_3) package { import flash.media.*; public dynamic class ambient_3 extends Sound { } }//package
Section 5
//ambient_4 (ambient_4) package { import flash.media.*; public dynamic class ambient_4 extends Sound { } }//package
Section 6
//ambient_5 (ambient_5) package { import flash.media.*; public dynamic class ambient_5 extends Sound { } }//package
Section 7
//angel_of_death (angel_of_death) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class angel_of_death extends MovieClip { public var pLastAnim:int;// = 0 public var pAnimDelay:int;// = 100 public var pCurrentAnim:int;// = 0 public var pPaused:Boolean;// = false public var pAnimCount:int;// = 4 public function angel_of_death():void{ pLastAnim = 0; pAnimDelay = 100; pAnimCount = 4; pCurrentAnim = 0; pPaused = false; super(); x = (Math.random() * 500); y = ((Math.random() * 500) + 500); if (x > 480){ x = (x - 200); }; addEventListener(Event.ENTER_FRAME, everytime); } public function moveenemy(){ y = (y - 2); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; if (pPaused == false){ moveenemy(); }; } } }//package
Section 8
//blizzard_graphic (blizzard_graphic) package { import flash.display.*; import flash.events.*; public class blizzard_graphic extends Sprite { public var pPaused:Boolean;// = false public function blizzard_graphic():void{ pPaused = false; super(); x = (Math.random() * 500); y = ((Math.random() * 100) + 500); if (x > 480){ x = (x - 200); }; addEventListener(Event.ENTER_FRAME, everytime); } public function moveenemy(){ y = (y - 1); rotation = (rotation + 1); } public function everytime(_arg1:Event):void{ if (pPaused == false){ moveenemy(); }; } } }//package
Section 9
//building_church (building_church) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class building_church extends MovieClip { public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 0 public var pTarget:Number;// = -1 public var pBuilding:building_church; public var pLastAnim:int;// = 0 public var pCost:Number;// = 500 public var pAddPrayer:Number;// = 1 public var pTowerType:Number;// = 11 public var pAnimDelay:int;// = 50 public var pLastFire:Number;// = 0 public var pCurrentAnim:int;// = 0 public var pLastPlay:int;// = 0 public var pRange:Number;// = 0 public var pSpeed:Number;// = 200 public var pAnimCount:int;// = 15 public var pDamage:Number;// = 0 public function building_church():void{ pAddPrayer = 1; pTowerType = 11; pDamage = 0; pCost = 500; pLevel = 1; pSpeed = 200; pRange = 0; pTarget = -1; pLastFire = 0; pSelected = false; pLastAnim = 0; pAnimDelay = 50; pAnimCount = 15; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 0; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 10
//building_mine (building_mine) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class building_mine extends MovieClip { public var pAddGold:Number;// = 1 public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 0 public var pTarget:Number;// = -1 public var pBuilding:building_mine; public var pLastAnim:int;// = 0 public var pCost:Number;// = 100 public var pTowerType:Number;// = 10 public var pAnimDelay:int;// = 75 public var pLastFire:Number;// = 0 public var pCurrentAnim:int;// = 0 public var pLastPlay:int;// = 0 public var pRange:Number;// = 0 public var pSpeed:Number;// = 200 public var pAnimCount:int;// = 25 public var pDamage:Number;// = 0 public function building_mine():void{ pAddGold = 1; pTowerType = 10; pDamage = 0; pCost = 100; pLevel = 1; pSpeed = 200; pRange = 0; pTarget = -1; pLastFire = 0; pSelected = false; pLastAnim = 0; pAnimDelay = 75; pAnimCount = 25; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 0; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 11
//buttonclick (buttonclick) package { import flash.media.*; public dynamic class buttonclick extends Sound { } }//package
Section 12
//enemy_health_bar (enemy_health_bar) package { import flash.display.*; public class enemy_health_bar extends Sprite { public var pWidth:Number;// = 32 public var pEnemy:Number;// = -1 public function enemy_health_bar():void{ pWidth = 32; pEnemy = -1; super(); } } }//package
Section 13
//judgement (judgement) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class judgement extends MovieClip { public var pLastAnim:int;// = 0 public var pAnimDelay:int;// = 100 public var pCurrentAnim:int;// = 0 public var pAnimCount:int;// = 13 public function judgement():void{ pLastAnim = 0; pAnimDelay = 100; pAnimCount = 13; pCurrentAnim = 0; super(); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ y = -900; pCurrentAnim = -1; }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; } } }//package
Section 14
//MochiAd (MochiAd) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiAd { public static function getVersion():String{ return ("2.1"); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var f:Function; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip._mochiad_loaded){ return (null); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); g = function (_arg1:Object):void{ MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; return (_local3); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; _arg1.removeChild(_arg1._mochiad); delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ _local3 = true; }; }; }; if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _loadCommunicator(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var clipname:String; var server:String; var depth:Number; var mc:MovieClip; var lv:URLVariables; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; clipname = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; server = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); lv = new URLVariables(); for (k in options) { lv[k] = options[k]; }; lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:Object; _arg1 = parseInt(_arg1.toString()); _local3 = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; _local4 = []; _local5 = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; _local6 = _local3[1]; _local7 = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local2:Array; var _local3:Function; var _local4:Number; var _local5:Array; mc._endpoint = _arg1; _local2 = mc._queue; delete mc._queue; _local3 = mc.doSend; _local4 = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local5:Number; var _local6:LocalConnection; var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); _local5 = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; _local6 = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); bar.x = 10; bar.y = (h - 20); bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (!this.parent.parent){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ _local4 = true; }; }; }; if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { mc.removeEventListener(Event.ENTER_FRAME, f); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 15
//MochiBot (MochiBot) package { import flash.display.*; import flash.system.*; import flash.net.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 16
//Pathfinding (Pathfinding) package { public class Pathfinding { var D_COST;// = 14 var ALLOW_DIAGONAL;// = true var mapStatus:Array; var openList:Array; var ALLOW_DIAGONAL_CORNERING;// = false var HV_COST;// = 10 public function Pathfinding(){ HV_COST = 10; D_COST = 14; ALLOW_DIAGONAL = true; ALLOW_DIAGONAL_CORNERING = false; super(); } function openSquare(_arg1:Number, _arg2:Number, _arg3, _arg4, _arg5, _arg6){ if (!_arg6){ openList.push([_arg1, _arg2]); mapStatus[_arg1][_arg2] = {heuristic:_arg5, open:true, closed:false}; }; mapStatus[_arg1][_arg2].parent = _arg3; mapStatus[_arg1][_arg2].movementCost = _arg4; } function nearerSquare(){ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = 999999; _local2 = 0; _local3 = undefined; _local4 = undefined; _local5 = openList.length; while (_local5-- > 0) { _local4 = mapStatus[openList[_local5][0]][openList[_local5][1]]; _local3 = (_local4.heuristic + _local4.movementCost); if (_local3 <= _local1){ _local1 = _local3; _local2 = _local5; }; }; return (_local2); } function isOpen(_arg1:Number, _arg2:Number){ return (mapStatus[_arg1][_arg2].open); } function closeSquare(_arg1:Number, _arg2:Number){ var _local3:*; var _local4:*; _local3 = openList.length; _local4 = 0; while (_local4 < _local3) { if (openList[_local4][0] == _arg1){ if (openList[_local4][1] == _arg2){ openList.splice(_local4, 1); break; }; }; _local4++; }; mapStatus[_arg1][_arg2].open = false; mapStatus[_arg1][_arg2].closed = true; } function findPathInternal(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Array{ var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local15:Array; var _local16:*; var _local17:*; var _local18:*; var _local19:*; _local6 = _arg1.length; _local7 = _arg1[0].length; mapStatus = new Array(); _local8 = 0; while (_local8 < _local6) { mapStatus[_local8] = new Array(); _local10 = 0; while (_local10 < _local7) { mapStatus[_local8][_local10] = new Array(); _local10++; }; _local8++; }; openList = new Array(); openSquare(_arg2, _arg3, undefined, 0, undefined, undefined); while ((((openList.length > 0)) && (!(isClosed(_arg4, _arg5))))) { _local8 = nearerSquare(); _local16 = openList[_local8][0]; _local17 = openList[_local8][1]; closeSquare(_local16, _local17); _local11 = (_local16 - 1); while (_local11 < (_local16 + 2)) { _local12 = (_local17 - 1); while (_local12 < (_local17 + 2)) { if ((((((((((((((_local11 >= 0)) && ((_local11 < _local6)))) && ((_local12 >= 0)))) && ((_local12 < _local7)))) && (!((((_local11 == _local16)) && ((_local12 == _local17))))))) && (((((ALLOW_DIAGONAL) || ((_local11 == _local16)))) || ((_local12 == _local17)))))) && (((((((ALLOW_DIAGONAL_CORNERING) || ((_local11 == _local16)))) || ((_local12 == _local17)))) || (((!((_arg1[_local11][_local17] == 0))) && (_arg1[_local16][_local12]))))))){ if (_arg1[_local11][_local12] != 0){ if (!isClosed(_local11, _local12)){ _local13 = (mapStatus[_local16][_local17].movementCost + (((((_local11 == _local16)) || ((_local12 == _local17)))) ? HV_COST : D_COST * _arg1[_local11][_local12])); if (isOpen(_local11, _local12)){ if (_local13 < mapStatus[_local11][_local12].movementCost){ openSquare(_local11, _local12, [_local16, _local17], _local13, undefined, true); }; } else { _local14 = ((Math.abs((_local11 - _arg4)) + Math.abs((_local12 - _arg5))) * 10); openSquare(_local11, _local12, [_local16, _local17], _local13, _local14, false); }; }; }; }; _local12++; }; _local11++; }; }; _local9 = isClosed(_arg4, _arg5); if (_local9){ _local15 = new Array(); _local16 = _arg4; _local17 = _arg5; while (((!((_local16 == _arg2))) || (!((_local17 == _arg3))))) { _local15.push([_local16, _local17]); _local18 = mapStatus[_local16][_local17].parent[0]; _local19 = mapStatus[_local16][_local17].parent[1]; _local16 = _local18; _local17 = _local19; }; _local15.push([_arg2, _arg3]); _local15.reverse(); return (_local15); //unresolved jump }; return (null); } function isClosed(_arg1:Number, _arg2:Number){ return (mapStatus[_arg1][_arg2].closed); } public static function findPath(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Array{ var _local6:Pathfinding; var _local7:Array; _local6 = new (Pathfinding); _local7 = _local6.findPathInternal(_arg1, _arg2, _arg3, _arg4, _arg5); return (_local7); } } }//package
Section 17
//script_bullet_arcane (script_bullet_arcane) package { import flash.display.*; public class script_bullet_arcane extends Sprite { public var pBulletType:Number;// = 3 public var pTarget:Number;// = -1 public var pTargetX:Number;// = -1 public var pTargetY:Number;// = -1 public var pTower:Number;// = -1 public var pBullet:script_bullet_arcane; public var pSpeed:Number;// = 7 public var pVisible:Boolean;// = false public var pDamage:Number;// = 1 public function script_bullet_arcane(_arg1:Number):void{ pBulletType = 3; pDamage = 1; pSpeed = 7; pTargetX = -1; pTargetY = -1; pTarget = -1; pTower = -1; pVisible = false; super(); pTarget = _arg1; } public function movebullet(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; pTargetX = _arg1; pTargetY = _arg2; rotation = GetAngle(pTargetX, pTargetY); _local6 = ((2 * Math.PI) * (rotation / 360)); _local7 = (pSpeed * Math.cos(_local6)); _local8 = (pSpeed * Math.sin(_local6)); x = (x + _local7); y = (y + _local8); } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } } }//package
Section 18
//script_bullet_arrow (script_bullet_arrow) package { import flash.display.*; public class script_bullet_arrow extends Sprite { public var pBulletType:Number;// = 1 public var pTarget:Number;// = -1 public var pTargetX:Number;// = -1 public var pTargetY:Number;// = -1 public var pTower:Number;// = -1 public var pBullet:script_bullet_arrow; public var pSpeed:Number;// = 10 public var pVisible:Boolean;// = false public var pDamage:Number;// = 1 public function script_bullet_arrow(_arg1:Number):void{ pBulletType = 1; pDamage = 1; pSpeed = 10; pTargetX = -1; pTargetY = -1; pTarget = -1; pTower = -1; pVisible = false; super(); pTarget = _arg1; } public function movebullet(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; pTargetX = _arg1; pTargetY = _arg2; rotation = GetAngle(pTargetX, pTargetY); _local6 = ((2 * Math.PI) * (rotation / 360)); _local7 = (pSpeed * Math.cos(_local6)); _local8 = (pSpeed * Math.sin(_local6)); x = (x + _local7); y = (y + _local8); } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } } }//package
Section 19
//script_bullet_cannon (script_bullet_cannon) package { import flash.display.*; public class script_bullet_cannon extends Sprite { public var pBulletType:Number;// = 4 public var pTarget:Number;// = -1 public var pTargetX:Number;// = -1 public var pTargetY:Number;// = -1 public var pTower:Number;// = -1 public var pBullet:script_bullet_cannon; public var pSpeed:Number;// = 4 public var pVisible:Boolean;// = false public var pDamage:Number;// = 1 public function script_bullet_cannon(_arg1:Number):void{ pBulletType = 4; pDamage = 1; pSpeed = 4; pTargetX = -1; pTargetY = -1; pTarget = -1; pVisible = false; pTower = -1; super(); pTarget = _arg1; } public function movebullet(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; pTargetX = _arg1; pTargetY = _arg2; rotation = GetAngle(pTargetX, pTargetY); _local6 = ((2 * Math.PI) * (rotation / 360)); _local7 = (pSpeed * Math.cos(_local6)); _local8 = (pSpeed * Math.sin(_local6)); x = (x + _local7); y = (y + _local8); } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } } }//package
Section 20
//script_bullet_fire (script_bullet_fire) package { import flash.display.*; public class script_bullet_fire extends Sprite { public var pBulletType:Number;// = 5 public var pTarget:Number;// = -1 public var pTargetX:Number;// = -1 public var pTargetY:Number;// = -1 public var pTower:Number;// = -1 public var pBullet:script_bullet_fire; public var pSpeed:Number;// = 8 public var pVisible:Boolean;// = false public var pDamage:Number;// = 1 public function script_bullet_fire(_arg1:Number):void{ pBulletType = 5; pDamage = 1; pSpeed = 8; pTargetX = -1; pTargetY = -1; pTarget = -1; pTower = -1; pVisible = false; super(); pTarget = _arg1; } public function movebullet(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; pTargetX = _arg1; pTargetY = _arg2; rotation = GetAngle(pTargetX, pTargetY); _local6 = ((2 * Math.PI) * (rotation / 360)); _local7 = (pSpeed * Math.cos(_local6)); _local8 = (pSpeed * Math.sin(_local6)); x = (x + _local7); y = (y + _local8); } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } } }//package
Section 21
//script_bullet_ice (script_bullet_ice) package { import flash.display.*; public class script_bullet_ice extends Sprite { public var pBulletType:Number;// = 2 public var pTarget:Number;// = -1 public var pTargetX:Number;// = -1 public var pTargetY:Number;// = -1 public var pTower:Number;// = -1 public var pBullet:script_bullet_ice; public var pSpeed:Number;// = 10 public var pVisible:Boolean;// = false public var pDamage:Number;// = 1 public function script_bullet_ice(_arg1:Number):void{ pBulletType = 2; pDamage = 1; pSpeed = 10; pTargetX = -1; pTargetY = -1; pTarget = -1; pTower = -1; pVisible = false; super(); pTarget = _arg1; } public function movebullet(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; pTargetX = _arg1; pTargetY = _arg2; rotation = GetAngle(pTargetX, pTargetY); _local6 = ((2 * Math.PI) * (rotation / 360)); _local7 = (pSpeed * Math.cos(_local6)); _local8 = (pSpeed * Math.sin(_local6)); x = (x + _local7); y = (y + _local8); } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } } }//package
Section 22
//script_enemy_armororc (script_enemy_armororc) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_armororc extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_armororc; public function script_enemy_armororc(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.22)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.31)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.48)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 23
//script_enemy_armortroll (script_enemy_armortroll) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_armortroll extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_armortroll; public function script_enemy_armortroll(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.22)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.31)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.48)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 24
//script_enemy_boss1 (script_enemy_boss1) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_boss1 extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_boss1; public function script_enemy_boss1(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((11 * Math.pow(pLevel, 1.8)) + 80); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((12 * Math.pow(pLevel, 2)) + 100); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((13 * Math.pow(pLevel, 2.2)) + 120); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.1); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 25
//script_enemy_clothundead (script_enemy_clothundead) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_clothundead extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_clothundead; public function script_enemy_clothundead(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 26
//script_enemy_demon (script_enemy_demon) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_demon extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 4 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_demon; public function script_enemy_demon(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 4; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ if (_arg2 != 2){ if (_arg2 != 3){ if (_arg2 != 5){ pHealth = (pHealth - _arg1); }; }; }; } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 27
//script_enemy_fasttroll (script_enemy_fasttroll) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_fasttroll extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1.5 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1.5 public var pEnemy:script_enemy_fasttroll; public function script_enemy_fasttroll(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1.5; pSpeed = 1.5; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 28
//script_enemy_goblin (script_enemy_goblin) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_goblin extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_goblin; public function script_enemy_goblin(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 29
//script_enemy_lion (script_enemy_lion) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_lion extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_lion; public function script_enemy_lion(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 30
//script_enemy_orc (script_enemy_orc) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_orc extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_orc; public function script_enemy_orc(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 31
//script_enemy_tauren (script_enemy_tauren) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_tauren extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1 public var pEnemy:script_enemy_tauren; public function script_enemy_tauren(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1; pSpeed = 1; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.2)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.28)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.44)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 32
//script_enemy_undead (script_enemy_undead) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; public class script_enemy_undead extends MovieClip { public var pHealth:Number;// = 1 public var pPathIndex:int;// = 0 public var pLevel:Number;// = 0 public var pAnimFrame:int;// = 1 public var pLastAnim:Number;// = 0 public var pAnimDelay:int;// = 100 public var pTheDirection:Number;// = 1 public var pArmor:Number;// = 10 public var pPath:Array; public var pSpeed:Number;// = 1.5 public var pPaused:Boolean;// = false public var pType:Number;// = 1 public var pStartHealth:Number;// = 1 public var pNumber:int; public var pOrigSpeed:Number;// = 1.5 public var pEnemy:script_enemy_undead; public function script_enemy_undead(_arg1:Number, _arg2:Number, _arg3:String):void{ var _local4:String; pTheDirection = 1; pType = 1; pArmor = 10; pStartHealth = 1; pHealth = 1; pOrigSpeed = 1.5; pSpeed = 1.5; pLevel = 0; pPaused = false; pPathIndex = 0; pLastAnim = 0; pAnimDelay = 100; pAnimFrame = 1; super(); _local4 = _arg3; pLevel = _arg2; pNumber = _arg1; gotoAndStop(1); if (_local4 == "normal"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10 * Math.pow(pLevel, 1.18)) + 15); pHealth = pStartHealth; }; if (_local4 == "hard"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.15 * Math.pow(pLevel, 1.25)) + 20); pHealth = pStartHealth; }; if (_local4 == "insane"){ pArmor = (10 + (pLevel * 1.5)); pStartHealth = ((10.5 * Math.pow(pLevel, 1.4)) + 25); pHealth = pStartHealth; }; pPaused = false; x = (64 + 15); y = ((_arg1 * 40) * -1); addEventListener(Event.ENTER_FRAME, everytime); } public function mapchange():void{ pPathIndex = 0; } function GetAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg1 - x); _local4 = (_arg2 - y); _local5 = Math.atan2(_local4, _local3); _local6 = (360 * (_local5 / (2 * Math.PI))); return (_local6); } public function moveenemy(){ var _local1:*; var _local2:int; if (pPath == null){ if (pTheDirection == 1){ y = (y + pSpeed); pAnimFrame = 1; gotoAndStop(1); }; if (pTheDirection == 2){ x = (x + pSpeed); pAnimFrame = 9; gotoAndStop(9); }; if (pTheDirection == 3){ x = (x - pSpeed); pAnimFrame = 5; gotoAndStop(5); }; if (pTheDirection == 4){ y = (y - pSpeed); pAnimFrame = 13; gotoAndStop(13); }; } else { if (pPathIndex <= (pPath.length - 1)){ _local1 = pPath[pPathIndex][1]; _local2 = pPath[pPathIndex][0]; moveenemy1(((_local2 * 32) + 16), ((_local1 * 32) + 16)); } else { moveenemy1(((16 * 32) + 50), ((14 * 32) + 16)); }; }; } public function everytime(_arg1:Event):void{ var _local2:Point; if (pPaused == false){ moveenemy(); if (pSpeed < pOrigSpeed){ pSpeed = (pSpeed + 0.01); }; if (getTimer() > (pAnimDelay + pLastAnim)){ switch (pAnimFrame){ case 1: pAnimFrame = 2; gotoAndStop(2); pLastAnim = getTimer(); break; case 2: pAnimFrame = 3; gotoAndStop(3); pLastAnim = getTimer(); break; case 3: pAnimFrame = 4; gotoAndStop(4); pLastAnim = getTimer(); break; case 4: pAnimFrame = 1; gotoAndStop(1); pLastAnim = getTimer(); break; case 5: pAnimFrame = 6; gotoAndStop(6); pLastAnim = getTimer(); break; case 6: pAnimFrame = 7; gotoAndStop(7); pLastAnim = getTimer(); break; case 7: pAnimFrame = 8; gotoAndStop(8); pLastAnim = getTimer(); break; case 8: pAnimFrame = 5; gotoAndStop(5); pLastAnim = getTimer(); break; case 9: pAnimFrame = 10; gotoAndStop(10); pLastAnim = getTimer(); break; case 10: pAnimFrame = 11; gotoAndStop(11); pLastAnim = getTimer(); break; case 11: pAnimFrame = 12; gotoAndStop(12); pLastAnim = getTimer(); break; case 12: pAnimFrame = 9; gotoAndStop(9); pLastAnim = getTimer(); break; case 13: pAnimFrame = 14; gotoAndStop(14); pLastAnim = getTimer(); break; case 14: pAnimFrame = 15; gotoAndStop(15); pLastAnim = getTimer(); break; case 15: pAnimFrame = 16; gotoAndStop(16); pLastAnim = getTimer(); break; case 16: pAnimFrame = 13; gotoAndStop(13); pLastAnim = getTimer(); break; }; }; }; } public function GotHit(_arg1:Number, _arg2:int):void{ pHealth = (pHealth - _arg1); } public function moveenemy1(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local6 = _arg2; _local7 = _arg1; rotation = GetAngle(_local6, _local7); _local11 = ((2 * Math.PI) * (rotation / 360)); _local12 = (pSpeed * Math.cos(_local11)); _local13 = (pSpeed * Math.sin(_local11)); x = (x + _local12); y = (y + _local13); if (pPathIndex <= (pPath.length - 1)){ _local8 = Math.round((x - ((pPath[pPathIndex][1] * 32) + 16))); _local9 = Math.round((y - ((pPath[pPathIndex][0] * 32) + 16))); _local10 = Math.round(Math.sqrt(((_local8 * _local8) + (_local9 * _local9)))); if (_local10 < 5){ pPathIndex++; }; }; if ((((rotation >= -80)) && ((rotation < 60)))){ if (pTheDirection != 2){ pAnimFrame = 9; pTheDirection = 2; pLastAnim = getTimer(); gotoAndStop(9); }; } else { if ((((rotation >= 170)) && ((rotation < 240)))){ if (pTheDirection != 3){ pAnimFrame = 5; gotoAndStop(5); pTheDirection = 3; pLastAnim = getTimer(); }; } else { if ((((rotation >= 60)) && ((rotation < 175)))){ if (pTheDirection != 1){ pAnimFrame = 1; gotoAndStop(1); pTheDirection = 1; pLastAnim = getTimer(); }; } else { if ((((rotation >= -100)) && ((rotation < -80)))){ if (pTheDirection != 4){ pAnimFrame = 13; gotoAndStop(13); pTheDirection = 4; pLastAnim = getTimer(); }; }; }; }; }; rotation = 0; } } }//package
Section 33
//tower_arcane (tower_arcane) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class tower_arcane extends MovieClip { public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 0 public var pTarget:Number;// = -1 public var pLastAnim:int;// = 0 public var pCost:Number;// = 125 public var pTowerType:Number;// = 3 public var pAnimDelay:int;// = 25 public var pLastFire:Number;// = 0 public var pTower:tower_arcane; public var pCurrentAnim:int;// = 0 public var pOrigDamage:Number;// = 10 public var pRange:Number;// = 175 public var pLastPlay:int;// = 0 public var pSpeed:Number;// = 600 public var pAnimCount:int;// = 6 public var pDamage:Number;// = 10 public function tower_arcane():void{ pTowerType = 3; pDamage = 10; pOrigDamage = 10; pRange = 175; pCost = 125; pLevel = 1; pSpeed = 600; pLastFire = 0; pTarget = -1; pSelected = false; pLastAnim = 0; pAnimDelay = 25; pAnimCount = 6; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 0; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 34
//tower_arrow (tower_arrow) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class tower_arrow extends MovieClip { public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 3000 public var pTarget:Number;// = -1 public var pLastAnim:int;// = 0 public var pCost:Number;// = 30 public var pTowerType:Number;// = 1 public var pAnimDelay:int;// = 35 public var pLastFire:Number;// = 0 public var pTower:tower_arrow; public var pCurrentAnim:int;// = 0 public var pOrigDamage:Number;// = 2 public var pRange:Number;// = 175 public var pLastPlay:int;// = 0 public var pSpeed:Number;// = 300 public var pAnimCount:int;// = 18 public var pDamage:Number;// = 2 public function tower_arrow():void{ pTowerType = 1; pDamage = 2; pOrigDamage = 2; pRange = 175; pCost = 30; pLevel = 1; pSpeed = 300; pLastFire = 0; pTarget = -1; pSelected = false; pLastAnim = 0; pAnimDelay = 35; pAnimCount = 18; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 3000; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 35
//tower_cannon (tower_cannon) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class tower_cannon extends MovieClip { public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 10000 public var pTarget:Number;// = -1 public var pLastAnim:int;// = 0 public var pCost:Number;// = 75 public var pTowerType:Number;// = 4 public var pAnimDelay:int;// = 50 public var pLastFire:Number;// = 0 public var pTower:tower_cannon; public var pCurrentAnim:int;// = 0 public var pOrigDamage:Number;// = 15 public var pRange:Number;// = 125 public var pLastPlay:int;// = 0 public var pSpeed:Number;// = 1500 public var pAnimCount:int;// = 23 public var pDamage:Number;// = 15 public function tower_cannon():void{ pTowerType = 4; pDamage = 15; pOrigDamage = 15; pRange = 125; pCost = 75; pLevel = 1; pSpeed = 1500; pLastFire = 0; pTarget = -1; pSelected = false; pLastAnim = 0; pAnimDelay = 50; pAnimCount = 23; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 10000; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 36
//tower_fire (tower_fire) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class tower_fire extends MovieClip { public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 10 public var pTarget:Number;// = -1 public var pLastAnim:int;// = 0 public var pCost:Number;// = 100 public var pTowerType:Number;// = 5 public var pAnimDelay:int;// = 50 public var pLastFire:Number;// = 0 public var pTower:tower_fire; public var pCurrentAnim:int;// = 0 public var pOrigDamage:Number;// = 5 public var pRange:Number;// = 175 public var pLastPlay:int;// = 0 public var pSpeed:Number;// = 200 public var pAnimCount:int;// = 5 public var pDamage:Number;// = 5 public function tower_fire():void{ pTowerType = 5; pDamage = 5; pOrigDamage = 5; pRange = 175; pCost = 100; pLevel = 1; pSpeed = 200; pLastFire = 0; pTarget = -1; pSelected = false; pLastAnim = 0; pAnimDelay = 50; pAnimCount = 5; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 10; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 37
//tower_ice (tower_ice) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class tower_ice extends MovieClip { public var pSelected:Boolean;// = false public var pLevel:Number;// = 1 public var pPlayDelay:int;// = 1000 public var pTarget:Number;// = -1 public var pLastAnim:int;// = 0 public var pCost:Number;// = 25 public var pTowerType:Number;// = 2 public var pAnimDelay:int;// = 50 public var pLastFire:Number;// = 0 public var pTower:tower_ice; public var pCurrentAnim:int;// = 0 public var pOrigDamage:Number;// = 0.2 public var pRange:Number;// = 100 public var pLastPlay:int;// = 0 public var pSpeed:Number;// = 350 public var pAnimCount:int;// = 7 public var pDamage:Number;// = 0.2 public function tower_ice():void{ pTowerType = 2; pDamage = 0.2; pOrigDamage = 0.2; pRange = 100; pCost = 25; pLevel = 1; pSpeed = 350; pLastFire = 0; pTarget = -1; pSelected = false; pLastAnim = 0; pAnimDelay = 50; pAnimCount = 7; pCurrentAnim = 0; pLastPlay = 0; pPlayDelay = 1000; super(); gotoAndStop(0); addEventListener(MouseEvent.MOUSE_UP, clickedon); addEventListener(Event.ENTER_FRAME, everytime); } public function everytime(_arg1:Event):void{ if (getTimer() > (pLastPlay + pPlayDelay)){ if (getTimer() > (pLastAnim + pAnimDelay)){ if (pCurrentAnim == pAnimCount){ pCurrentAnim = -1; pLastPlay = getTimer(); }; gotoAndStop((pCurrentAnim + 1)); pCurrentAnim++; pLastAnim = getTimer(); }; }; } public function clickedon(_arg1:MouseEvent):void{ pSelected = true; } public function CheckSelected():Boolean{ if (pSelected == true){ return (true); }; return (false); } } }//package
Section 38
//TurnPoint (TurnPoint) package { import flash.display.*; public dynamic class TurnPoint extends MovieClip { } }//package

Library Items

Symbol 1 Sound {buttonclick}
Symbol 2 Sound {ambient_5}
Symbol 3 Sound {ambient_4}
Symbol 4 Sound {ambient_3}
Symbol 5 Sound {ambient_2}
Symbol 6 Sound {ambient_1}
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip {TurnPoint}Uses:7
Symbol 9 BitmapUsed by:10
Symbol 10 GraphicUses:9Used by:11
Symbol 11 MovieClip {enemy_health_bar}Uses:10
Symbol 12 BitmapUsed by:13
Symbol 13 GraphicUses:12Used by:14
Symbol 14 MovieClip {script_bullet_cannon}Uses:13
Symbol 15 BitmapUsed by:16
Symbol 16 GraphicUses:15Used by:17
Symbol 17 MovieClip {script_bullet_fire}Uses:16
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:20
Symbol 20 MovieClip {script_bullet_ice}Uses:19
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:23
Symbol 23 MovieClip {script_bullet_arcane}Uses:22
Symbol 24 BitmapUsed by:25
Symbol 25 GraphicUses:24Used by:26
Symbol 26 MovieClip {script_bullet_arrow}Uses:25
Symbol 27 BitmapUsed by:28
Symbol 28 GraphicUses:27Used by:59
Symbol 29 BitmapUsed by:30
Symbol 30 GraphicUses:29Used by:59
Symbol 31 BitmapUsed by:32
Symbol 32 GraphicUses:31Used by:59
Symbol 33 BitmapUsed by:34
Symbol 34 GraphicUses:33Used by:59
Symbol 35 BitmapUsed by:36
Symbol 36 GraphicUses:35Used by:59
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:59
Symbol 39 BitmapUsed by:40
Symbol 40 GraphicUses:39Used by:59
Symbol 41 BitmapUsed by:42
Symbol 42 GraphicUses:41Used by:59
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:59
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:59
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:59
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:59
Symbol 51 BitmapUsed by:52
Symbol 52 GraphicUses:51Used by:59
Symbol 53 BitmapUsed by:54
Symbol 54 GraphicUses:53Used by:59
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:59
Symbol 57 BitmapUsed by:58
Symbol 58 GraphicUses:57Used by:59
Symbol 59 MovieClip {script_enemy_goblin}Uses:28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:92
Symbol 62 BitmapUsed by:63
Symbol 63 GraphicUses:62Used by:92
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:92
Symbol 66 BitmapUsed by:67
Symbol 67 GraphicUses:66Used by:92
Symbol 68 BitmapUsed by:69
Symbol 69 GraphicUses:68Used by:92
Symbol 70 BitmapUsed by:71
Symbol 71 GraphicUses:70Used by:92
Symbol 72 BitmapUsed by:73
Symbol 73 GraphicUses:72Used by:92
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:92
Symbol 76 BitmapUsed by:77
Symbol 77 GraphicUses:76Used by:92
Symbol 78 BitmapUsed by:79
Symbol 79 GraphicUses:78Used by:92
Symbol 80 BitmapUsed by:81
Symbol 81 GraphicUses:80Used by:92
Symbol 82 BitmapUsed by:83
Symbol 83 GraphicUses:82Used by:92
Symbol 84 BitmapUsed by:85
Symbol 85 GraphicUses:84Used by:92
Symbol 86 BitmapUsed by:87
Symbol 87 GraphicUses:86Used by:92
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:92
Symbol 90 BitmapUsed by:91
Symbol 91 GraphicUses:90Used by:92
Symbol 92 MovieClip {script_enemy_orc}Uses:61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91
Symbol 93 BitmapUsed by:94
Symbol 94 GraphicUses:93Used by:125
Symbol 95 BitmapUsed by:96
Symbol 96 GraphicUses:95Used by:125
Symbol 97 BitmapUsed by:98
Symbol 98 GraphicUses:97Used by:125
Symbol 99 BitmapUsed by:100
Symbol 100 GraphicUses:99Used by:125
Symbol 101 BitmapUsed by:102
Symbol 102 GraphicUses:101Used by:125
Symbol 103 BitmapUsed by:104
Symbol 104 GraphicUses:103Used by:125
Symbol 105 BitmapUsed by:106
Symbol 106 GraphicUses:105Used by:125
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:125
Symbol 109 BitmapUsed by:110
Symbol 110 GraphicUses:109Used by:125
Symbol 111 BitmapUsed by:112
Symbol 112 GraphicUses:111Used by:125
Symbol 113 BitmapUsed by:114
Symbol 114 GraphicUses:113Used by:125
Symbol 115 BitmapUsed by:116
Symbol 116 GraphicUses:115Used by:125
Symbol 117 BitmapUsed by:118
Symbol 118 GraphicUses:117Used by:125
Symbol 119 BitmapUsed by:120
Symbol 120 GraphicUses:119Used by:125
Symbol 121 BitmapUsed by:122
Symbol 122 GraphicUses:121Used by:125
Symbol 123 BitmapUsed by:124
Symbol 124 GraphicUses:123Used by:125
Symbol 125 MovieClip {script_enemy_demon}Uses:94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124
Symbol 126 BitmapUsed by:127
Symbol 127 GraphicUses:126Used by:140 712
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:140
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:140
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:140
Symbol 134 BitmapUsed by:135
Symbol 135 GraphicUses:134Used by:140
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:140
Symbol 138 BitmapUsed by:139
Symbol 139 GraphicUses:138Used by:140
Symbol 140 MovieClip {tower_ice}Uses:127 129 131 133 135 137 139
Symbol 141 BitmapUsed by:142
Symbol 142 GraphicUses:141Used by:151 710
Symbol 143 BitmapUsed by:144
Symbol 144 GraphicUses:143Used by:151
Symbol 145 BitmapUsed by:146
Symbol 146 GraphicUses:145Used by:151
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:151
Symbol 149 BitmapUsed by:150
Symbol 150 GraphicUses:149Used by:151
Symbol 151 MovieClip {tower_fire}Uses:142 144 146 148 150
Symbol 152 BitmapUsed by:153
Symbol 153 GraphicUses:152Used by:164 711
Symbol 154 BitmapUsed by:155
Symbol 155 GraphicUses:154Used by:164
Symbol 156 BitmapUsed by:157
Symbol 157 GraphicUses:156Used by:164
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:164
Symbol 160 BitmapUsed by:161
Symbol 161 GraphicUses:160Used by:164
Symbol 162 BitmapUsed by:163
Symbol 163 GraphicUses:162Used by:164
Symbol 164 MovieClip {tower_arcane}Uses:153 155 157 159 161 163
Symbol 165 BitmapUsed by:166
Symbol 166 GraphicUses:165Used by:201 709
Symbol 167 BitmapUsed by:168
Symbol 168 GraphicUses:167Used by:201
Symbol 169 BitmapUsed by:170
Symbol 170 GraphicUses:169Used by:201
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:201
Symbol 173 BitmapUsed by:174
Symbol 174 GraphicUses:173Used by:201
Symbol 175 BitmapUsed by:176
Symbol 176 GraphicUses:175Used by:201
Symbol 177 BitmapUsed by:178
Symbol 178 GraphicUses:177Used by:201
Symbol 179 BitmapUsed by:180
Symbol 180 GraphicUses:179Used by:201
Symbol 181 BitmapUsed by:182
Symbol 182 GraphicUses:181Used by:201
Symbol 183 BitmapUsed by:184
Symbol 184 GraphicUses:183Used by:201
Symbol 185 BitmapUsed by:186
Symbol 186 GraphicUses:185Used by:201
Symbol 187 BitmapUsed by:188
Symbol 188 GraphicUses:187Used by:201
Symbol 189 BitmapUsed by:190
Symbol 190 GraphicUses:189Used by:201
Symbol 191 BitmapUsed by:192
Symbol 192 GraphicUses:191Used by:201
Symbol 193 BitmapUsed by:194
Symbol 194 GraphicUses:193Used by:201
Symbol 195 BitmapUsed by:196
Symbol 196 GraphicUses:195Used by:201
Symbol 197 BitmapUsed by:198
Symbol 198 GraphicUses:197Used by:201
Symbol 199 BitmapUsed by:200
Symbol 200 GraphicUses:199Used by:201
Symbol 201 MovieClip {tower_arrow}Uses:166 168 170 172 174 176 178 180 182 184 186 188 190 192 194 196 198 200
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:248 708
Symbol 204 BitmapUsed by:205
Symbol 205 GraphicUses:204Used by:248
Symbol 206 BitmapUsed by:207
Symbol 207 GraphicUses:206Used by:248
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:248
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:248
Symbol 212 BitmapUsed by:213
Symbol 213 GraphicUses:212Used by:248
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214Used by:248
Symbol 216 BitmapUsed by:217
Symbol 217 GraphicUses:216Used by:248
Symbol 218 BitmapUsed by:219
Symbol 219 GraphicUses:218Used by:248
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:248
Symbol 222 BitmapUsed by:223
Symbol 223 GraphicUses:222Used by:248
Symbol 224 BitmapUsed by:225
Symbol 225 GraphicUses:224Used by:248
Symbol 226 BitmapUsed by:227
Symbol 227 GraphicUses:226Used by:248
Symbol 228 BitmapUsed by:229
Symbol 229 GraphicUses:228Used by:248
Symbol 230 BitmapUsed by:231
Symbol 231 GraphicUses:230Used by:248
Symbol 232 BitmapUsed by:233
Symbol 233 GraphicUses:232Used by:248
Symbol 234 BitmapUsed by:235
Symbol 235 GraphicUses:234Used by:248
Symbol 236 BitmapUsed by:237
Symbol 237 GraphicUses:236Used by:248
Symbol 238 BitmapUsed by:239
Symbol 239 GraphicUses:238Used by:248
Symbol 240 BitmapUsed by:241
Symbol 241 GraphicUses:240Used by:248
Symbol 242 BitmapUsed by:243
Symbol 243 GraphicUses:242Used by:248
Symbol 244 BitmapUsed by:245
Symbol 245 GraphicUses:244Used by:248
Symbol 246 BitmapUsed by:247
Symbol 247 GraphicUses:246Used by:248
Symbol 248 MovieClip {tower_cannon}Uses:203 205 207 209 211 213 215 217 219 221 223 225 227 229 231 233 235 237 239 241 243 245 247
Symbol 249 BitmapUsed by:250
Symbol 250 GraphicUses:249Used by:281
Symbol 251 BitmapUsed by:252
Symbol 252 GraphicUses:251Used by:281
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:281
Symbol 255 BitmapUsed by:256
Symbol 256 GraphicUses:255Used by:281
Symbol 257 BitmapUsed by:258
Symbol 258 GraphicUses:257Used by:281
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:281
Symbol 261 BitmapUsed by:262
Symbol 262 GraphicUses:261Used by:281
Symbol 263 BitmapUsed by:264
Symbol 264 GraphicUses:263Used by:281
Symbol 265 BitmapUsed by:266
Symbol 266 GraphicUses:265Used by:281
Symbol 267 BitmapUsed by:268
Symbol 268 GraphicUses:267Used by:281
Symbol 269 BitmapUsed by:270
Symbol 270 GraphicUses:269Used by:281
Symbol 271 BitmapUsed by:272
Symbol 272 GraphicUses:271Used by:281
Symbol 273 BitmapUsed by:274
Symbol 274 GraphicUses:273Used by:281
Symbol 275 BitmapUsed by:276
Symbol 276 GraphicUses:275Used by:281
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:281
Symbol 279 BitmapUsed by:280
Symbol 280 GraphicUses:279Used by:281
Symbol 281 MovieClip {script_enemy_boss1}Uses:250 252 254 256 258 260 262 264 266 268 270 272 274 276 278 280
Symbol 282 BitmapUsed by:283
Symbol 283 GraphicUses:282Used by:314
Symbol 284 BitmapUsed by:285
Symbol 285 GraphicUses:284Used by:314
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:314
Symbol 288 BitmapUsed by:289
Symbol 289 GraphicUses:288Used by:314
Symbol 290 BitmapUsed by:291
Symbol 291 GraphicUses:290Used by:314
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:314
Symbol 294 BitmapUsed by:295
Symbol 295 GraphicUses:294Used by:314
Symbol 296 BitmapUsed by:297
Symbol 297 GraphicUses:296Used by:314
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:314
Symbol 300 BitmapUsed by:301
Symbol 301 GraphicUses:300Used by:314
Symbol 302 BitmapUsed by:303
Symbol 303 GraphicUses:302Used by:314
Symbol 304 BitmapUsed by:305
Symbol 305 GraphicUses:304Used by:314
Symbol 306 BitmapUsed by:307
Symbol 307 GraphicUses:306Used by:314
Symbol 308 BitmapUsed by:309
Symbol 309 GraphicUses:308Used by:314
Symbol 310 BitmapUsed by:311
Symbol 311 GraphicUses:310Used by:314
Symbol 312 BitmapUsed by:313
Symbol 313 GraphicUses:312Used by:314
Symbol 314 MovieClip {script_enemy_undead}Uses:283 285 287 289 291 293 295 297 299 301 303 305 307 309 311 313
Symbol 315 BitmapUsed by:316
Symbol 316 GraphicUses:315Used by:347
Symbol 317 BitmapUsed by:318
Symbol 318 GraphicUses:317Used by:347
Symbol 319 BitmapUsed by:320
Symbol 320 GraphicUses:319Used by:347
Symbol 321 BitmapUsed by:322
Symbol 322 GraphicUses:321Used by:347
Symbol 323 BitmapUsed by:324
Symbol 324 GraphicUses:323Used by:347
Symbol 325 BitmapUsed by:326
Symbol 326 GraphicUses:325Used by:347
Symbol 327 BitmapUsed by:328
Symbol 328 GraphicUses:327Used by:347
Symbol 329 BitmapUsed by:330
Symbol 330 GraphicUses:329Used by:347
Symbol 331 BitmapUsed by:332
Symbol 332 GraphicUses:331Used by:347
Symbol 333 BitmapUsed by:334
Symbol 334 GraphicUses:333Used by:347
Symbol 335 BitmapUsed by:336
Symbol 336 GraphicUses:335Used by:347
Symbol 337 BitmapUsed by:338
Symbol 338 GraphicUses:337Used by:347
Symbol 339 BitmapUsed by:340
Symbol 340 GraphicUses:339Used by:347
Symbol 341 BitmapUsed by:342
Symbol 342 GraphicUses:341Used by:347
Symbol 343 BitmapUsed by:344
Symbol 344 GraphicUses:343Used by:347
Symbol 345 BitmapUsed by:346
Symbol 346 GraphicUses:345Used by:347
Symbol 347 MovieClip {script_enemy_clothundead}Uses:316 318 320 322 324 326 328 330 332 334 336 338 340 342 344 346
Symbol 348 BitmapUsed by:349
Symbol 349 GraphicUses:348Used by:380
Symbol 350 BitmapUsed by:351
Symbol 351 GraphicUses:350Used by:380
Symbol 352 BitmapUsed by:353
Symbol 353 GraphicUses:352Used by:380
Symbol 354 BitmapUsed by:355
Symbol 355 GraphicUses:354Used by:380
Symbol 356 BitmapUsed by:357
Symbol 357 GraphicUses:356Used by:380
Symbol 358 BitmapUsed by:359
Symbol 359 GraphicUses:358Used by:380
Symbol 360 BitmapUsed by:361
Symbol 361 GraphicUses:360Used by:380
Symbol 362 BitmapUsed by:363
Symbol 363 GraphicUses:362Used by:380
Symbol 364 BitmapUsed by:365
Symbol 365 GraphicUses:364Used by:380
Symbol 366 BitmapUsed by:367
Symbol 367 GraphicUses:366Used by:380
Symbol 368 BitmapUsed by:369
Symbol 369 GraphicUses:368Used by:380
Symbol 370 BitmapUsed by:371
Symbol 371 GraphicUses:370Used by:380
Symbol 372 BitmapUsed by:373
Symbol 373 GraphicUses:372Used by:380
Symbol 374 BitmapUsed by:375
Symbol 375 GraphicUses:374Used by:380
Symbol 376 BitmapUsed by:377
Symbol 377 GraphicUses:376Used by:380
Symbol 378 BitmapUsed by:379
Symbol 379 GraphicUses:378Used by:380
Symbol 380 MovieClip {script_enemy_armororc}Uses:349 351 353 355 357 359 361 363 365 367 369 371 373 375 377 379
Symbol 381 BitmapUsed by:382
Symbol 382 GraphicUses:381Used by:413
Symbol 383 BitmapUsed by:384
Symbol 384 GraphicUses:383Used by:413
Symbol 385 BitmapUsed by:386
Symbol 386 GraphicUses:385Used by:413
Symbol 387 BitmapUsed by:388
Symbol 388 GraphicUses:387Used by:413
Symbol 389 BitmapUsed by:390
Symbol 390 GraphicUses:389Used by:413
Symbol 391 BitmapUsed by:392
Symbol 392 GraphicUses:391Used by:413
Symbol 393 BitmapUsed by:394
Symbol 394 GraphicUses:393Used by:413
Symbol 395 BitmapUsed by:396
Symbol 396 GraphicUses:395Used by:413
Symbol 397 BitmapUsed by:398
Symbol 398 GraphicUses:397Used by:413
Symbol 399 BitmapUsed by:400
Symbol 400 GraphicUses:399Used by:413
Symbol 401 BitmapUsed by:402
Symbol 402 GraphicUses:401Used by:413
Symbol 403 BitmapUsed by:404
Symbol 404 GraphicUses:403Used by:413
Symbol 405 BitmapUsed by:406
Symbol 406 GraphicUses:405Used by:413
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:407Used by:413
Symbol 409 BitmapUsed by:410
Symbol 410 GraphicUses:409Used by:413
Symbol 411 BitmapUsed by:412
Symbol 412 GraphicUses:411Used by:413
Symbol 413 MovieClip {script_enemy_armortroll}Uses:382 384 386 388 390 392 394 396 398 400 402 404 406 408 410 412
Symbol 414 BitmapUsed by:415
Symbol 415 GraphicUses:414Used by:446
Symbol 416 BitmapUsed by:417
Symbol 417 GraphicUses:416Used by:446
Symbol 418 BitmapUsed by:419
Symbol 419 GraphicUses:418Used by:446
Symbol 420 BitmapUsed by:421
Symbol 421 GraphicUses:420Used by:446
Symbol 422 BitmapUsed by:423
Symbol 423 GraphicUses:422Used by:446
Symbol 424 BitmapUsed by:425
Symbol 425 GraphicUses:424Used by:446
Symbol 426 BitmapUsed by:427
Symbol 427 GraphicUses:426Used by:446
Symbol 428 BitmapUsed by:429
Symbol 429 GraphicUses:428Used by:446
Symbol 430 BitmapUsed by:431
Symbol 431 GraphicUses:430Used by:446
Symbol 432 BitmapUsed by:433
Symbol 433 GraphicUses:432Used by:446
Symbol 434 BitmapUsed by:435
Symbol 435 GraphicUses:434Used by:446
Symbol 436 BitmapUsed by:437
Symbol 437 GraphicUses:436Used by:446
Symbol 438 BitmapUsed by:439
Symbol 439 GraphicUses:438Used by:446
Symbol 440 BitmapUsed by:441
Symbol 441 GraphicUses:440Used by:446
Symbol 442 BitmapUsed by:443
Symbol 443 GraphicUses:442Used by:446
Symbol 444 BitmapUsed by:445
Symbol 445 GraphicUses:444Used by:446
Symbol 446 MovieClip {script_enemy_fasttroll}Uses:415 417 419 421 423 425 427 429 431 433 435 437 439 441 443 445
Symbol 447 BitmapUsed by:448
Symbol 448 GraphicUses:447Used by:479
Symbol 449 BitmapUsed by:450
Symbol 450 GraphicUses:449Used by:479
Symbol 451 BitmapUsed by:452
Symbol 452 GraphicUses:451Used by:479
Symbol 453 BitmapUsed by:454
Symbol 454 GraphicUses:453Used by:479
Symbol 455 BitmapUsed by:456
Symbol 456 GraphicUses:455Used by:479
Symbol 457 BitmapUsed by:458
Symbol 458 GraphicUses:457Used by:479
Symbol 459 BitmapUsed by:460
Symbol 460 GraphicUses:459Used by:479
Symbol 461 BitmapUsed by:462
Symbol 462 GraphicUses:461Used by:479
Symbol 463 BitmapUsed by:464
Symbol 464 GraphicUses:463Used by:479
Symbol 465 BitmapUsed by:466
Symbol 466 GraphicUses:465Used by:479
Symbol 467 BitmapUsed by:468
Symbol 468 GraphicUses:467Used by:479
Symbol 469 BitmapUsed by:470
Symbol 470 GraphicUses:469Used by:479
Symbol 471 BitmapUsed by:472
Symbol 472 GraphicUses:471Used by:479
Symbol 473 BitmapUsed by:474
Symbol 474 GraphicUses:473Used by:479
Symbol 475 BitmapUsed by:476
Symbol 476 GraphicUses:475Used by:479
Symbol 477 BitmapUsed by:478
Symbol 478 GraphicUses:477Used by:479
Symbol 479 MovieClip {script_enemy_lion}Uses:448 450 452 454 456 458 460 462 464 466 468 470 472 474 476 478
Symbol 480 BitmapUsed by:481
Symbol 481 GraphicUses:480Used by:512
Symbol 482 BitmapUsed by:483
Symbol 483 GraphicUses:482Used by:512
Symbol 484 BitmapUsed by:485
Symbol 485 GraphicUses:484Used by:512
Symbol 486 BitmapUsed by:487
Symbol 487 GraphicUses:486Used by:512
Symbol 488 BitmapUsed by:489
Symbol 489 GraphicUses:488Used by:512
Symbol 490 BitmapUsed by:491
Symbol 491 GraphicUses:490Used by:512
Symbol 492 BitmapUsed by:493
Symbol 493 GraphicUses:492Used by:512
Symbol 494 BitmapUsed by:495
Symbol 495 GraphicUses:494Used by:512
Symbol 496 BitmapUsed by:497
Symbol 497 GraphicUses:496Used by:512
Symbol 498 BitmapUsed by:499
Symbol 499 GraphicUses:498Used by:512
Symbol 500 BitmapUsed by:501
Symbol 501 GraphicUses:500Used by:512
Symbol 502 BitmapUsed by:503
Symbol 503 GraphicUses:502Used by:512
Symbol 504 BitmapUsed by:505
Symbol 505 GraphicUses:504Used by:512
Symbol 506 BitmapUsed by:507
Symbol 507 GraphicUses:506Used by:512
Symbol 508 BitmapUsed by:509
Symbol 509 GraphicUses:508Used by:512
Symbol 510 BitmapUsed by:511
Symbol 511 GraphicUses:510Used by:512
Symbol 512 MovieClip {script_enemy_tauren}Uses:481 483 485 487 489 491 493 495 497 499 501 503 505 507 509 511
Symbol 513 BitmapUsed by:514 702
Symbol 514 GraphicUses:513Used by:515
Symbol 515 MovieClip {blizzard_graphic}Uses:514
Symbol 516 BitmapUsed by:517 704
Symbol 517 GraphicUses:516Used by:524
Symbol 518 BitmapUsed by:519
Symbol 519 GraphicUses:518Used by:524
Symbol 520 BitmapUsed by:521
Symbol 521 GraphicUses:520Used by:524
Symbol 522 BitmapUsed by:523
Symbol 523 GraphicUses:522Used by:524
Symbol 524 MovieClip {angel_of_death}Uses:517 519 521 523
Symbol 525 BitmapUsed by:526
Symbol 526 GraphicUses:525Used by:551
Symbol 527 BitmapUsed by:528
Symbol 528 GraphicUses:527Used by:551
Symbol 529 BitmapUsed by:530
Symbol 530 GraphicUses:529Used by:551
Symbol 531 BitmapUsed by:532
Symbol 532 GraphicUses:531Used by:551
Symbol 533 BitmapUsed by:534
Symbol 534 GraphicUses:533Used by:551
Symbol 535 BitmapUsed by:536
Symbol 536 GraphicUses:535Used by:551
Symbol 537 BitmapUsed by:538 700
Symbol 538 GraphicUses:537Used by:551
Symbol 539 BitmapUsed by:540
Symbol 540 GraphicUses:539Used by:551
Symbol 541 BitmapUsed by:542
Symbol 542 GraphicUses:541Used by:551
Symbol 543 BitmapUsed by:544
Symbol 544 GraphicUses:543Used by:551
Symbol 545 BitmapUsed by:546
Symbol 546 GraphicUses:545Used by:551
Symbol 547 BitmapUsed by:548
Symbol 548 GraphicUses:547Used by:551
Symbol 549 BitmapUsed by:550
Symbol 550 GraphicUses:549Used by:551
Symbol 551 MovieClip {judgement}Uses:526 528 530 532 534 536 538 540 542 544 546 548 550
Symbol 552 BitmapUsed by:553
Symbol 553 GraphicUses:552Used by:582 687
Symbol 554 BitmapUsed by:555
Symbol 555 GraphicUses:554Used by:582
Symbol 556 BitmapUsed by:557
Symbol 557 GraphicUses:556Used by:582
Symbol 558 BitmapUsed by:559
Symbol 559 GraphicUses:558Used by:582
Symbol 560 BitmapUsed by:561
Symbol 561 GraphicUses:560Used by:582
Symbol 562 BitmapUsed by:563
Symbol 563 GraphicUses:562Used by:582
Symbol 564 BitmapUsed by:565
Symbol 565 GraphicUses:564Used by:582
Symbol 566 BitmapUsed by:567
Symbol 567 GraphicUses:566Used by:582
Symbol 568 BitmapUsed by:569
Symbol 569 GraphicUses:568Used by:582
Symbol 570 BitmapUsed by:571
Symbol 571 GraphicUses:570Used by:582
Symbol 572 BitmapUsed by:573
Symbol 573 GraphicUses:572Used by:582
Symbol 574 BitmapUsed by:575
Symbol 575 GraphicUses:574Used by:582
Symbol 576 BitmapUsed by:577
Symbol 577 GraphicUses:576Used by:582
Symbol 578 BitmapUsed by:579
Symbol 579 GraphicUses:578Used by:582
Symbol 580 BitmapUsed by:581
Symbol 581 GraphicUses:580Used by:582
Symbol 582 MovieClip {building_church}Uses:553 555 557 559 561 563 565 567 569 571 573 575 577 579 581
Symbol 583 BitmapUsed by:584
Symbol 584 GraphicUses:583Used by:633 686
Symbol 585 BitmapUsed by:586
Symbol 586 GraphicUses:585Used by:633
Symbol 587 BitmapUsed by:588
Symbol 588 GraphicUses:587Used by:633
Symbol 589 BitmapUsed by:590
Symbol 590 GraphicUses:589Used by:633
Symbol 591 BitmapUsed by:592
Symbol 592 GraphicUses:591Used by:633
Symbol 593 BitmapUsed by:594
Symbol 594 GraphicUses:593Used by:633
Symbol 595 BitmapUsed by:596
Symbol 596 GraphicUses:595Used by:633
Symbol 597 BitmapUsed by:598
Symbol 598 GraphicUses:597Used by:633
Symbol 599 BitmapUsed by:600
Symbol 600 GraphicUses:599Used by:633
Symbol 601 BitmapUsed by:602
Symbol 602 GraphicUses:601Used by:633
Symbol 603 BitmapUsed by:604
Symbol 604 GraphicUses:603Used by:633
Symbol 605 BitmapUsed by:606
Symbol 606 GraphicUses:605Used by:633
Symbol 607 BitmapUsed by:608
Symbol 608 GraphicUses:607Used by:633
Symbol 609 BitmapUsed by:610
Symbol 610 GraphicUses:609Used by:633
Symbol 611 BitmapUsed by:612
Symbol 612 GraphicUses:611Used by:633
Symbol 613 BitmapUsed by:614
Symbol 614 GraphicUses:613Used by:633
Symbol 615 BitmapUsed by:616
Symbol 616 GraphicUses:615Used by:633
Symbol 617 BitmapUsed by:618
Symbol 618 GraphicUses:617Used by:633
Symbol 619 BitmapUsed by:620
Symbol 620 GraphicUses:619Used by:633
Symbol 621 BitmapUsed by:622
Symbol 622 GraphicUses:621Used by:633
Symbol 623 BitmapUsed by:624
Symbol 624 GraphicUses:623Used by:633
Symbol 625 BitmapUsed by:626
Symbol 626 GraphicUses:625Used by:633
Symbol 627 BitmapUsed by:628
Symbol 628 GraphicUses:627Used by:633
Symbol 629 BitmapUsed by:630
Symbol 630 GraphicUses:629Used by:633
Symbol 631 BitmapUsed by:632
Symbol 632 GraphicUses:631Used by:633
Symbol 633 MovieClip {building_mine}Uses:584 586 588 590 592 594 596 598 600 602 604 606 608 610 612 614 616 618 620 622 624 626 628 630 632
Symbol 634 FontUsed by:635
Symbol 635 TextUses:634Used by:Timeline
Symbol 636 BitmapUsed by:637
Symbol 637 GraphicUses:636Used by:638
Symbol 638 MovieClipUses:637Used by:Timeline
Symbol 639 FontUsed by:640
Symbol 640 TextUses:639Used by:642
Symbol 641 GraphicUsed by:642
Symbol 642 MovieClipUses:640 641Used by:Timeline
Symbol 643 FontUsed by:644 645 646 647 648 653 654 655
Symbol 644 TextUses:643Used by:Timeline
Symbol 645 TextUses:643Used by:Timeline
Symbol 646 TextUses:643Used by:Timeline
Symbol 647 TextUses:643Used by:Timeline
Symbol 648 TextUses:643Used by:Timeline
Symbol 649 BitmapUsed by:652 715
Symbol 650 BitmapUsed by:652 719
Symbol 651 BitmapUsed by:652 717
Symbol 652 GraphicUses:649 650 651Used by:Timeline
Symbol 653 TextUses:643Used by:Timeline
Symbol 654 TextUses:643Used by:Timeline
Symbol 655 TextUses:643Used by:Timeline
Symbol 656 FontUsed by:657
Symbol 657 TextUses:656Used by:Timeline
Symbol 658 BitmapUsed by:659
Symbol 659 GraphicUses:658Used by:660
Symbol 660 MovieClipUses:659Used by:Timeline
Symbol 661 BitmapUsed by:662
Symbol 662 GraphicUses:661Used by:663
Symbol 663 MovieClipUses:662Used by:Timeline
Symbol 664 BitmapUsed by:665
Symbol 665 GraphicUses:664Used by:666
Symbol 666 MovieClipUses:665Used by:Timeline
Symbol 667 BitmapUsed by:668
Symbol 668 GraphicUses:667Used by:669
Symbol 669 MovieClipUses:668Used by:Timeline
Symbol 670 BitmapUsed by:671
Symbol 671 GraphicUses:670Used by:Timeline
Symbol 672 BitmapUsed by:673
Symbol 673 GraphicUses:672Used by:674
Symbol 674 MovieClipUses:673Used by:Timeline
Symbol 675 BitmapUsed by:676
Symbol 676 GraphicUses:675Used by:677
Symbol 677 MovieClipUses:676Used by:Timeline
Symbol 678 BitmapUsed by:679
Symbol 679 GraphicUses:678Used by:680
Symbol 680 MovieClipUses:679Used by:Timeline
Symbol 681 BitmapUsed by:682
Symbol 682 GraphicUses:681Used by:Timeline
Symbol 683 BitmapUsed by:684
Symbol 684 GraphicUses:683Used by:685
Symbol 685 MovieClipUses:684Used by:Timeline
Symbol 686 MovieClipUses:584Used by:Timeline
Symbol 687 MovieClipUses:553Used by:Timeline
Symbol 688 FontUsed by:689 691 694
Symbol 689 TextUses:688Used by:690
Symbol 690 MovieClipUses:689Used by:Timeline
Symbol 691 TextUses:688Used by:693
Symbol 692 GraphicUsed by:693
Symbol 693 MovieClipUses:691 692Used by:Timeline
Symbol 694 TextUses:688Used by:696
Symbol 695 GraphicUsed by:696
Symbol 696 MovieClipUses:694 695Used by:Timeline
Symbol 697 FontUsed by:698 699 750 751 752 753 754 755 756 757 758 759 760 780 791 792 793 794 795 796 799 810 811 812 813 814 815 818 829 830 831 832 833 834
Symbol 698 TextUses:697Used by:Timeline
Symbol 699 EditableTextUses:697Used by:Timeline
Symbol 700 GraphicUses:537Used by:701
Symbol 701 MovieClipUses:700Used by:Timeline
Symbol 702 GraphicUses:513Used by:703
Symbol 703 MovieClipUses:702Used by:Timeline
Symbol 704 GraphicUses:516Used by:705
Symbol 705 MovieClipUses:704Used by:Timeline
Symbol 706 FontUsed by:707 739 781 783 800 802 819 821
Symbol 707 EditableTextUses:706Used by:Timeline
Symbol 708 MovieClipUses:203Used by:Timeline
Symbol 709 MovieClipUses:166Used by:Timeline
Symbol 710 MovieClipUses:142Used by:Timeline
Symbol 711 MovieClipUses:153Used by:Timeline
Symbol 712 MovieClipUses:127Used by:Timeline
Symbol 713 FontUsed by:714 749 782 790 801 809 820 828
Symbol 714 EditableTextUses:713Used by:Timeline
Symbol 715 GraphicUses:649Used by:716
Symbol 716 MovieClipUses:715Used by:Timeline
Symbol 717 GraphicUses:651Used by:718
Symbol 718 MovieClipUses:717Used by:Timeline
Symbol 719 GraphicUses:650Used by:720
Symbol 720 MovieClipUses:719Used by:Timeline
Symbol 721 BitmapUsed by:722
Symbol 722 GraphicUses:721Used by:723
Symbol 723 MovieClipUses:722Used by:Timeline
Symbol 724 BitmapUsed by:725
Symbol 725 GraphicUses:724Used by:726
Symbol 726 MovieClipUses:725Used by:Timeline
Symbol 727 BitmapUsed by:728
Symbol 728 GraphicUses:727Used by:729
Symbol 729 MovieClipUses:728Used by:Timeline
Symbol 730 BitmapUsed by:731
Symbol 731 GraphicUses:730Used by:732
Symbol 732 MovieClipUses:731Used by:Timeline
Symbol 733 BitmapUsed by:734
Symbol 734 GraphicUses:733Used by:735
Symbol 735 MovieClipUses:734Used by:Timeline
Symbol 736 BitmapUsed by:737
Symbol 737 GraphicUses:736Used by:738
Symbol 738 MovieClipUses:737Used by:Timeline
Symbol 739 EditableTextUses:706Used by:Timeline
Symbol 740 FontUsed by:741 742 743 744 775 784 785 786 787 797 803 804 805 806 816 822 823 824 825 837
Symbol 741 EditableTextUses:740Used by:Timeline
Symbol 742 EditableTextUses:740Used by:Timeline
Symbol 743 EditableTextUses:740Used by:Timeline
Symbol 744 EditableTextUses:740Used by:Timeline
Symbol 745 FontUsed by:746 788 807 826
Symbol 746 TextUses:745Used by:Timeline
Symbol 747 FontUsed by:748 789 808 827
Symbol 748 EditableTextUses:747Used by:Timeline
Symbol 749 EditableTextUses:713Used by:Timeline
Symbol 750 EditableTextUses:697Used by:Timeline
Symbol 751 TextUses:697Used by:Timeline
Symbol 752 EditableTextUses:697Used by:Timeline
Symbol 753 EditableTextUses:697Used by:Timeline
Symbol 754 TextUses:697Used by:Timeline
Symbol 755 EditableTextUses:697Used by:Timeline
Symbol 756 EditableTextUses:697Used by:Timeline
Symbol 757 TextUses:697Used by:Timeline
Symbol 758 TextUses:697Used by:Timeline
Symbol 759 EditableTextUses:697Used by:Timeline
Symbol 760 TextUses:697Used by:Timeline
Symbol 761 BitmapUsed by:763
Symbol 762 BitmapUsed by:763
Symbol 763 GraphicUses:761 762Used by:Timeline
Symbol 764 BitmapUsed by:765
Symbol 765 GraphicUses:764Used by:766
Symbol 766 MovieClipUses:765Used by:Timeline
Symbol 767 BitmapUsed by:768
Symbol 768 GraphicUses:767Used by:769
Symbol 769 MovieClipUses:768Used by:Timeline
Symbol 770 BitmapUsed by:771
Symbol 771 GraphicUses:770Used by:Timeline
Symbol 772 BitmapUsed by:773
Symbol 773 GraphicUses:772Used by:774
Symbol 774 MovieClipUses:773Used by:Timeline
Symbol 775 EditableTextUses:740Used by:Timeline
Symbol 776 FontUsed by:777 798 817 838
Symbol 777 TextUses:776Used by:Timeline
Symbol 778 BitmapUsed by:779
Symbol 779 GraphicUses:778Used by:Timeline
Symbol 780 EditableTextUses:697Used by:Timeline
Symbol 781 EditableTextUses:706Used by:Timeline
Symbol 782 EditableTextUses:713Used by:Timeline
Symbol 783 EditableTextUses:706Used by:Timeline
Symbol 784 EditableTextUses:740Used by:Timeline
Symbol 785 EditableTextUses:740Used by:Timeline
Symbol 786 EditableTextUses:740Used by:Timeline
Symbol 787 EditableTextUses:740Used by:Timeline
Symbol 788 TextUses:745Used by:Timeline
Symbol 789 EditableTextUses:747Used by:Timeline
Symbol 790 EditableTextUses:713Used by:Timeline
Symbol 791 EditableTextUses:697Used by:Timeline
Symbol 792 EditableTextUses:697Used by:Timeline
Symbol 793 EditableTextUses:697Used by:Timeline
Symbol 794 EditableTextUses:697Used by:Timeline
Symbol 795 EditableTextUses:697Used by:Timeline
Symbol 796 EditableTextUses:697Used by:Timeline
Symbol 797 EditableTextUses:740Used by:Timeline
Symbol 798 TextUses:776Used by:Timeline
Symbol 799 EditableTextUses:697Used by:Timeline
Symbol 800 EditableTextUses:706Used by:Timeline
Symbol 801 EditableTextUses:713Used by:Timeline
Symbol 802 EditableTextUses:706Used by:Timeline
Symbol 803 EditableTextUses:740Used by:Timeline
Symbol 804 EditableTextUses:740Used by:Timeline
Symbol 805 EditableTextUses:740Used by:Timeline
Symbol 806 EditableTextUses:740Used by:Timeline
Symbol 807 TextUses:745Used by:Timeline
Symbol 808 EditableTextUses:747Used by:Timeline
Symbol 809 EditableTextUses:713Used by:Timeline
Symbol 810 EditableTextUses:697Used by:Timeline
Symbol 811 EditableTextUses:697Used by:Timeline
Symbol 812 EditableTextUses:697Used by:Timeline
Symbol 813 EditableTextUses:697Used by:Timeline
Symbol 814 EditableTextUses:697Used by:Timeline
Symbol 815 EditableTextUses:697Used by:Timeline
Symbol 816 EditableTextUses:740Used by:Timeline
Symbol 817 TextUses:776Used by:Timeline
Symbol 818 EditableTextUses:697Used by:Timeline
Symbol 819 EditableTextUses:706Used by:Timeline
Symbol 820 EditableTextUses:713Used by:Timeline
Symbol 821 EditableTextUses:706Used by:Timeline
Symbol 822 EditableTextUses:740Used by:Timeline
Symbol 823 EditableTextUses:740Used by:Timeline
Symbol 824 EditableTextUses:740Used by:Timeline
Symbol 825 EditableTextUses:740Used by:Timeline
Symbol 826 TextUses:745Used by:Timeline
Symbol 827 EditableTextUses:747Used by:Timeline
Symbol 828 EditableTextUses:713Used by:Timeline
Symbol 829 EditableTextUses:697Used by:Timeline
Symbol 830 EditableTextUses:697Used by:Timeline
Symbol 831 EditableTextUses:697Used by:Timeline
Symbol 832 EditableTextUses:697Used by:Timeline
Symbol 833 EditableTextUses:697Used by:Timeline
Symbol 834 EditableTextUses:697Used by:Timeline
Symbol 835 BitmapUsed by:836
Symbol 836 GraphicUses:835Used by:Timeline
Symbol 837 EditableTextUses:740Used by:Timeline
Symbol 838 TextUses:776Used by:Timeline

Instance Names

"sponsorlogo"Frame 5Symbol 638 MovieClip
"menu_playmore"Frame 10Symbol 642 MovieClip
"play_game_np_sandbox"Frame 10Symbol 660 MovieClip
"play_game_np_normal"Frame 10Symbol 663 MovieClip
"play_game_np_insane"Frame 10Symbol 666 MovieClip
"play_game_np_hard"Frame 10Symbol 669 MovieClip
"play_game_sandbox"Frame 10Symbol 660 MovieClip
"play_game_30min"Frame 10Symbol 674 MovieClip
"play_game_10min"Frame 10Symbol 677 MovieClip
"play_game_5min"Frame 10Symbol 680 MovieClip
"play_game_insane"Frame 10Symbol 666 MovieClip
"play_game_hard"Frame 10Symbol 669 MovieClip
"play_game_normal"Frame 10Symbol 663 MovieClip
"sponsor_mini"Frame 105Symbol 685 MovieClip
"select_mine"Frame 105Symbol 686 MovieClip
"buy_church"Frame 105Symbol 687 MovieClip
"restart_sure"Frame 105Symbol 690 MovieClip
"restart_no"Frame 105Symbol 693 MovieClip
"restart_yes"Frame 105Symbol 696 MovieClip
"text_prayer"Frame 105Symbol 699 EditableText
"buy_judgement"Frame 105Symbol 701 MovieClip
"buy_blizzard"Frame 105Symbol 703 MovieClip
"buy_angel_death"Frame 105Symbol 705 MovieClip
"text_next_prayer"Frame 105Symbol 707 EditableText
"tower_select_cannon"Frame 105Symbol 708 MovieClip
"tower_select_arrow"Frame 105Symbol 709 MovieClip
"tower_select_fire"Frame 105Symbol 710 MovieClip
"tower_select_arcane"Frame 105Symbol 711 MovieClip
"tower_select_ice"Frame 105Symbol 712 MovieClip
"text_nexttype"Frame 105Symbol 714 EditableText
"musicright"Frame 105Symbol 716 MovieClip
"musicmute"Frame 105Symbol 718 MovieClip
"musicleft"Frame 105Symbol 720 MovieClip
"restart_button"Frame 105Symbol 723 MovieClip
"pausebutton"Frame 105Symbol 726 MovieClip
"playbutton"Frame 105Symbol 729 MovieClip
"upgrade_tower"Frame 105Symbol 732 MovieClip
"sell_tower"Frame 105Symbol 735 MovieClip
"nextlevelbutton"Frame 105Symbol 738 MovieClip
"text_next_gold"Frame 105Symbol 739 EditableText
"text_tower_sell"Frame 105Symbol 741 EditableText
"text_tower_range"Frame 105Symbol 742 EditableText
"text_tower_damage"Frame 105Symbol 743 EditableText
"text_tower_level"Frame 105Symbol 744 EditableText
"text_towerinfo"Frame 105Symbol 748 EditableText
"text_towertype"Frame 105Symbol 749 EditableText
"text_enemy_hp"Frame 105Symbol 750 EditableText
"text_next_level"Frame 105Symbol 752 EditableText
"text_lives"Frame 105Symbol 753 EditableText
"text_gold"Frame 105Symbol 755 EditableText
"text_score"Frame 105Symbol 756 EditableText
"text_level"Frame 105Symbol 759 EditableText
"TheGrid1"Frame 105Symbol 766 MovieClip
"drawonme"Frame 105Symbol 769 MovieClip
"menu_playmore"Frame 110Symbol 642 MovieClip
"play_game"Frame 110Symbol 774 MovieClip
"end_nopath_score"Frame 110Symbol 775 EditableText
"sponsor_mini"Frame 115Symbol 685 MovieClip
"select_mine"Frame 115Symbol 686 MovieClip
"buy_church"Frame 115Symbol 687 MovieClip
"restart_sure"Frame 115Symbol 690 MovieClip
"restart_no"Frame 115Symbol 693 MovieClip
"restart_yes"Frame 115Symbol 696 MovieClip
"text_prayer"Frame 115Symbol 780 EditableText
"buy_judgement"Frame 115Symbol 701 MovieClip
"buy_blizzard"Frame 115Symbol 703 MovieClip
"buy_angel_death"Frame 115Symbol 705 MovieClip
"text_next_prayer"Frame 115Symbol 781 EditableText
"tower_select_cannon"Frame 115Symbol 708 MovieClip
"tower_select_arrow"Frame 115Symbol 709 MovieClip
"tower_select_fire"Frame 115Symbol 710 MovieClip
"tower_select_arcane"Frame 115Symbol 711 MovieClip
"tower_select_ice"Frame 115Symbol 712 MovieClip
"text_nexttype"Frame 115Symbol 782 EditableText
"musicright"Frame 115Symbol 716 MovieClip
"musicmute"Frame 115Symbol 718 MovieClip
"musicleft"Frame 115Symbol 720 MovieClip
"restart_button"Frame 115Symbol 723 MovieClip
"pausebutton"Frame 115Symbol 726 MovieClip
"playbutton"Frame 115Symbol 729 MovieClip
"upgrade_tower"Frame 115Symbol 732 MovieClip
"sell_tower"Frame 115Symbol 735 MovieClip
"nextlevelbutton"Frame 115Symbol 738 MovieClip
"text_next_gold"Frame 115Symbol 783 EditableText
"text_tower_sell"Frame 115Symbol 784 EditableText
"text_tower_range"Frame 115Symbol 785 EditableText
"text_tower_damage"Frame 115Symbol 786 EditableText
"text_tower_level"Frame 115Symbol 787 EditableText
"text_towerinfo"Frame 115Symbol 789 EditableText
"text_towertype"Frame 115Symbol 790 EditableText
"text_enemy_hp"Frame 115Symbol 791 EditableText
"text_next_level"Frame 115Symbol 792 EditableText
"text_lives"Frame 115Symbol 793 EditableText
"text_gold"Frame 115Symbol 794 EditableText
"text_score"Frame 115Symbol 795 EditableText
"text_level"Frame 115Symbol 796 EditableText
"TheGrid1"Frame 115Symbol 766 MovieClip
"drawonme"Frame 115Symbol 769 MovieClip
"menu_playmore"Frame 120Symbol 642 MovieClip
"play_game"Frame 120Symbol 774 MovieClip
"end_nopath_hard_score"Frame 120Symbol 797 EditableText
"sponsor_mini"Frame 125Symbol 685 MovieClip
"select_mine"Frame 125Symbol 686 MovieClip
"buy_church"Frame 125Symbol 687 MovieClip
"restart_sure"Frame 125Symbol 690 MovieClip
"restart_no"Frame 125Symbol 693 MovieClip
"restart_yes"Frame 125Symbol 696 MovieClip
"text_prayer"Frame 125Symbol 799 EditableText
"buy_judgement"Frame 125Symbol 701 MovieClip
"buy_blizzard"Frame 125Symbol 703 MovieClip
"buy_angel_death"Frame 125Symbol 705 MovieClip
"text_next_prayer"Frame 125Symbol 800 EditableText
"tower_select_cannon"Frame 125Symbol 708 MovieClip
"tower_select_arrow"Frame 125Symbol 709 MovieClip
"tower_select_fire"Frame 125Symbol 710 MovieClip
"tower_select_arcane"Frame 125Symbol 711 MovieClip
"tower_select_ice"Frame 125Symbol 712 MovieClip
"text_nexttype"Frame 125Symbol 801 EditableText
"musicright"Frame 125Symbol 716 MovieClip
"musicmute"Frame 125Symbol 718 MovieClip
"musicleft"Frame 125Symbol 720 MovieClip
"restart_button"Frame 125Symbol 723 MovieClip
"pausebutton"Frame 125Symbol 726 MovieClip
"playbutton"Frame 125Symbol 729 MovieClip
"upgrade_tower"Frame 125Symbol 732 MovieClip
"sell_tower"Frame 125Symbol 735 MovieClip
"nextlevelbutton"Frame 125Symbol 738 MovieClip
"text_next_gold"Frame 125Symbol 802 EditableText
"text_tower_sell"Frame 125Symbol 803 EditableText
"text_tower_range"Frame 125Symbol 804 EditableText
"text_tower_damage"Frame 125Symbol 805 EditableText
"text_tower_level"Frame 125Symbol 806 EditableText
"text_towerinfo"Frame 125Symbol 808 EditableText
"text_towertype"Frame 125Symbol 809 EditableText
"text_enemy_hp"Frame 125Symbol 810 EditableText
"text_next_level"Frame 125Symbol 811 EditableText
"text_lives"Frame 125Symbol 812 EditableText
"text_gold"Frame 125Symbol 813 EditableText
"text_score"Frame 125Symbol 814 EditableText
"text_level"Frame 125Symbol 815 EditableText
"TheGrid1"Frame 125Symbol 766 MovieClip
"drawonme"Frame 125Symbol 769 MovieClip
"menu_playmore"Frame 130Symbol 642 MovieClip
"play_game"Frame 130Symbol 774 MovieClip
"end_nopath_insane_score"Frame 130Symbol 816 EditableText
"sponsor_mini"Frame 135Symbol 685 MovieClip
"select_mine"Frame 135Symbol 686 MovieClip
"buy_church"Frame 135Symbol 687 MovieClip
"restart_sure"Frame 135Symbol 690 MovieClip
"restart_no"Frame 135Symbol 693 MovieClip
"restart_yes"Frame 135Symbol 696 MovieClip
"text_prayer"Frame 135Symbol 818 EditableText
"buy_judgement"Frame 135Symbol 701 MovieClip
"buy_blizzard"Frame 135Symbol 703 MovieClip
"buy_angel_death"Frame 135Symbol 705 MovieClip
"text_next_prayer"Frame 135Symbol 819 EditableText
"tower_select_cannon"Frame 135Symbol 708 MovieClip
"tower_select_arrow"Frame 135Symbol 709 MovieClip
"tower_select_fire"Frame 135Symbol 710 MovieClip
"tower_select_arcane"Frame 135Symbol 711 MovieClip
"tower_select_ice"Frame 135Symbol 712 MovieClip
"text_nexttype"Frame 135Symbol 820 EditableText
"musicright"Frame 135Symbol 716 MovieClip
"musicmute"Frame 135Symbol 718 MovieClip
"musicleft"Frame 135Symbol 720 MovieClip
"restart_button"Frame 135Symbol 723 MovieClip
"pausebutton"Frame 135Symbol 726 MovieClip
"playbutton"Frame 135Symbol 729 MovieClip
"upgrade_tower"Frame 135Symbol 732 MovieClip
"sell_tower"Frame 135Symbol 735 MovieClip
"nextlevelbutton"Frame 135Symbol 738 MovieClip
"text_next_gold"Frame 135Symbol 821 EditableText
"text_tower_sell"Frame 135Symbol 822 EditableText
"text_tower_range"Frame 135Symbol 823 EditableText
"text_tower_damage"Frame 135Symbol 824 EditableText
"text_tower_level"Frame 135Symbol 825 EditableText
"text_towerinfo"Frame 135Symbol 827 EditableText
"text_towertype"Frame 135Symbol 828 EditableText
"text_enemy_hp"Frame 135Symbol 829 EditableText
"text_next_level"Frame 135Symbol 830 EditableText
"text_lives"Frame 135Symbol 831 EditableText
"text_gold"Frame 135Symbol 832 EditableText
"text_score"Frame 135Symbol 833 EditableText
"text_level"Frame 135Symbol 834 EditableText
"TheGrid1"Frame 135Symbol 766 MovieClip
"drawonme"Frame 135Symbol 769 MovieClip
"menu_playmore"Frame 140Symbol 642 MovieClip
"play_game"Frame 140Symbol 774 MovieClip
"end_nopath_sandbox_score"Frame 140Symbol 837 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1201 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns ..."
Protect (24)Timeline Frame 131 bytes "..$1$sx$i9nLr4icMFkT/Hiw4GxwO/."

Labels

"Game"Frame 20




http://swfchan.com/9/42601/info.shtml
Created: 9/5 -2019 21:04:23 Last modified: 9/5 -2019 21:04:23 Server time: 22/12 -2024 19:40:59