Frame 1
function myMenu1() {
visitSite("spon");
}
function myMenu2() {
visitSite("walk");
}
function myMenu3() {
visitSite("add");
}
function myMenu4() {
visitSite("dev");
}
function myMenu5() {
visitSite("MM1");
}
function myMenu6() {
visitSite("MM2");
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
Playtomic.Log.View(4863, "293fa53f631242b5", _root._url);
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == "kongregate.com") {
kongapi = true;
var kongregate = _global.kongregate;
kongregate.services.connect();
}
_global.kongsend = function (kng1, kng2) {
trace((kng1 + "=") + kng2);
if (kongapi == true) {
kongregate.stats.submit(kng1, kng2);
}
};
surv_allow = true;
levelpack = false;
lowprice = false;
unlockall = false;
_global.visitSite = function (lnk) {
switch (lnk) {
case "spon" :
Playtomic.Link.Open("http://www.kongregate.com/?gamereferral=mushroom-madness-3", "PlayMoreGames", "Sponsor");
setStat(10, 1);
break;
case "walk" :
Playtomic.Link.Open("http://www.kongregate.com/pages/mushroom-madness-3-walkthrough?gamereferral=mushroom-madness-3", "Walkthrough", "Sponsor");
break;
case "add" :
Playtomic.Link.Open("http://www.kongregate.com/games_for_your_site?gamereferral=mushroom-madness-3", "HostThisGame", "Sponsor");
setStat(10, 1);
break;
case "dev" :
Playtomic.Link.Open("http://www.silengames.com", "DeveloperLogo", "Developer");
break;
case "MM1" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/mushroom-madness?gamereferral=mushroom-madness-3", "Mushroom1", "Banners");
setStat(10, 1);
break;
case "MM2" :
Playtomic.Link.Open("http://www.kongregate.com/games/KingDotCom/mushroom-madness-2?gamereferral=mushroom-madness-3", "Mushroom2", "Banners");
setStat(10, 1);
break;
case "PPC" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/prizma-puzzle-challenges?gamereferral=mushroom-madness-3", "PrizmaPuzzle", "Banners");
setStat(10, 1);
break;
case "GSB" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/granny-strikes-back?gamereferral=mushroom-madness-3", "Granny", "Banners");
setStat(10, 1);
break;
case "FC" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/flying-candy?gamereferral=mushroom-madness-3", "FlyingCandy", "Banners");
setStat(10, 1);
break;
case "IG" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/icy-gifts?gamereferral=mushroom-madness-3", "IcyGifts", "Banners");
setStat(10, 1);
break;
case "TBW" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/the-bee-way?gamereferral=mushroom-madness-3", "TheBeeWay", "Banners");
setStat(10, 1);
break;
case "NP" :
Playtomic.Link.Open("http://www.kongregate.com/games/SilenGames/ninja-painter?gamereferral=mushroom-madness-3", "NinjaPainter", "Banners");
setStat(10, 1);
}
};
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(new ContextMenuItem("Play More Games", myMenu1));
myMenu.customItems.push(new ContextMenuItem("Video Walkthrough", myMenu2));
myMenu.customItems.push(new ContextMenuItem("Host This Game", myMenu3));
myMenu.customItems.push(new ContextMenuItem("Developer Site", myMenu4, true));
myMenu.customItems.push(new ContextMenuItem("Mushroom Madness 1", myMenu5, true));
myMenu.customItems.push(new ContextMenuItem("Mushroom Madness 2", myMenu6));
_root.menu = myMenu;
__com_mochibot__("0e11e751", this, 10301, true);
Frame 2
stop();
back.gotoAndStop(11);
percentDone = 0;
loadingbut.title = "PLAY GAME";
loadingbut._visible = false;
loadingbut.but.onRelease = function () {
Playtomic.Log.Play();
onEnterFrame = null;
gotoAndStop (3);
};
onEnterFrame = function () {
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
sizeTxt.text = ((loadedBytes + "kb/") + totalBytes) + "kb";
if (percentDone < Math.round((loadedBytes / totalBytes) * 100)) {
percentDone++;
percentTxt.text = percentDone + "%";
}
preloaderBar.img._xscale = 10 + (percentDone * 3);
if (percentDone >= 100) {
loadingbut._visible = true;
sizeTxt._visible = false;
percentTxt._visible = false;
loadingTxt._visible = false;
preloaderBar._visible = false;
}
};
Frame 3
stop();
Frame 4
stop();
Instance of Symbol 2479 MovieClip in Frame 4
on (release) {
visitSite("dev");
}
Frame 5
str_but_menu = "MENU";
str_menu_game = "Game Menu";
str_but_resume = "RESUME GAME";
str_but_quit = "SAVE & EXIT";
str_but_restart = "RESTART";
str_but_lvlsel = "LEVEL SELECT";
str_menu_diff = "Select Difficulty";
str_but_easy = "EASY";
str_but_normal = "NORMAL";
str_but_hard = "HARD";
str_menu_cont = "Continue Saved Game?";
str_but_cont = "CONTINUE";
str_but_new = "NEW GAME";
str_menu_stage = "Choose a Level";
str_but_unlim = "UPGRADE";
str_menu_mini = "Credits";
str_menu_score = "Send Score";
str_menu_option = "Game Options";
str_but_sound_off = "SOUND: OFF";
str_but_sound_on = "SOUND: ON";
str_but_music_off = "MUSIC: OFF";
str_but_music_on = "MUSIC: ON";
str_but_effect_off = "VFX: OFF";
str_but_effect_on = "VFX: ON";
str_but_hint_off = "HINTS: OFF";
str_but_hint_on = "HINTS: ON";
str_but_back = "CANCEL";
str_menu_main = "Main Menu";
str_but_start = "ADVENTURE";
str_but_mini = "MINI-GAMES";
str_but_score = "SCORES";
str_but_help = "HOW TO PLAY";
str_but_option = "OPTIONS";
str_but_credit = "CREDITS";
str_but_more = "MORE GAMES";
str_but_host = "HOST THIS GAME";
str_menu_upgr = "Upgrade Menu";
str_menu_achi = "Achievements";
str_but_next = "NEXT LEVEL";
str_menu_comp = "Level Complete!";
str_menu_victory = "Congratulations! You Have Won!";
str_score_1 = "ENEMIES";
str_score_2 = "COINS";
str_score_3 = "MUSHROOMS";
str_menu_over = "Game Over";
str_but_try = "TRY AGAIN";
str_menu_hint = "Tutorial";
str_menu_cong = "Congratulations!";
str_menu_bonus = "Bonus Level";
str_menu_bonusd = "Try to find a safe with diamonds.";
str_menu_unlock = "Mini-Game Unlocked!";
str_menu_mini = "Mini-Games";
str_upgr_1 = "FIREARMS DAMAGE";
str_upgr_2 = "BLAST RADIUS";
str_upgr_3 = "TESLA POWER";
str_upgr_4 = "TRAPS POWER";
str_upgr_5 = "RATE OF FIRE";
str_upgr_6 = "AMMO CAPACITY";
str_upgr_7 = "STUN DURATION";
str_upgr_8 = "ITEM MAGNET";
str_upgr_9 = "MONEY RATE";
str_upgr_101 = "SHOE";
str_upgr_102 = "RACKET";
str_upgr_103 = "FRYING PAN";
str_upgr_104 = "BRASSIE";
str_upgr_105 = "CLUB";
str_upgr_106 = "SPADE";
str_upgr_107 = "MALLET";
str_upgr_108 = "MACE";
str_upgr_109 = "SHOCKER";
str_upgr_1010 = "HAMMER";
str_upgr_11 = "AUTO CLICK";
str_upgr_12 = "AUTO MAGNET";
str_upgr_13 = "RANDOM GUN";
str_upgr_14 = "UNLIM AMMO";
str_desc_1 = "Increases firearms damage";
str_desc_2 = "Increases blast radius for rockets and bombs";
str_desc_3 = "Increases lightning bolts\u2019 attack range and damage";
str_desc_4 = "Traps and Tesla Mines catch more enemies";
str_desc_5 = "Increases rate of fire";
str_desc_6 = "Increases ammo capacity";
str_desc_7 = "Increases stun duration after a strong hit";
str_desc_8 = "Increases item pickup range";
str_desc_9 = "Increases value of coins and diamonds";
str_desc_10 = "Change primary weapon";
str_desc_11 = "Primary weapon attacks automatically!";
str_desc_12 = "Items pickups automatically!";
str_desc_13 = "Get a random weapon in the beginning of every level!";
str_desc_14 = "Unlimited weapon ammo! Doesn't work in Survival mode.";
str_achi_0 = "HEDGEHOGS";
str_achi_1 = "BIRDIES";
str_achi_2 = "SPIDERS";
str_achi_3 = "RABBITS";
str_achi_4 = "OWLS";
str_achi_5 = "MOLES";
str_achi_6 = "SILVER COINS";
str_achi_7 = "GOLD COINS";
str_achi_8 = "BIG DIAMONDS";
str_achi_9 = "DESTROY TREES";
str_achi_10 = "MAX COMBO";
str_achi_11 = "OPEN CARTON";
str_achi_12 = "OPEN BOX";
str_achi_13 = "SILVER SAFE";
str_achi_14 = "GOLD SAFE";
str_achi_15 = "LAUNCH NUKE";
str_achi_16 = "ANIMALS TRAPPED";
str_achi_17 = "GLADES";
str_achi_18 = "MUSHROOMS";
str_achi_19 = "BOMBS/TRAPS LEFT";
str_achi_20 = "HEARTS LEFT";
str_achi_21 = "ARMADILLOS";
str_achi_22 = "SNAKES";
str_achi_23 = "BATS";
str_achi_24 = "HEDGEHOG KINGS";
str_achi_25 = "CRYSTALS";
str_achi_26 = "BLACK SAFE";
str_hint_11 = ["Primary Attack", "Use left button to attack. Hold left button to hit stronger."];
str_hint_12 = ["Drop Weapon", "Press space bar or click the icon in the lower right corner of the screen to drop your weapon."];
str_hint_13 = ["Bombs and Traps", "To use a trap or a bomb, click its icon in the lower part of the screen and deploy it in the desired location."];
str_hint_14 = ["Hot Keys", "1,2,3,4,5,6 \u2013 select bomb or mine; ESC or P \u2013 pause and game menu; M \u2013 mute sound and music"];
str_hint_21 = ["Mushrooms", "Defend mushroom glades from hungry animals."];
str_hint_22 = ["Coins", "Collect all coins! You can use them in the shop. Silver coin - $10. Gold coin - $20. Use the cursor to pick up coins."];
str_hint_23 = ["Diamond", "Diamonds are much more expensive than coins. Small diamond - $50. Large diamond - $250."];
str_hint_24 = ["Crystals", "Destroy crystals to get small diamonds."];
str_hint_25 = ["Cardboard Box", "These boxes can be destroyed with any weapons, they contain guns."];
str_hint_26 = ["Wooden Box", "These boxes can be destroyed by bombs or guns, they contain bombs or traps."];
str_hint_27 = ["Black Safe", "These safes can be opened with a key, they contain a single weapon, bombs and traps."];
str_hint_28 = ["Silver Safe", "These safes can be opened with a key, they contain many coins and small diamonds."];
str_hint_29 = ["Gold Safe", "These vaults can be opened with three keys. Vast riches await inside!"];
str_hint_31 = ["Hedgehog", "Thrifty hedgehogs steal mushrooms and take them into their burrows. Stop them before they are too far away!"];
str_hint_32 = ["Bear", "Bears eat a lot. They will quickly eat all mushrooms if you don\u2019t hurry!"];
str_hint_33 = ["Bird", "Birds are dangerous because they can steal mushrooms quickly, but sometimes they bring useful weapons."];
str_hint_34 = ["Spider", "Spiders are very quick. If you catch one, it will start raining and new mushrooms will grow."];
str_hint_35 = ["Hare", "Hares don\u2019t like to eat mushrooms, but they like to dig them out. Recover these mushrooms quickly!"];
str_hint_36 = ["Owl", "Owls like mushrooms too. If you don\u2019t believe it, check it yourself."];
str_hint_37 = ["Mole", "Beware of the moles! They can burrow close to the glade and easily steal the mushrooms."];
str_hint_38 = ["Snake", "If a snake eats a mushroom, it will... fly away. Don\u2019t ask why, just catch it quickly!"];
str_hint_39 = ["Bat", "Bats bring keys, bombs and other useful items. On the other hand, they can steal mushrooms!"];
str_hint_310 = ["Armadillo", "Armadillos are quick and can roll up into a ball, this increases their armor drastically. In this case hit them hard!"];
str_hint_311 = ["Hedgehog King", "This hedgehog can steal all mushrooms at once! It is very difficult to stop, use traps and bombs!"];
str_hint_41 = ["Pistol", "Fires a rubber ball that can bounce and hit another enemy. Hold mouse button for automatic fire."];
str_hint_42 = ["Assault Rifle", "Fires simple bullets, has decent rate of fire."];
str_hint_43 = ["Shotgun", "Fires several bullets at once. Great against tough enemies."];
str_hint_44 = ["Gattling Gun", "A dangerous weapon! Continuous shooting will increase its rate of fire."];
str_hint_45 = ["Tesla Gun", "Fires bolts of electricity. The bolt can arc through several enemies."];
str_hint_46 = ["Rocket Launcher", "A deadly weapon! Destroys everything in its path, but the ammunition is scarce!"];
str_hint_47 = ["Flash Grenade", "Blinds and immobilizes the enemies. Destroys a moles, spiders, bats and flying snakes."];
str_hint_48 = ["Bomb", "Inflicts massive damage within a large blast radius."];
str_hint_49 = ["Nuke", "Do not use this weapon under any circumstances! You were warned."];
str_hint_410 = ["Trap", "Set up a trap to catch animals. One trap can catch several enemies."];
str_hint_411 = ["Mine", "Set up a mine that will explode if an animal steps on it."];
str_hint_412 = ["Tesla Mine", "Electrocutes all enemies around itself for several seconds."];
gotoAndStop ("Functions");
Frame 15
modes = new Array();
modes[1] = ["Animal Rush", 1, 10, 5, 15, "Repel the invasion with unlimited ammo"];
modes[2] = ["Adventure", 0, 15, 0, 14, "Defend the mushrooms from hungry animals. Tutorial levels."];
modes[3] = ["Survival", 6, 15, 0, 0, "Defend the glades as long as possible!"];
modes[4] = ["New Adventure", 0, 15, 30, 26, "Defend more mushrooms from hungry animals. A lot of fun!"];
modes[5] = ["Animal Lair", 4, 10, 15, 27, "Endless waves of animals attack from lairs. Destroy all lairs."];
modes[6] = ["Vault Defense", 2, 10, 50, 16, "Don't let the animal get into the vault"];
modes[7] = ["Swarm Assault", 5, 10, 100, 17, "Protect a large mushroom field from reckless animals"];
modes[8] = ["Safe Breaker", 3, 5, 10, 0, "Try to unlock as many safes as possible. Paid game!"];
modes[9] = ["Bat Catcher", 7, 5, 40, 0, "Catch bats and collect as many diamonds as you can. Paid game!"];
tgachi = new Array();
tgachi[0] = [1, 100, 1000, 5000];
tgachi[1] = [10, 100];
tgachi[2] = [10000, 100000];
tgachi[3] = [30, 100];
tgachi[4] = [50];
tgachi[5] = [10];
tgachi[6] = [15, 90];
tgachi[7] = [30, 100, 210];
tgachi[8] = [10, 40];
tgachi[9] = [10, 60];
tgachi[10] = [1];
tgachi[11] = [1];
tgachi[12] = [1];
tgachi[13] = [1];
tgachi[14] = [15];
tgachi[15] = [10];
tgachi[16] = [10];
tgachi[17] = [10];
tgachi[18] = [100];
tgachi[19] = [100];
tgachi[20] = [100];
tgachi[21] = [50];
tgachi[22] = [30];
tgachi[23] = [1000];
tgachi[24] = [30];
tgachi[25] = [30];
tgachi[26] = [15];
tgachi[27] = [10];
tgachi[28] = [50];
but00cost = 100;
but01cost = 1000;
but02cost = 5000;
but03cost = 10000;
but10cost = 500;
but11cost = 2000;
but20cost = 1000;
but21cost = 10000;
but30cost = 750;
but31cost = 3000;
but40cost = 1000;
but50cost = 10000;
but60cost = 1000;
but61cost = 5000;
but70cost = 2000;
but71cost = 10000;
but72cost = 20000;
but80cost = 5000;
but81cost = 20000;
but90cost = 500;
but91cost = 3000;
but100cost = 1000;
but110cost = 1000;
but120cost = 1000;
but130cost = 150;
but140cost = 10000;
but150cost = 10000;
but160cost = 10000;
but170cost = 10000;
but180cost = 9000;
but190cost = 1000;
but200cost = 5000;
but210cost = 1000;
but220cost = 3000;
but230cost = 1000;
but240cost = 3000;
but250cost = 1000;
but260cost = 10000;
but270cost = 10000;
but280cost = 2000;
but00title = "First Step";
but00desc = "Send your first enemy away";
but01title = "Novice";
but01desc = ("Send " + tgachi[0][1]) + " enemies away";
but02title = "Hunter";
but02desc = ("Send " + tgachi[0][2]) + " enemies away!";
but03title = "Animals' Bane";
but03desc = ("Send " + tgachi[0][3]) + " enemies away!";
but10title = "Mushroomer";
but10desc = ("Save " + tgachi[1][0]) + " glades";
but11title = "Mushroom Guardian";
but11desc = ("Save " + tgachi[1][1]) + " glades!";
but20title = "Rich Man";
but20desc = ("Earn " + tgachi[2][0]) + "$";
but21title = "Oligarch";
but21desc = ("Earn " + tgachi[2][1]) + "$!";
but30title = "Breaker";
but30desc = ("Open " + tgachi[3][0]) + " crates";
but31title = "Crusher";
but31desc = ("Open " + tgachi[3][1]) + " crates!";
but40title = "Locked and Loaded";
but40desc = ("Use " + tgachi[4][0]) + " guns";
but50title = "VIP Customer";
but50desc = "Upgrade primary weapon";
but60title = "Researcher";
but60desc = ("Get " + tgachi[6][0]) + " upgrades";
but61title = "Genius";
but61desc = "Get all upgrades!";
but70title = "Veteran";
but70desc = ("Complete " + tgachi[7][0]) + " quests";
but71title = "Hero";
but71desc = ("Complete " + tgachi[7][1]) + " quests";
but72title = "Superhero";
but72desc = "Complete all quests!";
but80title = "Tough One";
but80desc = ("Achieve Level " + tgachi[8][0]) + " in Survival";
but81title = "Immortal";
but81desc = ("Achieve Level " + tgachi[8][1]) + " in Survival";
but90title = "Newbie";
but90desc = "Play 10 minutes";
but91title = "Experienced";
but91desc = "Play 1 hour";
but100title = "Thank you!";
but100desc = "Click 'More Games' button";
but110title = "I am clever!";
but110desc = "Read the tutorial";
but120title = "Welcome Back!";
but120desc = "Launch the game once more";
but130title = "Pioneer";
but130desc = "Complete the first level";
but140title = "Glade Defender";
but140desc = "Complete Adventure levels";
but150title = "Frontier Guard";
but150desc = "Complete Animal Rush levels";
but160title = "Vault Keeper";
but160desc = "Complete Vault Defense levels";
but170title = "Swarm' Nightmare";
but170desc = "Complete Swarm Assault levels";
but180title = "Again and Again";
but180desc = ("Begin any " + tgachi[18][0]) + " levels";
but190title = "Woodcutter";
but190desc = ("Cut " + tgachi[19][0]) + " trees";
but200title = "Miner";
but200desc = ("Destroy " + tgachi[20][0]) + " crystals";
but210title = "Trapper";
but210desc = ("Set up " + tgachi[21][0]) + " mines and traps";
but220title = "Combo Master";
but220desc = ("Get " + tgachi[22][0]) + " combo";
but230title = "Shooter";
but230desc = ("Hit and shoot " + tgachi[23][0]) + " times";
but240title = "Nike It";
but240desc = ("Launch " + tgachi[24][0]) + " nukes";
but250title = "Stonemason";
but250desc = ("Destroy " + tgachi[25][0]) + " animal lairs";
but260title = "Ultimate Defender";
but260desc = "Complete New Adventure levels";
but270title = "Lair Destroyer";
but270desc = "Complete Animal Lair levels";
but280title = "Key Master";
but280desc = ("Open " + tgachi[28][0]) + " safes";
selectMine = function (x) {
if (mines[x + 7] > 0) {
if (_root.curr_mine == x) {
_root["mine" + x].img.select._visible = false;
_root.curr_mine = 0;
_root.cursor.gotoAndStop(_root.pre_weap);
} else {
_root["mine" + x].img.select._visible = true;
_root["mine" + _root.curr_mine].img.select._visible = false;
if (_root.curr_mine == 0) {
_root.pre_weap = _root.cursor._currentframe;
_root.pre_ammo = _root.cursor.ammo;
}
_root.curr_mine = x;
_root.cursor.gotoAndStop(_root.curr_mine + 7);
}
_root.cursor._xscale = (_root.cursor._yscale = 140);
}
};
_global.saveGame = function () {
my_so.data.savedone = true;
my_so.data.surscore = surscore;
my_so.data.money = money;
my_so.data.sound = sound;
my_so.data.music = music;
my_so.data.hint = hint;
my_so.data.modeselect = modeselect;
i = 1;
while (i < 10) {
j = 1;
while (j <= modes[i][2]) {
my_so.data[("sav" + i) + j] = sav[i][j];
j++;
}
i++;
}
i = 1;
while (i < 15) {
my_so.data["upgr" + i] = upgr[i];
i++;
}
trace("SAVE STAT...");
i = 0;
while (i < tgachi.length) {
j = 0;
while (j < tgachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
i++;
}
trace("SAVE END...");
my_so.flush();
};
_global.loadGame = function () {
if (my_so.data.savedone == undefined) {
savedone = true;
sound = true;
music = true;
hint = true;
upgr = new Array();
gachi = new Array();
stat = new Array();
sav = new Array();
i = 1;
while (i < 10) {
sav[i] = new Array();
i++;
}
resetGame();
} else {
savedone = my_so.data.savedone;
surscore = my_so.data.surscore;
money = my_so.data.money;
sound = my_so.data.sound;
music = my_so.data.music;
hint = my_so.data.hint;
modeselect = my_so.data.modeselect;
upgr = new Array();
gachi = new Array();
stat = new Array();
sav = new Array();
i = 1;
while (i < 10) {
sav[i] = new Array();
j = 1;
while (j <= modes[i][2]) {
sav[i][j] = my_so.data[("sav" + i) + j];
j++;
}
i++;
}
i = 1;
while (i < 15) {
upgr[i] = my_so.data["upgr" + i];
i++;
}
handnum = upgr[10];
trace("LOAD STAT...");
i = 0;
while (i < tgachi.length) {
gachi[i] = new Array();
j = 0;
while (j < tgachi[i].length) {
if (my_so.data[("gachi" + i) + j] != undefined) {
gachi[i][j] = my_so.data[("gachi" + i) + j];
} else {
break;
}
j++;
}
stat[i] = my_so.data["stat" + i];
i++;
}
setStat(12, 1);
}
vipChange();
setUpgr();
};
_global.resetGame = function () {
surscore = 0;
money = 0;
handnum = 1;
modeselect = 2;
i = 1;
while (i < 10) {
j = 1;
while (j <= modes[i][2]) {
if (j == 1) {
sav[i][j] = [-1, 0, 0];
} else {
sav[i][j] = [-2, 0, 0];
}
j++;
}
i++;
}
i = 1;
while (i < 15) {
upgr[i] = 1;
i++;
}
i = 0;
while (i < tgachi.length) {
stat[i] = 0;
gachi[i] = new Array();
j = 0;
while (j < tgachi[i].length) {
gachi[i][j] = tgachi[i][j];
j++;
}
i++;
}
vipChange();
};
_global.getStarDone = function (z) {
xx = 0;
if (z == 0) {
x = 1;
y = 9;
} else {
x = z;
y = z;
}
i = x;
while (i <= y) {
j = 1;
while (j <= modes[i][2]) {
if (_root.sav[i][j][0] > -1) {
xx = xx + ((_root.sav[i][j][0] + _root.sav[i][j][1]) + _root.sav[i][j][2]);
}
j++;
}
i++;
}
return(xx);
};
_global.getLevelDone = function (z) {
xx = 0;
if (z == 0) {
x = 1;
y = 9;
} else {
x = z;
y = z;
}
i = x;
while (i <= y) {
j = 1;
while (j <= modes[i][2]) {
if (_root.sav[i][j][0] > -1) {
xx++;
}
j++;
}
i++;
}
return(xx);
};
_global.setUpgr = function () {
shellShot = 6;
damGun = 1 + (0.15 * (upgr[1] - 1));
radRocket = 100 + (5 * (upgr[2] - 1));
radBomb = 140 + (7 * (upgr[2] - 1));
damTesla = 1 + (0.1 * (upgr[3] - 1));
hitTesla = 3 + Math.round(0.4 * (upgr[3] - 1));
radTesla = 140 + (7 * (upgr[3] - 1));
bonusKap = 4 + (1 * (upgr[4] - 1));
bonusTesla = 15 + (3 * (upgr[4] - 1));
bonusReload = 1 + (0.05 * (upgr[5] - 1));
clipPistol = 16 + (2 * (upgr[6] - 1));
clipGun = 26 + (3 * (upgr[6] - 1));
clipShot = 12 + (1 * (upgr[6] - 1));
clipTesla = 16 + (2 * (upgr[6] - 1));
clipGauss = 50 + (4 * (upgr[6] - 1));
clipRocket = 5 + Math.round(0.5 * (upgr[6] - 1));
stupor = 90 + (10 * (upgr[7] - 1));
bonusMagnet = 1 + (0.2 * (upgr[8] - 1));
bonusDeposit = 1 + (0.1 * (upgr[9] - 1));
handnum = upgr[10];
};
_global.addStat = function (type, amount) {
stat[type] = stat[type] + amount;
testGachi(type);
};
_global.setStat = function (type, amount) {
if (amount > stat[type]) {
stat[type] = amount;
}
testGachi(type);
};
_global.testGachi = function (type) {
j = 0;
while (j < gachi[type].length) {
if (gachi[type][j] != -1) {
if (stat[type] >= gachi[type][j]) {
gachi[type][j] = -1;
gachilogo.play();
gachilogo.title = _root[(("but" + type) + j) + "title"];
gachilogo.desc = _root[(("but" + type) + j) + "desc"];
gachilogo.cost = _root[(("but" + type) + j) + "cost"];
money = money + gachilogo.cost;
addStat(2, gachilogo.cost);
warachi.gotoAndPlay(2);
}
}
j++;
}
};
_global.mineHere = function (ob) {
if (colmap[ob.ytile][ob.xtile] == 4) {
jm = 0;
while (jm < bankMine.length) {
if ((bankMine[jm].xtile == ob.xtile) and (bankMine[jm].ytile == ob.ytile)) {
achi[16]++;
x1 = bankMine[jm]._x + 24;
y1 = bankMine[jm]._y + 16;
colmap[ob.ytile][ob.xtile] = 1;
bankMine[jm].removeMovieClip();
bankMine.splice(jm, 1);
playSound("explo");
quake = 6;
if (ob.cargo > 0) {
if (ob.cargonum > 0) {
ii = 1;
while (ii <= ob.cargonum) {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
ii++;
}
} else {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
}
}
dieEnemy(ob);
castExplo(x1, y1, radBomb);
break;
}
jm++;
}
}
};
_global.castTesla = function (xx, yy) {
pre_att = _root.cursor;
k = 0;
while (k < hitTesla) {
att_num = 0;
att_dist = radTesla;
jt = 0;
while (jt < bankEnemy.length) {
zz = bankEnemy[jt];
if (zz != pre_att) {
tx = bankEnemy[jt]._x;
ty = bankEnemy[jt]._y;
if (zz.type == 3) {
ty = ty + zz.bird._y;
} else if (((zz.type != 6) and (zz.type != 7)) and (zz.type != 9)) {
tx = tx + 24;
}
dist = point_distance(xx, yy, tx, ty);
if (dist > 10) {
if (dist < att_dist) {
att_num = jt;
att_dist = dist;
xxx = tx;
yyy = ty;
}
}
}
jt++;
}
if (att_dist < radTesla) {
obj = levelmap.attachMovie("teslahit", "part", levelmap.getNextHighestDepth());
obj._x = xx;
obj._y = yy;
obj._xscale = att_dist;
obj._rotation = point_direction(xx, yy, xxx, yyy);
pre_att = bankEnemy[att_num];
xx = xxx;
yy = yyy;
switch (pre_att.type) {
case 0 :
case 1 :
case 5 :
case 8 :
attackEnemy(pre_att, 10 * damTesla, 1);
break;
case 2 :
attackEnemy(pre_att, 5 * damTesla, 4);
break;
case 3 :
case 6 :
attackEnemy(pre_att, 15 * damTesla, 5);
break;
case 4 :
case 9 :
attackSpider(pre_att);
break;
case 7 :
attackEnemy(pre_att, 15 * damTesla, 7);
break;
case 10 :
attackEnemy(pre_att, 3 * damTesla, 9);
}
} else {
break;
}
k++;
}
};
_global.castStun = function () {
js = 0;
while (js < bankEnemy.length) {
switch (bankEnemy[js].type) {
case 0 :
case 1 :
case 5 :
attackEnemy(bankEnemy[js], 0, 1);
break;
case 2 :
attackEnemy(bankEnemy[js], 0, 4);
break;
case 3 :
case 6 :
attackEnemy(bankEnemy[js], 0, 5);
break;
case 4 :
case 9 :
attackSpider(bankEnemy[js]);
js--;
break;
case 7 :
attackEnemy(bankEnemy[js], 100, 0);
js--;
break;
case 8 :
if (bankEnemy[js].flying == false) {
attackEnemy(bankEnemy[js], 0, 1);
} else {
attackEnemy(bankEnemy[js], 500, 0);
js--;
}
break;
case 10 :
attackEnemy(bankEnemy[js], 0, 8);
}
js++;
}
flashobj.gotoAndPlay(2);
};
_global.castExplo = function (xx, yy, type) {
if (type < 150) {
num = 1;
} else {
num = 2;
}
i = 0;
while (i < bankTree.length) {
zz = bankTree[i];
if (point_distance(xx, yy, zz._x, zz._y) < type) {
attackTree(zz, 40, 1);
if (zz.img._currentframe < 5) {
if (effect == true) {
dam = 15;
while (dam--) {
createPart((zz._x - 75) + random(150), (zz._y - 30) - random(130), "list", levelmap.getNextHighestDepth(), 1, zz._currentframe);
}
}
}
}
i++;
}
i = 0;
while (i < bankChest.length) {
zz = bankChest[i];
if (point_distance(xx - 24, yy, zz._x, zz._y) < type) {
if (zz._currentframe < 4) {
attackChest(zz, 200);
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
zz = bankEnemy[i];
if (zz.type == 3) {
if (point_distance(xx, yy - zz.bird._y, zz._x, zz._y) < type) {
attackEnemy(zz, 100, 0);
}
} else if (zz.type == 6) {
if (point_distance(xx, yy, zz._x, zz._y) < type) {
attackEnemy(zz, 100, 0);
}
} else if (point_distance(xx - 24, yy, zz._x, zz._y) < type) {
switch (zz.type) {
case 0 :
case 1 :
case 5 :
case 7 :
case 8 :
attackEnemy(zz, 100, 1);
break;
case 2 :
attackEnemy(zz, 70, 4);
break;
case 4 :
case 9 :
attackSpider(zz);
break;
case 10 :
attackEnemy(zz, 50, 8);
}
}
i++;
}
createGroundPart(xx, yy, "crack");
createPart(xx, yy, "explo" + num, levelmap.getNextHighestDepth(), 1);
};
_global.castHitEnemy = function (zz) {
switch (zz.z.type) {
case 0 :
case 1 :
if (random(10) > 3) {
attackEnemy(zz.z, 20 * zz.damx, 2);
} else {
attackEnemy(zz.z, 20 * zz.damx, 1);
}
break;
case 5 :
case 8 :
if (random(10) > 3) {
attackEnemy(zz.z, 30 * zz.damx, 2);
} else {
attackEnemy(zz.z, 30 * zz.damx, 1);
}
break;
case 2 :
if (_root.cursor._currentframe == 4) {
attackEnemy(zz.z, 10 * zz.damx, 4);
} else {
attackEnemy(zz.z, 10 * zz.damx, 3);
}
break;
case 3 :
attackEnemy(zz.z, 30 * zz.damx, 6);
break;
case 4 :
case 9 :
attackSpider(zz.z);
break;
case 6 :
attackEnemy(zz.z, 20 * zz.damx, 6);
break;
case 7 :
attackEnemy(zz.z, 30 * zz.damx, 7);
break;
case 10 :
attackEnemy(zz.z, 5 * zz.damx, 9);
}
};
_global.castHitChest = function (zz) {
switch (zz.z._currentframe) {
case 2 :
attackChest(zz.z, 35 * zz.damx);
playSoundLim("box1d1", "box1d2");
break;
case 3 :
attackChest(zz.z, 25 * zz.damx);
playSoundLim("box2d1", "box2d2");
}
};
sound_delay = 0;
_global.playSoundLim = function () {
if (sound_delay == 0) {
if (sound == true) {
soundmap.gotoAndStop(arguments[random(arguments.length)]);
sound_delay = 2;
}
}
};
_global.playSound = function () {
if (sound == true) {
soundmap.gotoAndStop(arguments[random(arguments.length)]);
}
};
_global.playVocal = function () {
if (sound == true) {
do {
x = 1 + random(12);
} while (vocal_pre == x);
vocal_pre = x;
soundmap.gotoAndStop("vocal_" + x);
}
};
_global.playMusic = function (z) {
if (muzcur != z) {
musicmap.gotoAndStop("stop");
}
if (z != "stop") {
if (z != "pre") {
muzcur = z;
}
if (music == true) {
if (muzcur == "muz") {
muznum = (lvl % 4) + 1;
musicmap.gotoAndStop("muz_" + muznum);
} else {
musicmap.gotoAndStop(muzcur);
}
}
}
};
_global.hitPoint = function (x, y, ob) {
if (x > (ob._x + ob.w1)) {
if (x < (ob._x + ob.w2)) {
if (y > (ob._y + ob.h1)) {
if (y < (ob._y + ob.h2)) {
return(true);
}
}
}
}
};
_global.openScreen = function (ob, type) {
trans_delay = true;
trans.tar = ob;
if (type == true) {
trans.gotoAndPlay(17);
} else {
trans.gotoAndPlay(2);
}
if (_root.sound) {
menubut2.ib1.gotoAndStop(1);
} else {
menubut2.ib1.gotoAndStop(2);
}
if (_root.music) {
menubut2.ib2.gotoAndStop(1);
} else {
menubut2.ib2.gotoAndStop(2);
}
};
_global.openMenu = function (ob, type) {
reload = 4;
if (ob == "exit") {
_root.paused = false;
Mouse.hide();
_root.cursor._visible = true;
} else {
if (ob == "back") {
ob = gamemenu.backmenu;
}
_root.paused = true;
Mouse.show();
_root.cursor._visible = false;
_root.menubut._visible = false;
}
gamemenu.backmenu = gamemenu.tar;
gamemenu.tar = ob;
if (type == true) {
gamemenu.gotoAndStop(ob);
_root.paused = true;
Mouse.show();
_root.cursor._visible = false;
} else {
gamemenu.close = true;
gamemenu._xscale = (gamemenu._yscale = 120);
}
if (_root.sound) {
menubut2.ib1.gotoAndStop(1);
} else {
menubut2.ib1.gotoAndStop(2);
}
if (_root.music) {
menubut2.ib2.gotoAndStop(1);
} else {
menubut2.ib2.gotoAndStop(2);
}
};
_global.showLogo = function (ob) {
if (ob == 0) {
logo.gotoAndPlay(16);
} else {
paused = true;
logo.gotoAndPlay(2);
logo.img.gotoAndPlay(ob);
}
};
_global.huntKrot = function (ob) {
buftemp.length = 0;
i = 0;
while (i < bankFood.length) {
z = bankFood[i];
if (z.count > 0) {
j = 0;
while (j < 8) {
if (z.krot[j] == false) {
buftemp.push(z);
break;
}
j++;
}
}
i++;
}
if (buftemp.length == 0) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
} else {
z = buftemp[random(buftemp.length)];
ob.food = z;
do {
ob.place = random(8);
} while (z.krot[ob.place] == true);
ob._x = z._x + krotxy[ob.place][0];
ob._y = z._y + krotxy[ob.place][1];
ob.gotoAndStop(ob.place + 2);
}
};
_global.huntEnemy = function (ob) {
if (ob.cargo == false) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food != undefined) {
tarx = ob.food.xtile;
tary = ob.food.ytile;
} else {
do {
tarx = 1 + random(14);
tary = 1 + random(14);
} while (colmap[tarx][tary] == 0);
}
} else {
tarx = ob.xstart;
tary = ob.ystart;
}
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
};
_global.huntVor = function (ob) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food == undefined) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
} else {
ob._y = ob.food._y + 18;
}
};
_global.huntSova = function (ob) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food == undefined) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
} else {
ob._x = ob.food._x + 24;
}
};
_global.huntSpider = function (ob) {
if (ob.act < 2) {
do {
tarx = 2 + random(12);
tary = 2 + random(12);
} while (colmap[tarx][tary] == 0);
} else {
tarx = ob.xstart;
tary = ob.ystart;
}
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
};
_global.huntBat = function (ob) {
if (ob.step > 0) {
ob.flyx = 120 + random(580);
ob.flyy = 90 + random(400);
} else if ((ob.info > 0) || (minigame == 1)) {
ob.flyx = ob.xstart * tileW;
ob.flyy = ob.ystart * tileH;
ob.step--;
} else if (ob.cargo == false) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food != undefined) {
ob.flyx = ob.food._x + 24;
ob.flyy = ob.food._y;
} else {
ob.step++;
}
} else {
ob.flyx = ob.xstart * tileW;
ob.flyy = ob.ystart * tileH;
}
ob.dir = -1 * point_direction(ob._x, ob._y, ob.flyx, ob.flyy);
};
_global.huntKrolik = function (ob) {
if (ob.step > 0) {
do {
tarx = 2 + random(12);
tary = 2 + random(12);
} while (colmap[tarx][tary] == 0);
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
} else {
huntEnemy(ob);
}
};
_global.moveSet = function (ob) {
targetx = ob.path[z][1];
targety = ob.path[z][0];
ob.path.length = z;
ob.dirx = 0;
ob.diry = 0;
imin = ob.imin._currentframe;
if (targetx > ob.xtile) {
ob.dirx = 4;
ob.gotoAndStop(2);
}
if (targetx < ob.xtile) {
ob.dirx = -4;
ob.gotoAndStop(6);
}
if (targety > ob.ytile) {
ob.diry = 3;
if (ob.dirx == 0) {
ob.gotoAndStop(8);
} else if (ob.dirx > 0) {
ob.gotoAndStop(9);
} else {
ob.gotoAndStop(7);
}
}
if (targety < ob.ytile) {
ob.diry = -3;
if (ob.dirx == 0) {
ob.gotoAndStop(4);
} else if (ob.dirx > 0) {
ob.gotoAndStop(3);
} else {
ob.gotoAndStop(5);
}
}
if (ob.armor == true) {
ob.gotoAndStop(ob._currentframe + 24);
}
if (ob.type == 100) {
ob.imin._yscale = 100;
}
ob.imin.gotoAndPlay(imin);
};
_global.moveEnemy = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) and (((ob._y - tileH) % tileH) == 0)) {
ob.xtile = Math.floor(ob._x / tileW);
ob.ytile = Math.floor(ob._y / tileH);
z = ob.path.length - 1;
mineHere(ob);
if (colmap[ob.ytile][ob.xtile] == 3) {
j = 0;
while (j < bankKap.length) {
if (bankKap[j]._currentframe == 23) {
if ((bankKap[j].xtile == ob.xtile) and (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 2) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life--;
}
if (ob.cargo > 0) {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
}
dieEnemy(ob);
break;
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.cargo == false) {
if (ob.food.count > 0) {
ob.cargo = (ob.grib._visible = true);
ob.grib.gotoAndStop(ob.food.type);
ob.grib._xscale = (ob.grib._yscale = 10);
ob.grib.grib.gotoAndStop(1);
ob.food["grib" + ob.food.count]._visible = false;
ob.food.count--;
if (ob.armor == true) {
ob.armor = false;
ob.speed = 0.5;
}
if (ob.type == 8) {
ob.flying = true;
ob.act = 3;
ob.moving = -999;
ob.gotoAndStop("eat");
playSound("beareat");
} else {
huntEnemy(ob);
}
} else {
ob.food = undefined;
huntEnemy(ob);
}
} else {
if ((ob.xtile == ob.xstart) or (ob.ytile == ob.ystart)) {
dieFood(ob);
}
huntEnemy(ob);
}
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.moveBig = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) and (((ob._y - tileH) % tileH) == 0)) {
ob.xtile = Math.floor(ob._x / tileW);
ob.ytile = Math.floor(ob._y / tileH);
z = ob.path.length - 1;
mineHere(ob);
if (colmap[ob.ytile][ob.xtile] == 3) {
j = 0;
while (j < bankKap.length) {
if (bankKap[j]._currentframe == 23) {
if ((bankKap[j].xtile == ob.xtile) and (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 6) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life = bankKap[j].life - 5;
}
if (ob.cargo > 0) {
if (ob.cargonum > 0) {
ii = 1;
while (ii <= ob.cargonum) {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
ii++;
}
}
}
dieEnemy(ob);
break;
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.cargo == false) {
if (ob.food.count > 0) {
ob.cargo = true;
ob.cargonum = ob.food.count;
ii = 1;
while (ii <= ob.food.count) {
ob["grib" + ii]._visible = true;
ob["grib" + ii].gotoAndStop(ob.food.type);
ob["grib" + ii]._xscale = (ob["grib" + ii]._yscale = 10);
ob["grib" + ii].grib.gotoAndStop(1);
ii++;
}
ob.food.grib1._visible = false;
ob.food.grib2._visible = false;
ob.food.grib3._visible = false;
ob.food.grib4._visible = false;
ob.food.grib5._visible = false;
ob.food.count = 0;
huntEnemy(ob);
} else {
ob.food = undefined;
huntEnemy(ob);
}
} else {
if ((ob.xtile == ob.xstart) or (ob.ytile == ob.ystart)) {
dieFood(ob);
}
huntEnemy(ob);
}
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.moveMedved = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) and (((ob._y - tileH) % tileH) == 0)) {
ob.xtile = Math.floor(ob._x / tileW);
ob.ytile = Math.floor(ob._y / tileH);
z = ob.path.length - 1;
mineHere(ob);
if (colmap[ob.ytile][ob.xtile] == 3) {
j = 0;
while (j < bankKap.length) {
if (bankKap[j]._currentframe == 23) {
if ((bankKap[j].xtile == ob.xtile) and (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 4) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life = bankKap[j].life - 3;
}
dieEnemy(ob);
return(undefined);
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
ob.eating = 43;
ob.gotoAndStop(10);
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.moveSpider = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) and (((ob._y - tileH) % tileH) == 0)) {
ob.xtile = Math.floor(ob._x / tileW);
ob.ytile = Math.floor(ob._y / tileH);
z = ob.path.length - 1;
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.act == 3) {
delEnemy(ob);
} else {
ob.moving = -15 - random(15);
ob.act++;
ob.spid.stop();
}
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.moveKrolik = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) and (((ob._y - tileH) % tileH) == 0)) {
ob.xtile = Math.floor(ob._x / tileW);
ob.ytile = Math.floor(ob._y / tileH);
z = ob.path.length - 1;
mineHere(ob);
ob.img.play();
if (colmap[ob.ytile][ob.xtile] == 3) {
j = 0;
while (j < bankKap.length) {
if (bankKap[j]._currentframe == 23) {
if ((bankKap[j].xtile == ob.xtile) and (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 2) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life--;
}
dieEnemy(ob);
break;
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.step < 1) {
ob.moving = -30;
ob.gotoAndStop("att");
ob.img.play();
if (ob.food.count > 0) {
playSound("dig1", "dig2");
ob.food["grib" + ob.food.count]._visible = false;
ob.food.count--;
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
}
ob.food = undefined;
ob.step = random(3);
} else {
ob.moving = -25 - random(25);
ob.step--;
ob.img.gotoAndStop(1);
}
huntKrolik(ob);
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.diePrize = function (ob) {
i = 0;
while (i < bankPrize.length) {
if (bankPrize[i] == ob) {
bankPrize.splice(i, 1);
break;
}
i++;
}
ob.removeMovieClip();
};
_global.dieFood = function (ob) {
if (ob.cargonum == undefined) {
achi[18]--;
} else {
achi[18] = achi[18] - ob.cargonum;
}
if (ob.food.count == 0) {
die = 0;
i = 0;
while (i < bankEnemy.length) {
if (bankEnemy[i] != ob) {
if (bankEnemy[i].cargo == true) {
if (bankEnemy[i].food == ob.food) {
die = 1;
break;
}
}
}
i++;
}
if (die == 0) {
i = 0;
while (i < bankPrize.length) {
if (bankPrize[i].info == ob.info) {
if (bankPrize[i] != ob) {
die = 1;
break;
}
}
i++;
}
}
if (die == 0) {
ob.food.kill = true;
createScore(ob.food._x, ob.food._y, 3);
playSound("vocal_13");
i = 0;
while (i < bankFood.length) {
if (bankFood[i] == ob.food) {
achi[17]--;
bankFood.splice(i, 1);
break;
}
i++;
}
if (bankFood.length == 0) {
playMusic("stop");
if (minigame != 6) {
showLogo(4);
} else {
openMenu("send");
}
}
}
} else {
createScore(ob.food._x, ob.food._y, 2);
}
if (ob.isEnemy == true) {
if (ob.type != 2) {
if (ob.lair != undefined) {
ob.lair.count--;
}
i = 0;
while (i < bankEnemy.length) {
if (bankEnemy[i] == ob) {
bankEnemy.splice(i, 1);
break;
}
i++;
}
ob.removeMovieClip();
}
}
};
_global.dieBird = function (ob) {
i = 0;
while (i < bankEnemy.length) {
if (bankEnemy[i] == ob) {
bankEnemy.splice(i, 1);
break;
}
i++;
}
ob.removeMovieClip();
};
_global.delEnemy = function (ob) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
if ((minigame == 1) or ((minigame == 2) and (ob.type != 9))) {
life--;
achi[20]--;
quake = 3;
if (minigame == 2) {
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
if (lostlifesnd == false) {
playSound("vocal_13");
lostlifesnd = true;
}
} else {
playSound("vocal_13");
}
}
ob.removeMovieClip();
};
_global.dieEnemy = function (ob) {
i--;
combo++;
if (ob.lair != undefined) {
ob.lair.count--;
}
addStat(0, 1);
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
switch (ob.type) {
case 0 :
playSound("snkdie1", "snkdie2");
achi[21]++;
createPrize(ob._x + 24, ob._y + 18, 9, 1);
createPart(ob._x + 24, ob._y + 10, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 18, "hulk6", levelmap.getNextHighestDepth(), 6);
}
ob.removeMovieClip();
break;
case 1 :
playSound("heddie1", "heddie2");
achi[0]++;
createPrize(ob._x + 24, ob._y + 18, 2, 1);
createPart(ob._x + 24, ob._y + 10, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 18, "hulk3", levelmap.getNextHighestDepth(), 6);
}
ob.removeMovieClip();
break;
case 2 :
playSound("beard1", "beard2");
ob.moving = -500;
ob.eating = 0;
ob.gotoAndPlay(13);
createPrize(ob._x + 24, ob._y + 18, 2, 2);
break;
case 4 :
playSound("spiddie");
achi[2]++;
ob.moving = -500;
ob.gotoAndPlay(10);
createPart(ob._x + 24, ob._y, "damage1", levelmap.getNextHighestDepth(), 1);
if ((minigame == 1) or (minigame == 2)) {
createPrize(ob._x + 24, ob._y + 18, 1, 1);
}
break;
case 3 :
playSound("bird1", "bird2");
achi[1]++;
createPrize(ob._x, ob._y + ob.bird._y, 2, 1, 0);
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
if (ob.info > 0) {
if (ob.info < 7) {
createWeap(ob._x, ob._y + ob.bird._y, 1 + ob.info, 0);
} else {
createPrize(ob._x, ob._y + ob.bird._y, ob.info, 1, 0);
}
}
if (effect == true) {
createPart(ob._x, ob._y + ob.bird._y, "pero", levelmap.getNextHighestDepth(), 8);
}
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 6 :
playSound("owl1", "owl2");
achi[4]++;
createPrize(ob._x, ob._y + ob.bird._y, 2, 1, 0);
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
if (ob.info > 0) {
createPrize(ob._x, ob._y + ob.bird._y, 2 + ob.info, 1, 0);
}
if (effect == true) {
createPart(ob._x, ob._y + ob.bird._y, "pero2", levelmap.getNextHighestDepth(), 8);
}
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 5 :
playSound("krold1", "krold2");
achi[3]++;
createPrize(ob._x + 24, ob._y + 18, 1, 1);
createPart(ob._x + 24, ob._y + 10, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 7 :
ob.food.krot[ob.place] = false;
playSound("heddie1", "heddie2");
achi[5]++;
createPrize(ob._x, ob._y, 2, 2);
createPart(ob._x, ob._y, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 8 :
playSound("snkdie1", "snkdie2");
achi[22]++;
createPrize(ob._x + 24, ob._y + 18, 2, 1);
createPart(ob._x + 24, ob._y + 14, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 9 :
playSound("batdie1", "batdie2");
achi[23]++;
if ((minigame != 2) and (minigame != 7)) {
createPrize(ob._x, ob._y, 2, 1, 0);
}
if (ob.info > 0) {
createPrize(ob._x, ob._y, ob.info + 6, 1, 0);
}
createPart(ob._x, ob._y, "batdie", levelmap.getNextHighestDepth(), 1);
createPart(ob._x, ob._y, "damage1", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 10 :
playSound("hegbigdie");
achi[24]++;
createPrize(ob._x + 24, ob._y + 18, 8, 1);
createPart(ob._x + 4, ob._y, "boom", levelmap.getNextHighestDepth(), 1);
createPart(ob._x + 54, ob._y, "boom", levelmap.getNextHighestDepth(), 1);
createPart(ob._x + 24, ob._y + 20, "boom", levelmap.getNextHighestDepth(), 1);
createPart(ob._x + 24, ob._y - 20, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 18, "hulk5", levelmap.getNextHighestDepth(), 12);
}
ob.removeMovieClip();
}
};
_global.dieChest = function (ob) {
i--;
j = 0;
while (j < bankChest.length) {
if (bankChest[j] == ob) {
bankChest.splice(j, 1);
break;
}
j++;
}
switch (ob._currentframe) {
case 2 :
addStat(3, 1);
achi[11]++;
playSound("box1");
createPrize(ob._x + 24, ob._y + 10, 1, 3);
createPrize(ob._x + 24, ob._y + 10, 2, 2);
createWeap(ob._x + 24, ob._y + 10, 0);
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 10, "hulk1", levelmap.getNextHighestDepth(), 8);
}
break;
case 3 :
addStat(3, 1);
achi[12]++;
playSound("box2");
createPrize(ob._x + 24, ob._y + 10, 1, 2);
createPrize(ob._x + 24, ob._y + 10, 2, 4);
createMineWeap(ob._x + 24, ob._y + 10, 0);
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 10, "hulk2", levelmap.getNextHighestDepth(), 8);
}
break;
case 4 :
addStat(28, 1);
achi[13]++;
if (minigame != 3) {
createPrize(ob._x + 24, ob._y + 10, 1, 8);
createPrize(ob._x + 24, ob._y + 10, 9, 4);
} else {
switch (ob.info) {
case 0 :
createPrize(ob._x + 24, ob._y + 10, 7, 3);
break;
case 1 :
createEnemy(ob.xtile, ob.ytile, 4);
break;
case 2 :
createPrize(ob._x + 24, ob._y + 10, 1, 10);
break;
case 3 :
createPrize(ob._x + 24, ob._y + 10, 2, 10);
}
}
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
break;
case 5 :
addStat(28, 1);
achi[26]++;
createMineWeap(ob._x + 24, ob._y + 10, 0);
createMineWeap(ob._x + 24, ob._y + 10, 0);
createMineWeap(ob._x + 24, ob._y + 10, 0);
createWeap(ob._x + 24, ob._y + 10, 0);
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
break;
case 6 :
addStat(28, 1);
achi[14]++;
if (minigame != 3) {
createPrize(ob._x + 24, ob._y + 10, 2, 8);
createPrize(ob._x + 24, ob._y + 10, 9, 5);
createPrize(ob._x + 24, ob._y + 10, 8, 3);
} else {
switch (ob.info) {
case 0 :
case 1 :
createPrize(ob._x + 24, ob._y + 10, 9, 10);
break;
case 2 :
case 3 :
createPrize(ob._x + 24, ob._y + 10, 8, 6);
}
}
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
}
colmap[ob.ytile][ob.xtile] = 1;
ob.removeMovieClip();
};
_global.objCount = 0;
_global.createEnemy = function (x, y, type, info, lair) {
objCount++;
obj = levelmap.attachMovie("enemy" + type, "enemy" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = x * tileW;
obj._y = y * tileH;
obj.type = type;
obj.info = info;
obj.lair = lair;
lair = undefined;
obj.id = objCount;
obj.isEnemy = true;
bankEnemy.push(obj);
};
_global.createLair = function (x, y, type, info) {
objCount++;
obj = levelmap.attachMovie("lairobj", "lair" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
obj.xtile = x;
obj.ytile = y;
if (type > 1) {
if (random(10) < 5) {
obj._xscale = -100;
}
}
obj.cry = 2;
obj.info = info;
obj.gotoAndStop(type);
obj.img.gotoAndStop(1);
bankTree.push(obj);
bankLair++;
};
_global.createChest = function (x, y, type, info) {
objCount++;
obj = levelmap.attachMovie("chest", "chest" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
obj.info = info;
obj.gotoAndStop(type);
bankChest.push(obj);
};
_global.createWall = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("wall", "wall" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = x * tileW;
obj._y = y * tileH;
obj.gotoAndStop(type);
bankWall.push(obj);
};
_global.createLake = function (x, y) {
objCount++;
obj = back.img.attachMovie("lakeobj", "lake" + objCount, objCount);
obj._x = (x * tileW) - 390;
obj._y = (y * tileH) - 282;
bankFlow.push(obj);
};
_global.createTree = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("tree", "tree" + objCount, (((y * tileH) + 1) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
if (weather < 6) {
obj.gotoAndStop(weather + random(6));
} else {
obj.gotoAndStop(weather + 5);
}
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
obj.cry = 0;
obj.normtree = true;
bankTree.push(obj);
createShad(x, y);
obj.info = z;
};
_global.createBush = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("bushobj", "bush" + objCount, (((y * tileH) + 1) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
if (weather < 6) {
obj.gotoAndStop(weather + random(6));
} else {
obj.gotoAndStop(weather + 5);
}
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
obj.cry = 0;
bankTree.push(obj);
createShad(x, y);
obj.info = z;
};
_global.createCrystal = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("crystal", "crystal" + objCount, (((y * tileH) + 1) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
obj.gotoAndStop(random(4) + 1);
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
obj.cry = 1;
bankTree.push(obj);
obj.info = z;
};
_global.prizeCount = 0;
_global.createPrize = function (x, y, type, count, info) {
jj = 1;
while (jj <= count) {
prizeCount++;
obj = levelmap.attachMovie("prize", "prize" + prizeCount, 10000000 + prizeCount);
obj._x = x;
obj._y = y;
obj.type = type;
obj.gotoAndStop(type);
obj.info = info;
bankPrize.push(obj);
jj++;
}
};
_global.createMineWeap = function (x, y, type, info) {
prizeCount++;
obj = levelmap.attachMovie("prize", "prize" + prizeCount, 10000000 + prizeCount);
obj._x = x;
obj._y = y;
if (type == 0) {
do {
type = 8 + random(6);
} while ((lvl < weapin[type]) & (lvlmode == 2));
}
obj.gotoAndStop(type + 2);
obj.info = info;
bankPrize.push(obj);
};
_global.createWeap = function (x, y, type, info) {
prizeCount++;
obj = levelmap.attachMovie("weap", "weap" + prizeCount, 10000000 + prizeCount);
obj._x = x;
obj._y = y;
if (type == 0) {
do {
type = 2 + random(6);
} while ((lvl < weapin[type]) & (lvlmode == 2));
}
obj.gotoAndStop(type);
obj.info = info;
bankWeap.push(obj);
};
_global.createFlow = function (x, y) {
objCount++;
obj = back.img.attachMovie("flow", "flow" + objCount, objCount);
obj._x = ((x * tileW) + random(28)) - 404;
obj._y = ((y * tileH) + random(16)) - 290;
obj.gotoAndStop(1 + random(5));
bankFlow.push(obj);
};
_global.createRoad = function (x, y, type) {
objCount++;
obj = back.img.attachMovie("road", "road" + objCount, objCount);
obj._x = (x * tileW) - 390;
obj._y = (y * tileH) - 272;
obj.gotoAndStop(type);
bankFlow.push(obj);
};
_global.createShad = function (x, y) {
objCount++;
z = back.img.attachMovie("tree_s", "tree_s" + objCount, objCount);
z._x = (x * tileW) - 390;
z._y = (y * tileH) - 282;
if (random(10) < 5) {
z._xscale = -100;
}
bankFlow.push(z);
};
_global.createFood = function (x, y, count) {
objCount++;
obj = levelmap.attachMovie("food", "food" + objCount, objCount);
colmap[y][x] = 2;
obj._x = x * tileW;
obj._y = y * tileH;
obj.type = 1 + random(4);
obj.count = count;
bankFood.push(obj);
};
_global.createKap = function (x, y) {
objCount++;
obj = levelmap.attachMovie("kap", "kap" + objCount, objCount);
colmap[y][x] = 3;
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
obj.life = bonusKap;
bankKap.push(obj);
};
_global.createMine = function (x, y) {
objCount++;
obj = levelmap.attachMovie("mineobj", "mineobj" + objCount, objCount);
colmap[y][x] = 4;
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
bankMine.push(obj);
};
_global.createTesla = function (x, y) {
objCount++;
obj = levelmap.attachMovie("teslaobj", "teslaobj" + objCount, objCount);
colmap[y][x] = 4;
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
bankTesla.push(obj);
};
_global.createPart = function (x, y, type, depth, count, info) {
j = 1;
while (j <= count) {
obj = levelmap.attachMovie(type, "part", depth + j);
obj._x = x;
obj._y = y;
if ((type == "list") || (type == "bushflow")) {
obj.gotoAndStop(info);
}
j++;
}
};
_global.createGroundPart = function (x, y, type) {
obj = partmap.attachMovie(type, "part", partmap.getNextHighestDepth());
obj._x = x;
obj._y = y;
};
_global.createInterPart = function (x, y, type) {
obj = _root.attachMovie(type, "part", _root.getNextHighestDepth());
obj._x = x;
obj._y = y;
};
_global.createScore = function (x, y, type) {
obj = levelmap.attachMovie("scoreobj", "score", levelmap.getNextHighestDepth());
obj._x = x + 24;
obj._y = y + 18;
obj.gotoAndStop(type);
};
_global.showMines = function (type) {
j = 1;
while (j < 7) {
z = _root["mine" + j];
if (_root.mines[7 + j] > 0) {
z.title = "x" + _root.mines[7 + j];
z._alpha = 100;
z.but._visible = true;
} else {
z.title = "x0";
z._alpha = 30;
z.but._visible = false;
}
z.gotoAndStop(1);
z.img.gotoAndStop(j);
if (type == true) {
z._visible = true;
} else {
z._visible = false;
}
j++;
}
};
_global.addMine = function (type) {
achi[19]++;
mines[type]++;
z = _root["mine" + (type - 7)];
z.title = "x" + mines[type];
z._alpha = 100;
z.but._visible = true;
};
_global.useMine = function () {
achi[19]--;
curr_mine = 0;
mines[cursor._currentframe]--;
z = _root["mine" + (cursor._currentframe - 7)];
z.title = "x" + mines[cursor._currentframe];
z.img.select._visible = false;
if (_root.mines[cursor._currentframe] == 0) {
z.gotoAndStop(1);
z._alpha = 30;
z.but._visible = false;
}
cursor.gotoAndStop(pre_weap);
cursor.ammopip.gotoAndStop(3);
cursor.ammo = pre_ammo;
reload = 3;
};
_global.clearLevel = function () {
curr_money = 0;
power = 0;
magnit = (win = false);
alarmEnemy = 0;
key = 0;
pre_weap = 1;
pre_ammo = 0;
cursor.gotoAndStop(1);
logo.gotoAndStop(1);
ammopip.gotoAndStop(1);
butdrop._visible = false;
inter._visible = false;
menubut._visible = false;
prog._visible = false;
inter_level._visible = false;
inter_lvlmode._visible = false;
prog.img._xscale = 0;
mini_inter._visible = false;
back.img.lin._visible = false;
colmap = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
showMines(false);
curr_mine = 0;
j = 1;
while (j < 7) {
z = _root["mine" + j].img.select;
z._visible = false;
j++;
}
j = 8;
while (j < 14) {
_root.mines[j] = 0;
j++;
}
j = 0;
while (j < 27) {
achi[j] = 0;
j++;
}
j = 0;
while (j < bankEnemy.length) {
bankEnemy[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankChest.length) {
bankChest[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankWall.length) {
bankWall[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankTree.length) {
bankTree[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankPrize.length) {
bankPrize[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankWeap.length) {
bankWeap[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankFlow.length) {
bankFlow[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankFood.length) {
bankFood[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankKap.length) {
bankKap[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankMine.length) {
bankMine[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankTesla.length) {
bankTesla[j].removeMovieClip();
j++;
}
objCount = 0;
wallCount = 0;
prizeCount = 0;
bankEnemy.length = 0;
bankPrize.length = 0;
bankWeap.length = 0;
bankWall.length = 0;
bankTree.length = 0;
bankFood.length = 0;
bankKap.length = 0;
bankMine.length = 0;
bankChest.length = 0;
bankFlow.length = 0;
wavexy.length = 0;
while (levelmap.prize != undefined) {
levelmap.prize.removeMovieClip();
}
while (levelmap.part != undefined) {
levelmap.part.removeMovieClip();
}
};
_global.lengthdir_x = function (len, dir) {
return(Math.cos((dir * Math.PI) / 180) * len);
};
_global.lengthdir_y = function (len, dir) {
return((-Math.sin((dir * Math.PI) / 180)) * len);
};
_global.point_distance = function (x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)));
};
_global.point_direction = function (x1, y1, x2, y2) {
return((Math.atan2(y2 - y1, x2 - x1) / Math.PI) * 180);
};
_global.choose = function () {
return(arguments[random(arguments.length)]);
};
_global.findPath = function (map, startX, startY, endX, endY) {
var _local18 = 10;
var _local12 = 14;
var _local16 = true;
var _local15 = false;
isOpen = function (y, x) {
return(mapStatus[y][x].open);
};
isClosed = function (y, x) {
return(mapStatus[y][x].closed);
};
nearerSquare = function () {
var _local4 = 999999 /* 0x0F423F */;
var _local5 = 0;
var _local2;
var _local3;
var _local1 = openList.length;
while ((_local1--) > 0) {
_local3 = mapStatus[openList[_local1][0]][openList[_local1][1]];
_local2 = _local3.heuristic + _local3.movementCost;
if (_local2 <= _local4) {
_local4 = _local2;
_local5 = _local1;
}
}
return(_local5);
};
closeSquare = function (y, x) {
var _local2 = openList.length;
var _local1 = 0;
while (_local1 < _local2) {
if (openList[_local1][0] == y) {
if (openList[_local1][1] == x) {
openList.splice(_local1, 1);
break;
}
}
_local1++;
}
mapStatus[y][x].open = false;
mapStatus[y][x].closed = true;
};
openSquare = function (y, x, parent, movementCost, heuristic, replacing) {
if (!replacing) {
openList.push([y, x]);
mapStatus[y][x] = {heuristic:heuristic, open:true, closed:false};
}
mapStatus[y][x].parent = parent;
mapStatus[y][x].movementCost = movementCost;
};
var _local10 = map.length;
var _local17 = map[0].length;
var mapStatus = new Array();
var _local11 = 0;
while (_local11 < _local10) {
mapStatus[_local11] = new Array();
_local11++;
}
if ((startY == undefined) || (startX == undefined)) {
return(null);
}
if ((endY == undefined) || (endX == undefined)) {
return(null);
}
var openList = new Array();
openSquare(startY, startX, undefined, 0);
while ((openList.length > 0) && (!isClosed(endY, endX))) {
_local11 = nearerSquare();
var _local6 = openList[_local11][0];
var _local7 = openList[_local11][1];
closeSquare(_local6, _local7);
var _local2 = _local6 - 1;
while (_local2 < (_local6 + 2)) {
var _local1 = _local7 - 1;
while (_local1 < (_local7 + 2)) {
if (((((((_local2 >= 0) && (_local2 < _local10)) && (_local1 >= 0)) && (_local1 < _local17)) && (!((_local2 == _local6) && (_local1 == _local7)))) && ((_local16 || (_local2 == _local6)) || (_local1 == _local7))) && (((_local15 || (_local2 == _local6)) || (_local1 == _local7)) || ((map[_local2][_local7] != 0) && (map[_local6][_local1])))) {
if (map[_local2][_local1] != 0) {
if (!isClosed(_local2, _local1)) {
var _local3 = mapStatus[_local6][_local7].movementCost + (((_local2 == _local6) || (_local1 == _local7)) ? (_local18) : (_local12));
if (isOpen(_local2, _local1)) {
if (_local3 < mapStatus[_local2][_local1].movementCost) {
openSquare(_local2, _local1, [_local6, _local7], _local3, undefined, true);
}
} else {
var _local5 = (Math.abs(_local2 - endY) + Math.abs(_local1 - endX)) * 10;
openSquare(_local2, _local1, [_local6, _local7], _local3, _local5, false);
}
}
}
}
_local1++;
}
_local2++;
}
}
var _local27 = isClosed(endY, endX);
delete isOpen;
delete isClosed;
delete nearerSquare;
delete closeSquare;
delete openSquare;
if (_local27) {
var _local22 = new Array();
var _local6 = endY;
var _local7 = endX;
while ((_local6 != startY) || (_local7 != startX)) {
_local22.push([_local6, _local7]);
var _local19 = mapStatus[_local6][_local7].parent[0];
var _local20 = mapStatus[_local6][_local7].parent[1];
_local6 = _local19;
_local7 = _local20;
}
_local22.push([startY, startX]);
return(_local22);
}
return(null);
};
ASSetPropFlags(_global, "findPath", 1, 0);
gotoAndStop ("Controller");
Frame 25
var musicVol = new Sound(musicmap);
musicVol.setVolume(0);
var my_so = SharedObject.getLocal("mushroom-madness-3za", "/");
var keyListener = new Object();
Key.addListener(keyListener);
paused = true;
cursor._visible = false;
cursor.ammopip.stop();
mousePressed = false;
magnit = false;
hintnum = 1;
quake = 0;
total_ms = 0;
total_sec = 0;
alarmEnemy = 0;
spawnTimer = 0;
power = 0;
reload = 0;
combo = 0;
key = 0;
minigame = 0;
lvl = 0;
lvl_temp = 1;
mini_diff = 0;
muznum = 1;
muzcur = "muz_0";
effect = true;
achi = new Array();
_global.bankEnemy = new Array();
_global.bankFood = new Array();
_global.bankWall = new Array();
_global.bankTree = new Array();
_global.bankKap = new Array();
_global.bankMine = new Array();
_global.bankTesla = new Array();
_global.bankChest = new Array();
_global.bankPrize = new Array();
_global.bankWeap = new Array();
_global.bankFlow = new Array();
_global.tileW = 48;
_global.tileH = 36;
buftemp = new Array();
krotxy = new Array();
krotxy[0] = [75, 17];
krotxy[1] = [59, -10];
krotxy[2] = [24, -20];
krotxy[3] = [-10, -10];
krotxy[4] = [-24, 17];
krotxy[5] = [-10, 45];
krotxy[6] = [24, 56];
krotxy[7] = [59, 45];
mines = new Array();
mines[8] = 0;
mines[9] = 0;
mines[10] = 0;
mines[11] = 0;
mines[12] = 0;
mines[13] = 0;
weapin = new Array();
weapin[2] = 1;
weapin[3] = 4;
weapin[4] = 8;
weapin[5] = 6;
weapin[6] = 10;
weapin[7] = 12;
weapin[8] = 1;
weapin[9] = 7;
weapin[10] = 14;
weapin[11] = 5;
weapin[12] = 9;
weapin[13] = 11;
hintin = new Array();
hintin[1] = [[3, 5], [2, 1], [1, 1], [2, 2]];
hintin[2] = [[3, 1], [4, 1], [2, 5], [1, 2]];
hintin[3] = [[3, 8], [4, 7], [2, 6], [1, 3]];
hintin[4] = [[3, 4], [2, 4], [4, 2], [2, 3]];
hintin[5] = [[3, 2], [2, 7], [4, 10], [1, 4]];
hintin[6] = [[3, 9], [2, 8], [4, 5]];
hintin[7] = [[3, 6], [4, 8]];
hintin[8] = [[3, 7], [2, 9], [4, 3]];
hintin[9] = [[3, 10], [4, 11]];
hintin[10] = [[4, 4]];
hintin[11] = [[3, 3], [4, 12]];
hintin[12] = [[4, 6]];
hintin[13] = [[3, 11]];
hintin[14] = [[4, 9]];
wavew = new Array();
wavew[0] = 20;
wavew[1] = 20;
wavew[2] = 30;
wavew[4] = 10;
wavew[5] = 12;
wavew[8] = 30;
wavew[10] = 40;
wavel = new Array();
wavel[0] = 80;
wavel[1] = 0;
wavel[2] = 20;
wavel[4] = 100;
wavel[5] = 50;
wavel[8] = 0;
wavel[10] = 80;
wavexy = new Array();
wavexy[0] = [0, 0];
wavexy[1] = [0, 0];
wavexy[2] = [0, 0];
wavexy[3] = [0, 0];
wavep = new Array();
handpow = 1;
handtype = new Array();
handatt = new Array();
handtype[1] = [0, 1];
handtype[2] = [0, 1];
handtype[3] = [0, 1];
handtype[4] = [0, 1];
handtype[5] = [0, 1];
handtype[6] = [0, 1];
handtype[7] = [0, 3];
handtype[8] = [0, 5];
handtype[9] = [0, 2];
handtype[10] = [0, 4];
handatt[1] = 0.7;
handatt[2] = 0.9;
handatt[3] = 1.1;
handatt[4] = 1.3;
handatt[5] = 1.5;
handatt[6] = 1.7;
handatt[7] = 1.9;
handatt[8] = 2.2;
handatt[9] = 2.3;
handatt[10] = 2.6;
_global.loadLevel = function () {
if (_root.sound) {
menubut.ib1.gotoAndStop(1);
} else {
menubut.ib1.gotoAndStop(2);
}
if (_root.music) {
menubut.ib2.gotoAndStop(1);
} else {
menubut.ib2.gotoAndStop(2);
}
maxlvl = getLevelDone(2);
setUpgr();
cursor.ammopip._visible = true;
cursor.ammopip.gotoAndStop(1);
handnum = upgr[10];
cursor.lopata.gotoAndStop(handnum);
cursor.lopata.rad._visible = false;
if (randweap == true) {
cursor.gotoAndStop(2 + random(6));
}
bankLair = 0;
diff = 1;
key = 0;
inter._visible = true;
lostlifesnd = false;
alarmEnemy = 0;
spawnTimer = 0;
reload = 10;
life = 10;
mini_inter._visible = true;
back.img.lin._visible = false;
inter_lvlmode._visible = true;
inter_lvlmode.text = modes[lvlmode][0];
switch (minigame) {
case 0 :
inter_lvlmode.text = inter_lvlmode.text + (" - Level " + lvl);
mini_inter.gotoAndStop(1);
break;
case 1 :
inter_lvlmode.text = inter_lvlmode.text + (" - Level " + lvl);
mini_inter.gotoAndStop(2);
mini_diff = lvl;
back.img.lin._visible = true;
z = _root[(("mode" + lvlmode) + "spw") + lvl];
i = 0;
while (i < z.length) {
wavexy[i] = [z[i][0], z[i][1]];
i++;
}
switch (mini_diff) {
case 1 :
cursor.gotoAndStop(5);
break;
case 2 :
cursor.gotoAndStop(6);
break;
case 3 :
cursor.gotoAndStop(4);
break;
case 4 :
cursor.gotoAndStop(7);
break;
case 5 :
cursor.gotoAndStop(3);
break;
case 6 :
cursor.gotoAndStop(5);
break;
case 7 :
cursor.gotoAndStop(2);
break;
case 8 :
cursor.gotoAndStop(1);
break;
case 9 :
cursor.gotoAndStop(7);
break;
case 10 :
cursor.gotoAndStop(5);
}
cursor.ammopip._visible = false;
break;
case 2 :
inter_lvlmode.text = inter_lvlmode.text + (" - Level " + lvl);
mini_inter.gotoAndStop(2);
inter_level._visible = true;
inter_level.text = "Wave 1/5";
alarmEnemy = 0;
mini_diff = -1;
break;
case 3 :
inter_lvlmode.text = inter_lvlmode.text + (" - Bonus " + lvl);
mini_inter._visible = false;
magnit = true;
key = lvl;
handnum = 1;
cursor.gotoAndStop(1);
cursor.lopata.gotoAndStop(handnum);
break;
case 4 :
inter_lvlmode.text = inter_lvlmode.text + (" - Level " + lvl);
mini_inter.gotoAndStop(1);
break;
case 5 :
inter_lvlmode.text = inter_lvlmode.text + (" - Level " + lvl);
mini_inter.gotoAndStop(1);
mini_diff = lvl;
z = _root[(("mode" + lvlmode) + "spw") + lvl];
i = 0;
while (i < z.length) {
wavexy[i] = [z[i][0], z[i][1]];
i++;
}
break;
case 6 :
unlimammo = false;
mini_inter._visible = false;
mini_diff = lvl;
inter_level.text = "Wave " + mini_diff;
mini_prize = Math.ceil(1 + (mini_diff / 8));
alarmEnemy = 30;
spawnTimer = 2 + (mini_diff * 3);
inter_level._visible = true;
break;
case 7 :
inter_lvlmode.text = inter_lvlmode.text + (" - Bonus " + lvl);
mini_bat = 5 * lvl;
mini_inter._visible = false;
magnit = true;
handnum = 1;
cursor.gotoAndStop(1);
cursor.lopata.gotoAndStop(handnum);
}
if (mini_inter._visible == true) {
i = 0;
while (i < 3) {
z = mini_inter["but" + i];
z.gotoAndStop(1);
z.type = _root[(("mode" + lvlmode) + "achi") + lvl][i][0];
z.need = _root[(("mode" + lvlmode) + "achi") + lvl][i][1];
z.quest.gotoAndStop(z.type + 1);
z.txt1.text = 0;
z.txt2.text = "/" + z.need;
i++;
}
}
if ((minigame < 2) || (minigame == 5)) {
if (minigame == 0) {
spawnLength = _root[(("mode" + lvlmode) + "spw") + lvl].length / 2;
} else {
spawnLength = 50;
}
progStep = 3.33 / spawnLength;
}
k = 0;
ww = 0;
if (((lvlmode == 3) || (lvlmode == 7)) || (lvlmode == 9)) {
m = _root[("mode" + lvlmode) + "lvl"];
} else {
m = _root[(("mode" + lvlmode) + "lvl") + lvl];
}
i = 0;
while (i < 17) {
j = 0;
while (j < 17) {
z = Number(m.substr(k, 2));
mode = Math.floor(z / 10);
k = k + 2;
if (minigame == 2) {
colmap[j][i] = 0;
} else {
colmap[j][i] = 1;
}
switch (mode) {
case 0 :
switch (z) {
case 1 :
createFlow(i, j);
break;
case 2 :
createTree(i, j, 1);
colmap[j][i] = 0;
break;
case 3 :
createTree(i, j, 4);
colmap[j][i] = 0;
break;
case 4 :
createBush(i, j, 1);
colmap[j][i] = 0;
break;
case 5 :
createBush(i, j, 4);
colmap[j][i] = 0;
break;
case 6 :
createCrystal(i, j, 1);
colmap[j][i] = 0;
break;
case 7 :
createCrystal(i, j, 3);
colmap[j][i] = 0;
break;
case 8 :
createLake(i, j);
colmap[j][i] = 0;
break;
case 9 :
createPit(i, j);
}
break;
case 1 :
colmap[j][i] = 0;
createWall(i, j, z - 9);
break;
case 2 :
colmap[j][i] = 0;
createChest(i, j, z - 18);
break;
case 3 :
colmap[j][i] = 1;
createFood(i, j, z - 29);
break;
case 4 :
createWeap((i * tileW) + 24, (j * tileH) + 18, z - 38);
break;
case 5 :
createPrize((i * tileW) + 24, (j * tileH) + 18, z - 43, 1, 1);
break;
case 6 :
if (z != 67) {
colmap[j][i] = 1;
}
createRoad(i, j, z - 59);
break;
case 7 :
createLair(i, j, z - 69);
}
j++;
}
i++;
}
if (minigame == 2) {
i = 0;
while (i < 4) {
z = _root[(("lvl" + lvl) + "p") + i];
wavexy[i] = [z[0][0], z[0][1]];
j = 0;
while (j < 2) {
switch (wavexy[i][j]) {
case 1 :
wavexy[i][j] = 0;
break;
case 15 :
wavexy[i][j] = 16;
}
j++;
}
i++;
}
}
if (minigame == 3) {
x = bankChest.length;
while (x > 0) {
i = 0;
while (i < 4) {
if (x > 0) {
do {
y = random(bankChest.length);
} while (bankChest[y].info != undefined);
bankChest[y].info = i;
x--;
}
i++;
}
}
}
achi[17] = bankFood.length;
achi[19] = bankWeap.length;
achi[20] = life;
j = 0;
while (j < bankFood.length) {
achi[18] = achi[18] + bankFood[j].count;
j++;
}
};
onEnterFrame = function () {
if (sound_delay > 0) {
sound_delay--;
}
if (total_ms == 30) {
total_ms = 0;
if (total_sec == 60) {
total_sec = 0;
addStat(9, 1);
trace("GAME MINUTE " + stat[9]);
trace(bankEnemy.toString());
} else {
total_sec++;
}
} else {
total_ms++;
}
if (quake > 0) {
if ((quake % 1) == 0) {
_root._y = quake;
} else {
_root._y = -quake;
}
quake = quake - 0.5;
}
if (paused == false) {
if (cursor.speed > 0.1) {
cursor.speed = cursor.speed - 0.1;
}
switch (minigame) {
case 0 :
prog.img._xscale = prog.img._xscale + progStep;
if (alarmEnemy == 0) {
if (spawnTimer == spawnLength) {
if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
} else {
xx = _root[(("mode" + lvlmode) + "spw") + lvl].substr(spawnTimer * 2, 2);
if (xx) {
x = Number(xx);
y = x % 10;
z = (x - y) / 10;
if (z == 0) {
if (y > 4) {
z = 10;
y = y - 5;
}
}
switch (y) {
case 0 :
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), z, y);
} else {
createEnemy(random(17), choose(0, 16), z, y);
}
break;
case 1 :
createEnemy(16, random(17), z, y);
break;
case 2 :
createEnemy(random(17), 0, z, y);
break;
case 3 :
createEnemy(0, random(17), z, y);
break;
case 4 :
createEnemy(random(17), 16, z, y);
break;
case 5 :
case 6 :
case 7 :
case 8 :
case 9 :
createEnemy(0, 0, z, y);
}
}
spawnTimer++;
}
alarmEnemy = 30;
} else {
alarmEnemy--;
}
break;
case 1 :
prog.img._xscale = prog.img._xscale + progStep;
if (life < 1) {
playMusic("stop");
showLogo(4);
} else if (alarmEnemy < 1500) {
alarmEnemy++;
if ((alarmEnemy % 90) == 0) {
i = 0;
while (i < wavexy.length) {
wavexy[i][1]--;
i++;
}
}
i = 0;
while (i < wavexy.length) {
if ((alarmEnemy % wavexy[i][1]) == 0) {
switch (wavexy[i][0]) {
case 0 :
createEnemy(16, random(12) + 2, 0);
break;
case 1 :
createEnemy(16, random(12) + 2, 1);
break;
case 2 :
createEnemy(16, random(11) + 3, 2);
break;
case 3 :
createEnemy(16, random(10) + 5, 3, 0);
break;
case 4 :
createEnemy(16, random(12) + 2, 4);
break;
case 5 :
createEnemy(16, random(12) + 2, 5);
break;
case 6 :
createEnemy(random(11) + 3, 16, 6);
break;
case 7 :
createEnemy(random(7) + 5, random(7) + 5, 7);
break;
case 8 :
createEnemy(16, random(12) + 2, 8);
break;
case 9 :
createEnemy(16, random(12) + 2, 9);
break;
case 10 :
createEnemy(16, random(11) + 3, 10);
}
}
i++;
}
} else if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
break;
case 2 :
if (life < 1) {
playMusic("stop");
showLogo(4);
} else if (spawnTimer == 0) {
z = _root[(("mode" + lvlmode) + "spw") + lvl];
if (alarmEnemy > 0) {
alarmEnemy--;
i = 0;
while (i < z[mini_diff].length) {
y = z[mini_diff][i];
if ((alarmEnemy % wavew[y]) == 0) {
if (alarmEnemy > (wavel[y] * ((mini_diff / 4) + 1))) {
createEnemy(wavexy[i][0], wavexy[i][1], y, i);
}
}
i++;
}
} else if (mini_diff < 4) {
if (bankEnemy.length == 0) {
lostlifesnd = false;
mini_diff++;
inter_level.text = ("Wave " + (mini_diff + 1)) + "/5";
alarmEnemy = 200 + (50 * mini_diff);
spawnTimer = 180;
if (mini_diff > 0) {
waveup.gotoAndPlay(2);
playSound("win");
}
createEnemy(0, 0, 9, 7 + Math.min(2, random(lvl)));
if ((mini_diff % 2) == 0) {
createEnemy(0, 0, 9, 4 + Math.min(2, random(lvl)));
}
if (lvl > 5) {
createEnemy(0, 0, 9, 7 + Math.min(2, random(lvl)));
}
}
} else if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
} else {
spawnTimer--;
}
break;
case 3 :
if (key < 1) {
if (alarmEnemy > 50) {
if (bankPrize.length == 0) {
win = true;
}
} else {
alarmEnemy++;
}
} else {
alarmEnemy = 0;
}
break;
case 4 :
if (bankLair == 0) {
if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
}
break;
case 5 :
prog.img._xscale = prog.img._xscale + progStep;
if (alarmEnemy < 1500) {
alarmEnemy++;
if ((alarmEnemy % 90) == 0) {
i = 0;
while (i < wavexy.length) {
wavexy[i][1]--;
i++;
}
}
i = 0;
while (i < wavexy.length) {
if ((alarmEnemy % wavexy[i][1]) == 0) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), wavexy[i][0], 0);
} else {
createEnemy(random(17), choose(0, 16), wavexy[i][0], 0);
}
}
i++;
}
} else if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
break;
case 6 :
if (alarmEnemy < 1) {
if (spawnTimer < 1) {
if (bankEnemy.length == 0) {
mini_diff++;
mini_prize = Math.ceil(1 + (mini_diff / 8));
inter_level.text = "Wave " + mini_diff;
spawnTimer = 2 + (mini_diff * 3);
alarmEnemy = 100;
setStat(8, mini_diff);
kongsend("survival_score", curr_money);
kongsend("survival_level", mini_diff);
playSound("win");
waveup.gotoAndPlay(2);
} else {
alarmEnemy = 10;
}
} else {
alarmEnemy = Math.max(15, 40 - mini_diff);
x = 1 + random(Math.min(10, Math.round(2 + (mini_diff / 3))));
if (random(10) < 2) {
if (mini_prize > 0) {
mini_prize--;
x = 0;
}
}
if (x != 0) {
switch (x) {
case 1 :
xx = 5;
spawnTimer--;
break;
case 2 :
xx = 1;
spawnTimer--;
break;
case 3 :
xx = 8;
spawnTimer = spawnTimer - 2;
break;
case 4 :
xx = 9;
spawnTimer = spawnTimer - 2;
break;
case 5 :
xx = 0;
spawnTimer = spawnTimer - 3;
break;
case 6 :
xx = 2;
spawnTimer = spawnTimer - 3;
break;
case 7 :
xx = 6;
spawnTimer = spawnTimer - 3;
break;
case 8 :
xx = 7;
spawnTimer = spawnTimer - 4;
break;
case 9 :
xx = 3;
spawnTimer = spawnTimer - 4;
break;
case 10 :
xx = 10;
spawnTimer = spawnTimer - 8;
}
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), xx, 0);
} else {
createEnemy(random(17), choose(0, 16), xx, 0);
}
} else {
survbonus = random(10);
if (survbonus < 2) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), 4);
} else {
createEnemy(random(17), choose(0, 16), 4);
}
} else {
if (survbonus < 6) {
createEnemy(16, random(10) + 5, 3, 1 + random(Math.min(5, Math.round(2 + (mini_diff / 3)))));
} else {
createEnemy(choose(0, 16), random(17), 9, 4 + random(Math.min(5, Math.round(2 + (mini_diff / 3)))));
}
spawnTimer = spawnTimer + 10;
}
}
}
} else {
alarmEnemy--;
}
break;
case 7 :
if (mini_bat > 0) {
while (mini_bat--) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), 9, 3);
} else {
createEnemy(random(17), choose(0, 16), 9, 3);
}
if ((mini_bat % 2) == 1) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), 9, 2);
} else {
createEnemy(random(17), choose(0, 16), 9, 2);
}
}
}
}
if (bankEnemy.length != 0) {
break;
}
if (bankPrize.length != 0) {
break;
}
win = true;
}
if (combo != 0) {
if (combo > 1) {
if (combo > achi[10]) {
achi[10] = combo;
setStat(22, combo);
}
createPrize(_xmouse + 64, _ymouse + 30, 2, Math.min(3, Math.ceil(combo / 3)));
obj = levelmap.attachMovie("scoreobj", "score", levelmap.getNextHighestDepth());
obj._x = _xmouse + 64;
obj._y = _ymouse + 30;
obj.gotoAndStop(4);
obj.combo.combo.count.text = combo;
}
combo = 0;
}
if (win == true) {
logo.gotoAndStop(1);
showLogo(3);
paused = true;
}
if (mousePressed == true) {
if (reload < 0) {
addStat(23, 1);
if (cursor._currentframe == 1) {
power = power + 1;
if (power > 12) {
if (handpow != 1) {
if (handpow == 0) {
cursor.lopata.ready.gotoAndPlay(2);
}
handpow = 1;
if (handtype[handnum][1] > 2) {
hitrad = 40 * handatt[handnum];
cursor.lopata.rad._visible = true;
cursor.lopata.rad._xscale = (cursor.lopata.rad._yscale = 20);
}
}
if (cursor.lopata.rad._xscale < (hitrad * 2)) {
cursor.lopata.rad._xscale = (cursor.lopata.rad._yscale = cursor.lopata.rad._yscale + 20);
}
if (power > 15) {
power = 13;
}
} else {
handpow = 0;
}
cursor.lopata.img.gotoAndStop(Math.round(power));
} else {
cursor.fx.play();
if (cursor._currentframe == 7) {
playSound("rocket1", "rocket2");
reload = 24 / bonusReload;
quake = 4;
castExplo(levelmap._xmouse, levelmap._ymouse, radRocket);
createPart(levelmap._xmouse, levelmap._ymouse, "explo", levelmap.getNextHighestDepth(), 1);
} else if (cursor._currentframe < 7) {
switch (cursor._currentframe) {
case 2 :
playSound("gun1", "gun2", "gun3");
reload = 9 / bonusReload;
damx = damGun;
x = 5;
y = 1;
createPart(levelmap._xmouse, levelmap._ymouse, "bullet", levelmap.getNextHighestDepth(), 1);
break;
case 3 :
playSound("gun1", "gun2", "gun3");
reload = 6 / bonusReload;
damx = damGun;
x = 5;
y = 1;
break;
case 4 :
playSound("shot1", "shot2");
reload = 18 / bonusReload;
damx = damGun;
x = 20;
y = shellShot;
break;
case 5 :
playSound("tesla1", "tesla2");
reload = 9 / bonusReload;
damx = damTesla;
x = 1;
y = 1;
castTesla(levelmap._xmouse, levelmap._ymouse);
break;
case 6 :
playSound("gauss1", "gauss2", "gauss3");
if (cursor.speed < 5) {
cursor.speed = cursor.speed + 1;
}
reload = 7 - cursor.speed;
damx = damGun;
x = 5;
y = 1;
}
glob_hit = false;
while (y--) {
hit = false;
k = (-x) + random(x * 2);
n = (-x) + random(x * 2);
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
attackTree(z, 2, 0);
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
castHitChest(this);
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
castHitEnemy(this);
}
i++;
}
if (hit == false) {
if (effect == true) {
createPart((_root._xmouse + k) + 64, (_root._ymouse + n) + 30, "dirt", levelmap.getNextHighestDepth(), 1);
}
} else {
glob_hit = true;
}
if (glob_hit == true) {
playSoundLim("hit11", "hit12");
}
}
}
cursor.ammo--;
if (cursor.ammo == 0) {
cursor.gotoAndStop(1);
cursor._xscale = (cursor._yscale = 140);
cursor.ammopip.gotoAndStop(1);
butdrop.visible = false;
} else {
cursor._xscale = (cursor._yscale = 120);
if (cursor.ammo < cursor.ammoend) {
cursor.ammopip.play();
}
}
}
}
}
if (reload >= 0) {
reload--;
} else if (autoclick == true) {
if (cursor._currentframe == 1) {
if (mousePressed == false) {
handpow = 0;
lopataHit();
}
}
}
cursor.key._visible = false;
if (key > 0) {
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (z._currentframe > 3) {
if (z.chest.keys > 0) {
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
cursor.key._visible = true;
cursor.key.info = z;
break;
}
}
}
i++;
}
}
if (cursor.key._xscale < 100) {
if (cursor.key._visible == true) {
cursor.key._xscale = (cursor.key._yscale = cursor.key._yscale + 10);
} else {
cursor.key._xscale = (cursor.key._yscale = 0);
}
}
i = 0;
while (i < bankPrize.length) {
z = bankPrize[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
if (z.speed < 3) {
if (z.kill == false) {
j = 0;
while (j < bankPrize.length) {
if (bankPrize[j] == z) {
bankPrize.splice(j, 1);
break;
}
j++;
}
if (z._currentframe < 7) {
playSoundLim("coin1", "coin2", "coin3", "coin4");
} else if (z._currentframe < 10) {
playSoundLim("almaz1", "almaz2");
} else {
playSoundLim("pickup");
}
z.kill = true;
z._name = "prize";
z._xscale = (z._yscale = 100);
z.dir = -1 * point_direction(z._x, z._y, z.x, z.y);
}
}
}
i++;
}
} else if (lvl == 0) {
}
};
onMouseDown = function () {
mousePressed = true;
if (paused == false) {
if (cursor._currentframe == 1) {
i = 0;
while (i < bankWeap.length) {
z = bankWeap[i];
if (z.wait == 0) {
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
addStat(4, 1);
playSound("pickup");
j = 0;
while (j < bankWeap.length) {
if (bankWeap[j] == z) {
bankWeap.splice(j, 1);
break;
}
j++;
}
if (z._currentframe < 4) {
mousePressed = false;
}
cursor.gotoAndStop(z._currentframe);
cursor._xscale = (cursor._yscale = 140);
reload = 5;
cursor.ammopip.gotoAndStop(3);
butdrop._visible = true;
z.removeMovieClip();
break;
}
}
i++;
}
}
if (cursor.key._visible == true) {
if (key > 0) {
z = cursor.key.info.chest;
if (z.keys > 0) {
playSound("unlock");
key--;
z["key" + z.keys]._visible = true;
z.keys--;
reload = 4;
cursor.key._visible = false;
cursor.key._xscale = (cursor.key._yscale = 0);
}
}
}
}
};
lopataHit = function () {
power = 0;
cursor.lopata.rad._visible = false;
hitrad = 0;
reload = 5;
if (handpow == 1) {
playSound("hit3");
cursor.lopata.img.gotoAndPlay(15);
quake = handtype[handnum][handpow];
switch (handtype[handnum][handpow]) {
case 1 :
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
break;
case 2 :
cursor.lopata.img.fx.gotoAndPlay(2);
playSound("tesla1", "tesla2");
castTesla(levelmap._xmouse, levelmap._ymouse);
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
break;
case 3 :
hitrad = 40 * handatt[handnum];
createGroundPart(partmap._xmouse, partmap._ymouse, "crack");
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
break;
case 4 :
hitrad = 40 * handatt[handnum];
castExplo(levelmap._xmouse, levelmap._ymouse, hitrad);
createPart(levelmap._xmouse, levelmap._ymouse, "explo", levelmap.getNextHighestDepth(), 1);
break;
case 5 :
hitrad = 40 * handatt[handnum];
createGroundPart(partmap._xmouse, partmap._ymouse, "crack");
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
createPart(levelmap._xmouse, levelmap._ymouse, "bullet", levelmap.getNextHighestDepth(), 3);
}
} else {
cursor.lopata.img.gotoAndPlay(16);
}
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
attackTree(z, (handpow * 6) + 2, 0);
if (z.cry == 0) {
if (z.img._currentframe < 4) {
playSound("tree1", "tree2");
} else if (z.img._currentframe == 4) {
playSound("treed1", "treed2");
}
}
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (z._currentframe == 2) {
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
if (handpow == 0) {
attackChest(z, 30 * handatt[handnum]);
} else {
attackChest(z, 80 * handatt[handnum]);
}
playSound("box1d1", "box1d2");
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
switch (z.type) {
case 0 :
case 1 :
if (handpow == 0) {
attackEnemy(z, 20 * handatt[handnum], 2);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 60 * handatt[handnum], 1);
playSound("hit2");
}
break;
case 2 :
if (handpow == 0) {
attackEnemy(z, 10 * handatt[handnum], 3);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 30 * handatt[handnum], 4);
playSound("hit2");
}
break;
case 3 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 6);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 70 * handatt[handnum], 5);
playSound("hit2");
}
break;
case 4 :
case 9 :
attackSpider(z);
break;
case 5 :
case 8 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 2);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 70 * handatt[handnum], 1);
playSound("hit2");
}
break;
case 6 :
if (handpow == 0) {
attackEnemy(z, 20 * handatt[handnum], 6);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 45 * handatt[handnum], 5);
playSound("hit2");
}
break;
case 7 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 7);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 100, 7);
playSound("hit2");
}
break;
case 10 :
if (handpow == 0) {
attackEnemy(z, 5 * handatt[handnum], 9);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 15 * handatt[handnum], 8);
playSound("hit2");
}
}
}
i++;
}
if (hitrad != 0) {
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (point_distance(levelmap._xmouse - 24, levelmap._ymouse - 8, z._x, z._y) < hitrad) {
switch (z.type) {
case 0 :
case 1 :
case 5 :
case 8 :
attackEnemy(z, 20, 1);
break;
case 2 :
if (random(10) > 3) {
attackEnemy(z, 10, 0);
} else {
attackEnemy(z, 10, 3);
}
break;
case 4 :
attackSpider(z);
break;
case 7 :
attackEnemy(z, 20, 7);
break;
case 10 :
attackEnemy(z, 5, 9);
}
}
i++;
}
}
};
onMouseUp = function () {
mousePressed = false;
if (paused == false) {
if (reload < 0) {
if (cursor._currentframe == 1) {
lopataHit();
} else {
switch (cursor._currentframe) {
case 8 :
useMine();
playSound("flash");
castStun();
break;
case 9 :
useMine();
playSound("explo");
quake = 6;
castExplo(levelmap._xmouse, levelmap._ymouse, radBomb);
break;
case 10 :
achi[15]++;
addStat(24, 1);
useMine();
createInterPart(_root._xmouse, _root._ymouse, "nuke1");
playSound("nuke");
break;
case 11 :
case 12 :
case 13 :
x = Math.floor((levelmap._xmouse + 8) / tileW);
y = Math.floor((levelmap._ymouse - 12) / tileH);
if (colmap[y][x] == 1) {
playSound("trapcr");
if (cursor._currentframe == 11) {
createKap(x, y);
} else if (cursor._currentframe == 12) {
createMine(x, y);
} else {
createTesla(x, y);
}
addStat(21, 1);
useMine();
} else {
cursor.ammo++;
}
}
}
}
}
};
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
keyListener.onKeyDown = function () {
if (Key.isDown(80) || (Key.isDown(27))) {
if ((((gamemenu._currentframe == 181) & (win != true)) & (paused == false)) & (logo._currentframe == 1)) {
if (gamemenu._xscale == 100) {
showLogo(5);
openMenu("game");
_root.musicVol.setVolume(0);
}
}
if (gamemenu._currentframe == 11) {
if (gamemenu._xscale == 100) {
_root.musicVol.setVolume(100);
showLogo(0);
_root.menubut._visible = true;
openMenu("exit");
}
}
}
if (Key.isDown(32)) {
if (paused == false) {
_root["mine" + _root.curr_mine].img.select._visible = false;
if (curr_mine == 0) {
cursor.gotoAndStop(1);
} else {
cursor.gotoAndStop(_root.pre_weap);
cursor.ammopip.gotoAndStop(3);
curr_mine = 0;
}
reload = 2;
} else if (gamemenu._currentframe == 71) {
if (gamemenu._xscale == 100) {
if (_root.trans_delay == false) {
if ((_root.lvl % 10) == 0) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
}
}
if (paused == false) {
if (Key.isDown(49)) {
selectMine(1);
}
if (Key.isDown(50)) {
selectMine(2);
}
if (Key.isDown(51)) {
selectMine(3);
}
if (Key.isDown(52)) {
selectMine(4);
}
if (Key.isDown(53)) {
selectMine(5);
}
if (Key.isDown(54)) {
selectMine(6);
}
}
if (Key.isDown(77)) {
if ((_root.sound == true) || (_root.music == true)) {
_root.sound = false;
_root.music = false;
playMusic("stop");
menubut.ib1.gotoAndStop(2);
menubut.ib2.gotoAndStop(2);
menubut2.ib1.gotoAndStop(2);
menubut2.ib2.gotoAndStop(2);
} else {
_root.sound = true;
_root.music = true;
playMusic("pre");
menubut.ib1.gotoAndStop(1);
menubut.ib2.gotoAndStop(1);
menubut2.ib1.gotoAndStop(1);
menubut2.ib2.gotoAndStop(1);
}
}
};
gotoAndStop ("Weapons");
Frame 35
_global.attackChest = function (z, dam) {
z.hp = z.hp - dam;
if (z.hp < 1) {
dieChest(z);
} else {
z.chest.gotoAndStop(1 + Math.floor((100 - z.hp) / 25));
}
};
_global.attackEnemy = function (z, dam, type) {
if (z.nodam != true) {
if (z.armor == true) {
z.hp = z.hp - ((dam / diff) / 5);
} else {
z.hp = z.hp - (dam / diff);
}
if (type > 0) {
switch (type) {
case 1 :
createPart(z._x + 24, z._y, "damage1", levelmap.getNextHighestDepth(), 1);
z.moving = -stupor;
if (z.cargo > 0) {
if (z.type != 8) {
if (z.type == 3) {
createPrize(z._x, z._y + z.bird._y, 2 + z.food.type, 1, z.food);
} else {
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
z.grib._visible = false;
z.cargo = false;
z.food = undefined;
z.path.shift();
}
}
z.vspeed = 6 + random(2);
if (z.act == 0) {
z.y = z._y;
z.act = 1;
if (z.sleep == false) {
if (z.armor == true) {
z.armor = false;
z.speed = 0.5;
z.gotoAndStop(z._currentframe - 8);
} else {
z.gotoAndStop(z._currentframe + 16);
}
z.sleep = true;
}
} else if (z.act == 4) {
z._xscale = (z._yscale = 130);
}
break;
case 2 :
createPart(z._x + 24, z._y, "damage1", levelmap.getNextHighestDepth(), 1);
z.moving = z.moving - 24;
z.vspeed = 4 + random(4);
if (z.act == 0) {
z.y = z._y;
z.act = 1;
if (z.sleep == false) {
if (z.armor != true) {
z.gotoAndStop(z._currentframe + 8);
}
}
} else if (z.act == 4) {
z._xscale = (z._yscale = 130);
}
break;
case 3 :
createPart(z._x + 24, z._y - 10, "damage1", levelmap.getNextHighestDepth(), 1);
if (z.moving > -1) {
if (z.moving == 1) {
if (z._currentframe < 10) {
z.last = z._currentframe;
}
}
z.gotoAndStop(11 + random(2));
z.dam.gotoAndPlay(1);
z.moving = -8;
}
break;
case 4 :
createPart(z._x + 24, z._y - 10, "damage1", levelmap.getNextHighestDepth(), 1);
if (z.moving == 1) {
playSoundLim("bearstay");
if (z._currentframe < 10) {
z.last = z._currentframe;
}
}
z.gotoAndStop(11 + random(2));
z.dam.gotoAndPlay(1);
z.moving = -stupor;
break;
case 5 :
z.moving = -stupor;
if (z.sleep == false) {
z.bird.gotoAndStop(23);
z.shad.gotoAndStop(23);
z.sleep = true;
}
case 6 :
if (z.type == 3) {
playSoundLim("bird1", "bird2");
createPart(z._x, z._y + z.bird._y, "damage1", levelmap.getNextHighestDepth(), 1);
} else {
playSoundLim("owl1", "owl2");
createPart(z._x, z._y, "damage1", levelmap.getNextHighestDepth(), 1);
}
if (effect == true) {
if (z.type == 3) {
createPart(z._x, z._y + z.bird._y, "pero", levelmap.getNextHighestDepth(), 3);
} else {
createPart(z._x, z._y + z.bird._y, "pero2", levelmap.getNextHighestDepth(), 3);
}
}
if (z.cargo > 0) {
createPrize(z._x, z._y + z.bird._y, 2 + z.food.type, 1, z.food);
z.cargo = (z.bird.grib._visible = false);
z.food = undefined;
}
if (z.info > 0) {
trace("info=" + info);
if (z.info < 7) {
createWeap(z._x, z._y + z.bird._y, 1 + z.info, 0);
} else {
createPrize(z._x, z._y + z.bird._y, z.info, 1, 0);
}
z.bird.weap._visible = false;
z.info = undefined;
}
if (z.sleep == false) {
z.moving = -6;
z.bird.gotoAndPlay(15);
z.shad.gotoAndPlay(15);
z.speed = z.speed * 1.2;
}
break;
case 7 :
createPart(z._x, z._y - 5, "damage1", levelmap.getNextHighestDepth(), 1);
z.act = 2;
z.image_index = 18;
if (z.cargo > 0) {
z.cargo = false;
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
break;
case 8 :
createPart(z._x + 24, z._y - 5, "damage1", levelmap.getNextHighestDepth(), 1);
z.moving = -10;
z._yscale = 100;
if (z.act == 0) {
z.act = 1;
}
if (z.cargo > 0) {
if (z.cargonum > 0) {
ii = 1;
while (ii <= z.cargonum) {
trace("grib" + ii);
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
z["grib" + ii]._visible = false;
ii++;
}
}
z.cargo = false;
z.food = undefined;
z.path.shift();
}
break;
case 9 :
createPart(z._x + 24, z._y - 5, "damage1", levelmap.getNextHighestDepth(), 1);
z.scale = 14;
z.scaleon = true;
}
}
if (z.hp < 1) {
if (z.cargo > 0) {
if (z.type == 10) {
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, z.cargonum, z.food);
} else if ((z.type == 3) or (z.type == 6)) {
createPrize(z._x, z._y + z.bird._y, 2 + z.food.type, 1, z.food);
} else {
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
}
dieEnemy(z);
} else {
z.hpbar._visible = true;
z.hplowbar._visible = true;
z.hpbor._visible = true;
z.hpbar._xscale = z.hp;
}
}
};
_global.attackSpider = function (z) {
if (z.die == false) {
z.die = true;
if (z.cargo > 0) {
createPrize(z._x, z._y, 2 + z.food.type, 1, z.food);
z.cargo = (z.bird.grib._visible = false);
z.food = undefined;
}
dieEnemy(z);
}
};
_global.attackTree = function (z, dam, type) {
if (z.img._currentframe != 5) {
z.hp = z.hp - dam;
z.act = 1;
z.scale = z.scale + (dam * 6);
if (z.scale > 10) {
z.scale = 10;
}
if (z.cry == 1) {
if (z.hp < 1) {
achi[25]++;
addStat(20, 1);
}
playSoundLim("cryd1", "cryd2");
dam = z.img._currentframe;
z.img.gotoAndStop(1 + Math.floor((80 - z.hp) / 20));
if (dam < z.img._currentframe) {
createPrize(z._x, z._y - 30, 9, (z.img._currentframe - dam) * 5, z._currentframe - 1, 0);
playSound("crydie");
}
} else {
if (z.cry == 0) {
if (z.normtree == true) {
parttype = "list";
} else {
parttype = choose("bushflow", "list");
}
} else {
parttype = "hulk4";
playSoundLim("laird1", "laird2");
}
if (z.img._currentframe != 4) {
if (effect == true) {
if (type != 1) {
createPart(levelmap._xmouse, levelmap._ymouse, parttype, levelmap.getNextHighestDepth(), dam, z._currentframe);
} else {
dam = (6 - z.img._currentframe) * 5;
while (dam--) {
createPart((z._x - 75) + random(150), (z._y - 30) - random(130), parttype, levelmap.getNextHighestDepth(), 1, z._currentframe);
}
}
}
}
if (z.hp < 1) {
if (z.cry == 0) {
achi[9]++;
addStat(19, 1);
playSound("box2");
dam = 10;
while (dam--) {
createPart((z._x - 75) + random(150), (z._y - 30) - random(130), "chip", levelmap.getNextHighestDepth(), 1, z._currentframe);
}
createPrize(z._x, z._y - 40, 1, 2 + random(2), 0);
} else {
bankLair--;
addStat(25, 1);
ii = bankEnemy.length;
while (ii >= 0) {
if (z == bankEnemy[ii].lair) {
if (bankEnemy[ii].type == 9) {
attackSpider(bankEnemy[ii]);
} else {
attackEnemy(bankEnemy[ii], 500, 0);
}
}
ii--;
}
playSound("lairdie");
dam = 10;
while (dam--) {
createPart((z._x - 70) + random(140), (z._y + 50) - random(100), "hulk4", levelmap.getNextHighestDepth(), 1, z._currentframe);
}
createPrize(z._x, z._y, 2, 8, 0);
createPart(z._x, z._y, "explo1", levelmap.getNextHighestDepth(), 1);
}
z.img.gotoAndStop(6);
z.info.removeMovieClip();
} else if (z.cry == 2) {
z.img.gotoAndStop(1 + Math.floor((80 - z.hp) / 20));
} else {
z.img.gotoAndStop(1 + Math.floor((40 - z.hp) / 10));
}
}
}
};
gotoAndStop ("Upgrades");
Frame 45
_global.autoUpgr = function (ob) {
x = 0;
i = 1;
while (i < 10) {
x = x + (6 - upgr[i]);
i++;
}
trace("upgrade_left=" + x);
if (x > 0) {
do {
y = 1 + random(9);
} while (((upgr[y] == 6) or (y == 4)) or (y == 5));
doUpgr(y);
trace((("upgr" + y) + "=") + upgr[y]);
inter_upgr.info = y;
inter_upgr.gotoAndPlay(2);
}
};
_global.initUpgr = function (ob) {
trace("FUNCTION CUUUUUUUUUUUT!!!!!!");
};
_global.reUpgr = function (ob) {
ob.but1.title = str_upgr_1;
ob.but2.title = str_upgr_2;
ob.but3.title = str_upgr_3;
ob.but4.title = str_upgr_4;
ob.but5.title = str_upgr_5;
ob.but6.title = str_upgr_6;
ob.but7.title = str_upgr_7;
ob.but8.title = str_upgr_8;
ob.but9.title = str_upgr_9;
ob.curweap.text = _root["str_upgr_10" + upgr[10]];
ob.but10.title = _root["str_upgr_10" + (upgr[10] + 1)];
ob.but11.title = str_upgr_11;
ob.but12.title = str_upgr_12;
ob.but13.title = str_upgr_13;
ob.but14.title = str_upgr_14;
ob.but1.cost = Math.round((400 * upgr[1]) * (upgr[1] / 2));
ob.but2.cost = Math.round((300 * upgr[2]) * (upgr[2] / 2));
ob.but3.cost = Math.round((300 * upgr[3]) * (upgr[3] / 2));
ob.but4.cost = Math.round((250 * upgr[4]) * (upgr[4] / 2));
ob.but5.cost = Math.round((300 * upgr[5]) * (upgr[5] / 2));
ob.but6.cost = Math.round((350 * upgr[6]) * (upgr[6] / 2));
ob.but7.cost = Math.round((150 * upgr[7]) * (upgr[7] / 2));
ob.but8.cost = Math.round((100 * upgr[8]) * (upgr[8] / 2));
ob.but9.cost = Math.round((500 * upgr[9]) * (upgr[9] / 2));
switch (upgr[10]) {
case 1 :
ob.but10.cost = 300;
break;
case 2 :
ob.but10.cost = 1000;
break;
case 3 :
ob.but10.cost = 3000;
break;
case 4 :
ob.but10.cost = 7000;
break;
case 5 :
ob.but10.cost = 12000;
break;
case 6 :
ob.but10.cost = 20000;
break;
case 7 :
ob.but10.cost = 35000;
break;
case 8 :
ob.but10.cost = 60000;
break;
case 9 :
ob.but10.cost = 99000 /* 0x0182B8 */;
}
ob.but11.cost = 1990;
ob.but12.cost = 19990;
ob.but13.cost = 49990;
ob.but14.cost = 99990 /* 0x018696 */;
i = 1;
while (i < 15) {
z = ob["but" + i];
if (lowprice == true) {
z.cost = Math.round(z.cost / 2);
}
if (z._currentframe < 3) {
z.id = i;
if (upgr[i] > 10) {
z.gotoAndStop(4);
} else if (z.cost > _root.money) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
z.lv.gotoAndStop(upgr[i]);
z.cost_txt = z.cost + "$";
}
z.icon.gotoAndStop(i);
i++;
}
ob.warweap.gotoAndStop(upgr[10]);
if (upgr[10] < 10) {
ob.but10._visible = true;
ob.but10.icon.weap.gotoAndStop(upgr[10]);
} else {
ob.but10._visible = false;
}
};
_root.vipChange = function () {
autoclick = false;
automagnet = false;
randweap = false;
unlimammo = false;
if (upgr[11] == 11) {
autoclick = true;
}
if (upgr[12] == 11) {
automagnet = true;
}
if (upgr[13] == 11) {
randweap = true;
}
if (upgr[14] == 11) {
unlimammo = true;
}
};
_global.doUpgr = function (z) {
if (z < 11) {
upgr[z]++;
setUpgr();
} else {
upgr[z] = 11;
gamemenu["but" + z].selback._visible = true;
vipChange();
}
getUpgrDone();
setStat(6, upgr_done);
weap_done = _root.upgr[10];
setStat(5, upgr[10]);
};
_global.getUpgrDone = function () {
upgr_done = 0;
i = 1;
while (i < 10) {
upgr_done = upgr_done + (upgr[i] - 1);
i++;
}
weap_done = upgr[10];
};
_global.reHint = function (ob, x) {
if (x == 0) {
y = 12;
} else if (hintin[x].length == undefined) {
y = 0;
} else {
y = hintin[x].length;
}
i = 1;
while (i <= y) {
z = ob["t" + i];
if (z != undefined) {
if (x == 0) {
z.newimg._visible = false;
x1 = ob._currentframe;
x2 = i;
} else {
z._visible = true;
z.newimg._visible = true;
x1 = hintin[x][i - 1][0];
x2 = hintin[x][i - 1][1];
}
z.img.gotoAndStop(x1);
z.img.img.gotoAndStop(x2);
z.title = _root[(("str_hint_" + x1) + "") + x2][0];
z.desc = _root[(("str_hint_" + x1) + "") + x2][1];
}
i++;
}
};
showHint = function () {
i = 1;
while (i < 13) {
z = ob.hints["t" + i];
if (z != undefined) {
z.newimg._visible = false;
z.img.gotoAndStop(ob.hints._currentframe);
z.img.img.gotoAndStop(i);
z.title = _root[(("str_hint_" + ob.hints._currentframe) + "") + i][0];
z.desc = _root[(("str_hint_" + ob.hints._currentframe) + "") + i][1];
}
i++;
}
};
gotoAndStop ("Game");
Frame 55
mode1lvl1 = "00000000000000000000000000000000000000000500000000000000000000000500000000000000000000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000002000000000000000002000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000400000000000000000000000000000000000000000000000005000000000000000000000005000000000000000000000000000000000000";
mode1lvl2 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000020000000000000000020000000200000000000000000000000000000000000000000000";
mode1lvl3 = "00000000000000000000000000000000000000000000000002000000020000000000000000000200000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000040000000000000004000004000004000000000000000000000000000000000000000000";
mode1lvl4 = "00000000000000000000000000000000000000000000000000020000000000000000000000000200000000000000020000040000000000000004000000000000000000000000000000000000000400000004000000000000000004000000000000000000020000000002000000000200000400000000000000000000000000000000000000000000000000000004000000020000000200040000000002000000000000000400000000000000000000000400000000000000000200000000020000000000020000000000000000000000000004000000000004000000000000000000000000000000000000000400000000020000040000000200000000000000000000000000000000000000000200000000000000000000000000000000000000";
mode1lvl5 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000040000000000000004000004000004000000000000000000000000000000000000000000";
mode1lvl6 = "00000000000000000000000000000000000000000000000400000400000400000000000000040000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000020000000000000000020000000200000000000000000000000000000000000000000000";
mode1lvl7 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000005000000000000000000000000000000000000000000000300000000000000000000030000000000000000030000030000030000000000000000000000000000000000000000";
mode1lvl8 = "00000000000000000000000000000000000000000200000000000400000000000200000000000000040000000000040000000000000000040000000000000000000400000000000000000000000000000000000000000000040000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000040000000000000000000000000000000000000000000004000000000000000000040000000000020000040000000000040000000000000000000000000004000000000002000000000000000000000000000000000000";
mode1lvl9 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000020000000200000002000000000000000000000000000000000000";
mode1lvl10 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000004000000000000000000000000000000000000";
mode1spw1 = [[4, 30], [9, 45]];
mode1spw2 = [[5, 50]];
mode1spw3 = [[2, 40]];
mode1spw4 = [[3, 45], [6, 60]];
mode1spw5 = [[1, 40]];
mode1spw6 = [[0, 30]];
mode1spw7 = [[8, 45]];
mode1spw8 = [[7, 50]];
mode1spw9 = [[10, 40]];
mode1spw10 = [[1, 95], [2, 100], [3, 120], [4, 130], [5, 60], [6, 110], [7, 180], [8, 80], [9, 120], [10, 250], [0, 125]];
mode1achi1 = [[20, 3], [20, 6], [20, 10]];
mode1achi2 = [[20, 3], [20, 6], [20, 10]];
mode1achi3 = [[20, 3], [20, 6], [20, 10]];
mode1achi4 = [[20, 3], [20, 6], [20, 10]];
mode1achi5 = [[20, 3], [20, 6], [20, 10]];
mode1achi6 = [[20, 3], [20, 6], [20, 10]];
mode1achi7 = [[20, 3], [20, 6], [20, 10]];
mode1achi8 = [[20, 3], [20, 6], [20, 10]];
mode1achi9 = [[20, 3], [20, 6], [20, 10]];
mode1achi10 = [[20, 3], [20, 6], [20, 10]];
mode2lvl1 = "00000000000000000000000000000000000000000000000000000000001800000000000000080000000000150010001100000000000000000100000100190000001100000000000001000001000000000000001300000000040000000100000034000000100000000000000000010000000000001000000000000000000001000000000016000000000000000000000001000000010013000000000000040000000001010100000000000000000000000000000000000000000000000000000000000000000000000100000000000000020004000000000001000000000000000000000000000000000000080000000000000000000000040000000000000000000000000002000000000000040000000000000000000000000000000000000000";
mode2lvl2 = "00000000000000000000000000000000000000000000000000000000000002000000000008000001000000000000000000040000000000012000000000000000000000000000000000010000000000000000000200000800000000000000010000000000000000000000000034000140010000000004000000000100000000000100000000000000000001200000000000010101010101010000000001000000000001000000000000000000000000003400014001000000000400000800000000000000010000000000000000000000000100000000000000000002000000000001200000000000000000000000000008000001000000000000000000040000000000000000000000000000020000000000000000000000000000000000000000";
mode2lvl3 = "00000000000000000000000000000000000000080000000000000000000000000800000000010000000000000000000001000000000000200000000101000000210000000000000000001201000001150000000000000000000014000000000000130000000000000000000100530030000001000000000000000001000000000000000001000000000001000100300000005300000100010000000000010000000000000000010000000000000000010053003000000100000000000000000015000000000000120000000000000000000013010000011400000000000000000020000000010100000021000000000000010000000000000000000001000000000800000000000000000000000008000000000000000000000000000000000000";
mode2lvl4 = "00000000000000000000000000000000000000000000000000000000000000000000000000000002000001010000000000020000000020000000010007010000200000000000000000000400000000000004000000000000000000000000000000000000000000000000010000003000000000010000000000000100000000000000000000010000000000014100300000003000004101000000000001000000000000000000000100000000000001000000300000000001000000000000000000000000000000000000000000000000000004000000000020040000000000000000200001000701000000000000000000000002000001010000000000020000000000000000000000000000000000000000000000000000000000000000000000";
mode2lvl5 = "00000000000000000000000000000000000000000000000000000000000012000000000000000003000000002000100000080000000000000000000000011400070000000000000000000000000156010000000000000000030000002100120100000000000000000000000023001000005600330000000000000000000014500000000000000000000000050000010001005600330000000000000000000000155000000000000000000000000000002300110000560033000000000000030000002100130100000000000000000000000000000001560100000000000000000000000000000001150007000000000000000003000000002000110000080000000000000000000000000000130000000000000000000000000000000000000000";
mode2lvl6 = "00000000000000000000000000000000000000000000000005000000030000000000000000000300000000000000000000030000000000000000000000000000000000000000000022000000430000002200000000000000050000000000000000000000050000000000000030000800300000000000000000000000000000000000000000000000000043000300080030000800000043030000000000000000000000000000000000000000000000003000080030000000000000000000050000000000000000000000050000000000220000004300000022000000000000000000000000000000000000000000000000000300000000000000000000030000000000000000000300000500000000000000000000000000000000000000000000";
mode2lvl7 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000020000020000000000060200000000000006000000000000000000000000000400000400000000000000000000040000000000003100000000000002000000010001000000000000000000000000000154015401003100010000000000000004000154010000000000000000000000000001540154010031000100000000000200000001000100000000000000000000000000040000000000003100000000000000000000000004000004000000000000000006020000000000060000000000000000000000000002000000020000020000000000000000000000000000000000000000000000000000000000000000000000";
mode2lvl8 = "00000000000000000000000000000000000000000000000004000000000000000000000000004202000000010001010100010000000000000000000000010000000100000000000000020000000001003200010000000000000000000012000100000000000000000000020000160023000101004208000000000000000000170001000000000000000000000400001600220000320001000000000000000000001700010000000000000000000002000016002400010100420800000000000000000013000100000000000000000000000200000000010032000100000000000000000000000001000000010000000000004202000000010001010100000000000000000000040000000000000000000000000000000000000000000000000000";
mode2lvl9 = "00000000000000000000000000000000000000000000000004000000020000000000000057001500000000000000000000040000000000011121000004000000020000000000150157011100000000000000000000000000110100011121000004000000020000000007110157011100000000000000000000040000110100001121000004000000000000000007110034001100000000000000000000040000110000011121000004000000000000000006110157011100000000000000020000040000110100011121000000000000000000000007110157011100000000000000020000040000110100011300000000000000000000000007110157000000000004000000020000040000130000000000000000000000000000000000000000";
mode2lvl10 = "00000000000000000000000000000000000000000002000000000000000000020000000000000000000008000000000000000000000004000800004400000800000004000000000000000001000100000000000000000000080001000021000001000800000000000000000032000000320000000000000000000001000000210000000100000000000008000020002200230024000008000000000000010000002100000001000000000000000000003200000032000000000000000000080001000021000001000800000000000000000000010001000000000000000000000400080000440000080000000400000000000000000008000000000000000000000000020000000000000000000200000000000000000000000000000000000000";
mode2lvl11 = "00000000000000000000000000000000000000000018000000010000000018000000000000100011000000000000100011000000001600060013000100001400060017000000001100070000580000000700100000000000001300000001000000001400000000000100000030000000300000000100000000000000000000000000000000000000000001003000000030000000300001000000000000000000000000000000000000000000010000003000000030000000010000000000001200000001000000001500000000000010000700005800000007001100000000160006001200010000150006001700000000110010000000000000110010000000000000190000000100000000190000000000000000000000000000000000000000";
mode2lvl12 = "00000000000000000000000000000000000000000000000100000000000000000800000000000004000100000000000000000000000100000000002400000000000000000000000100000004000145003400000000000000000100000000000100000000000000000000002200000004230101010101000000005000000100000000000000000000000000000034000000000002000400040000000050000001000000000000000000000000000000220000000423010101010100000000000100000000000100000000000000000001000000040001450034000000000000010000000000240000000000000000000000000004000100000000000000000000000000000001000000000000000008000000000000000000000000000000000000";
mode2lvl13 = "00000000000000000000000000000000000000000000000200000400000200000000000000000000002100210000000000000000000000000015000600120000000004000000000200000011001000000000000000000000150001000019000001000000020000000400110001000000010000120000000000002000110000000000001000200000000000000600170034000016000600000000000020001000000000000011002000000000040010000100000001000013000000000000140001000018000001000000020000000002000000100011000000000000000000000000001400060013000000000400000000000000002100210000000000000000000000000002000004000002000000000000000000000000000000000000000000";
mode2lvl14 = "00000000000000000000000000000000000000000000010000000001000000000000000000000200000000040000000000020000000000000000000000000000000000000000000000000600000000060000000000000000000200000000040000000000020000000000000100000000000100000000000000000000000100003101000000000000000000000206003155000000060000020000000000000001000031010000000000000000000000010000000000010000000000000000000200000000040000000000020000000000000006000000000600000000000000000000000000000000000000000000000000000200000000040000000000020000000000000100000000010000000000000000000000000000000000000000000000";
mode2lvl15 = "00000000000000000000000000000000000000080000000000000000000000000800000000000000010107010100000000000000000000060100000000000100060000000000000100000000240000000100000000000000010022000000000023000100000000000100000000010101000000000100000000010000000100000001000000010000000100002200010030000100230000010000000100000001000000010000000100000000010000000001010100000000010000000000010022000000000023000100000000000001000000002400000001000000000000000006010000000000010006000000000000000000010107010100000000000000000800000000000000000000000008000000000000000000000000000000000000";
mode2spw1 = " 5251 5152 525152515251";
mode2spw2 = " 1414 131114 13131111 141414";
mode2spw3 = " 8383 818181 84848484 8282828282";
mode2spw4 = "40 50505040 1010101010 40 80808080808080";
mode2spw5 = " 22 2222 222222 13131311111144 2222222222";
mode2spw6 = " 919090 9190909090 91909090909090 9190909090909090";
mode2spw7 = " 6060 92 606060 95 60606060 40 6060606060 92 606060606060";
mode2spw8 = " 2222912222229170 70 912222227222229170707091222272227222722214141414";
mode2spw9 = " 00 00 00 009800 00 0000600000980000 0000400000009800000060000000000000";
mode2spw10 = "905050505091901010101090918080808090916060606091902020202091900000000090917070 7070";
mode2spw11 = " 303030 99 30303030 34 3030303030 99 303030303030 34 3030383030303830303038303030";
mode2spw12 = "508050809110001000916090609091201020109170507050800080009130603060910020002091703070309100000000";
mode2spw13 = " 05 05 05 05 05 2020 202020 0505 0505 0505 2070202070207020 36 050505 050505";
mode2spw14 = "998381838183818381838140351311131113111311131140950301030103010301030140332321232123212321232140960806080608";
mode2spw15 = "913750108020309070600005913750108020309170600005913750108020309070600005913750108020379070600005913750108020309070600005";
mode2achi1 = [[3, 10], [6, 10], [18, 5]];
mode2achi2 = [[0, 12], [11, 3], [17, 2]];
mode2achi3 = [[22, 14], [12, 2], [19, 3]];
mode2achi4 = [[2, 3], [25, 2], [17, 4]];
mode2achi5 = [[16, 10], [26, 2], [18, 15]];
mode2achi6 = [[23, 23], [13, 4], [7, 23]];
mode2achi7 = [[25, 4], [9, 10], [8, 2]];
mode2achi8 = [[5, 9], [14, 1], [18, 9]];
mode2achi9 = [[21, 26], [16, 6], [12, 5]];
mode2achi10 = [[26, 1], [13, 1], [14, 1]];
mode2achi11 = [[1, 30], [25, 4], [17, 7]];
mode2achi12 = [[22, 4], [5, 4], [9, 9]];
mode2achi13 = [[24, 17], [11, 4], [12, 4]];
mode2achi14 = [[15, 2], [23, 3], [25, 6]];
mode2achi15 = [[25, 6], [10, 5], [14, 2]];
mode3lvl = "00000000000000000000000000000000000000000000020004000002000400000000000000000000000000000000000000020000000004000000001800180000000000000000000001000010001900110000000000000100000000100000000000130000000000000001001600003200000100000100000000000000001300000000000000000000000001000100000000010032000100000000000000000012000000000000000000000000000100160000320000010000010000000100000000110000000000120000000000000000010000110018001000000000000000000400000000190019000000000000000000000000000000000000000000020000000000000200040000020004000000000000000000000000000000000000000000";
mode4lvl1 = "00000000000000000000000000000000000000000000000000000000000000000200000000001800120000000004000000000000000010001900000000000000000002000000160020000000080000000004000000000000110001000000000000000000000000000000110001000000000100000004000000000000170001000001000000000000000008001600000001010000000000000000000000001700000101000000080000000000000010000001000001000000000000000000100000010000000001000000120000001600003400001800180001001600000000001100000010001900110006001700000000001100100000000000110010000000000000001900000008000000190000000000000000000000000000000000000000";
mode4lvl2 = "00000000000000000000000000000000000000000018000000000000000000000100000000100011000008000000040000020000001000420011000000000000000001000016004100410017000000000000000100000011004200100000000000000200040000000017001600000000000000000001000000100000001300000000000000000100001600003400000101000000040000020000001100000012000000000000000001000000001700160000000000000000000100000010004400110000000000000200040000160045004500170000000000000001000000110044001000000000000000000100000000110010000008000000040000020000000000190000000000000000000001000000000000000000000000000000000000";
mode4lvl3 = "00000000000000000000000000000000000000000100000001000100000001000000000001000100010001000100010001000000000000060100000000000100060001000000010001000100300001000100010000000000010000000000000000000100000000000100010030000100300001000100000001000000000000000000000000000100000001003000010030000100300001000000010000000000000000000000000001000000010001003000010030000100010000000000010000000000000000000100000000000100010000003000010001000100000000000006010000000000010006000100000001000100010001000100010001000000000001000000010001000000010000000000000000000000000000000000000000";
mode4lvl4 = "00000000000000000000000000000000000000000000000000020000000200000000000000000200000000000000000000020000000000002000000000002000000000000000000020002000000020002000000000000000200032002000200032002000000000000000200001000000010020000000000000000000200001000100200000000000000000020000000001000000000000040000000000002000010001002000000000000000000020000100000001002000000000000000200032002000200032002000000000000000200020000000200020000000000000000000200000000000200000000000000000000200000000000000000000020000000000000000000200000002000000000000000000000000000000000000000000";
mode4lvl5 = "00000000000000000000000000000000000000000000080000000000000800000000000008000000000100060100000000080000000000070100000000000001070000000000000100005600560056000001000000000001000057000000000056000001000000000100570000010101000056000100000000010057000100000001005600010000000000065700010032000100560006000000000100570001000000010056000100000000010057000001010100005600010000000001000057000000000056000001000000000001000057005700570000010000000000000007010000000000000107000000000008000000000100060100000000080000000000000800000000000008000000000000000000000000000000000000000000";
mode4lvl6 = "00000000000000000000000000000000000000000000000002000000000002000000000000000200000000000200000000020000000000000000000000000000000000000000000400000000010000000000000400000000000100010001000100010000000000000001000100010001000100010000000000010000000000000000000000010000000001003100310031003100310001000000000100000000000000000000000100000000000100010001000100010001000000000000000100010001000100010000000000000004000000000100000000000004000000000000000000000000000000000000000000000200000000000200000000020000000000000000020000000000020000000000000000000000000000000000000000";
mode4lvl7 = "00000000000000000000000000000000000000000000000004000004000004000000000000000400000000000000000000040000000000002100000000002100000000000000000021002100000021002100000000000000210032002100210032002100000000000000210001000000010021000000000000000000210001000100210000000000000000040000000001000000000000040000000000002100010001002100000000000000000021000100000001002100000000000000210032002100210032002100000000000000210021000000210021000000000000000000210000000000210000000000000000000400000000000000000000040000000000000000040000040000040000000000000000000000000000000000000000";
mode4lvl8 = "00000000000000000000000000000000000000000000000000000003000000000000000000000003000000000000000003000000000000000000000000000000000000000000000000000000310000000000000000000000030000000000000000000000050000000000003100002400003100000000000000000000000000000000000000000000000000000322000034000022000000030000000000000000000000000000000000000000000000310000240000310000000000000000030000000000000000000000050000000000000000003100000000000000000000000000000000000000000000000000000000000003000000000000000003000000000000000000000000030000000000000000000000000000000000000000000000";
mode4lvl9 = "00000000000000000000000000000000000000000018000000000000000000000000000000100011000008000000050000030000001055550011000000000000000000000016005454000017000000000000000000000011535300100000000000000300050000000017001600000000000000000000000000100000001300000000000000000000001600003200000000000000050000030000001100000012000000000000000000000000001700160000000000000000000000000010565600110000000000000300050000160057570000170000000000000000000000115858001000000000000000000000000000110010000008000000050000030000000000190000000000000000000000000000000000000000000000000000000000";
mode4lvl10 = "00000000000000000000000000000000000000000000000000030000000300000000000000000300000000000000000000030000000000002200000000002200000000000000000023002200000022002300000000000000220032002200220032002200000000000000220001000000010022000000000000000000220001000100220000000000000000050000000001000000000000050000000000002200010001002200000000000000000022000100000001002200000000000000220032002200220032002200000000000000230022000000220023000000000000000000220000000000220000000000000000000300000000000000000000030000000000000000000300000003000000000000000000000000000000000000000000";
mode4lvl11 = "00000000000000000000000000000000000000000000000000020000000000000000000000000200000000000000020000040000000000000004000000000000000000000000000000000000000400000004000000000000000004000000000000000000020000000002000000000234000400000000000000000000000000000000000000000000000000000004340000020000000200040000000002000000000000000400000000000000000000000400003400000000000200000000020000000000020000000000000000000000000004000000000004000000000000000000000000000000000000000400000000020000040000000200000000000000000000000000000000000000000200000000000000000000000000000000000000";
mode4lvl12 = "00000000000000000000000000000000000000000000020001000100000000020000000000000000010101010100000000000000000004000100000000000100000004000000000001000000300000000100000000000000000100300000003000010000000000000001000000000100000000010000000001010100300001000600300001010100000000230000000007000000000023000000010101003000010006003000010101000000000100000000010000000001000000000000000100300000003000010000000000000000010000003000000001000000000000000400010000000000010000000400000000000000010101010100000000000000000000000200010001000000000200000000000000000000000000000000000000";
mode4lvl13 = "00000000000000000000000000000000000000000000000000000000000000000000000000010000000001000000000000000000000000000700010000070000000000000000000100000000000000000000070000000000000100010000320001000001000000000000000000000000000000000000000000000700320001000000010000010000000000000000000000060000000000000000000000000000010000003200000700000000000100010000000100000000000000000001000000003200000000010001000000000000070100000000000000000000000000000000000000070001000007010000000000000000010000000000000100000000000000000000000000000000000000000000000000000000000000000000000000";
mode4lvl14 = "00000000000000000000000000000000000000000000000003000000000003000000000000000300000000000300000000030000000000000000000000000000000000000000000500000000010000000000000500000000000100010001000100010000000000000001000100010001000100010000000000010000000000000000000000010000000001003100310031003100310001000000000100000000000000000000000100000000000100010001000100010001000000000000000100010001000100010000000000000005000000000100000000000005000000000000000000000000000000000000000000000300000000000300000000030000000000000000030000000000030000000000000000000000000000000000000000";
mode4lvl15 = "00000000000000000000000000000000000000000400000000000000000000000400000000000000010000000100000000000000000000010000000800000001000000000000000000000000060000000000000000000000000800000000000000080000000000000100000700010101000700000100000000000000000100000001000000000000000000080700010030000100070800000000000000000001000000010000000000000000010000070001010100070000010000000000000800000000000000080000000000000000000000000600000000000000000000000001000000080000000100000000000000000000010000000100000000000000000004000000000000000000000004000000000000000000000000000000000000";
mode4spw1 = " 08 09 08 09";
mode4spw2 = "242424242424242424242424242424242424242424242424242424242424242424242424";
mode4spw3 = "80948090809480908090809480908090809080948090804080908090809480908090809080908092";
mode4spw4 = "5050505050508080808080801010101010102020202020200000000000000505050560606060603030303030";
mode4spw5 = " 10001000100010009200100010001000100010009900100010001000100010009600100010001000050005000500";
mode4spw6 = "31323334353631323334353606 08 064008 06 0806 0806 0806400806 080608 06080640080608 060806080608";
mode4spw7 = "9898989850505050505050501010101010101010808080808080808020202020202020200000000000000000050505056060606030303030";
mode4spw8 = "997070709170707034707070917070709970707091707070347070709170707099707070917070703470707091707070997070709170707091707070";
mode4spw9 = " 2424242424242424242444242424242424242424242444242424242424242424242444242424242424242424242444242424242424242424242424";
mode4spw10 = "505050505050509180808080808080911010101010101091202020202020209100000000000000910505050505050591606060606060609130303030303030915080102000056030";
mode4spw11 = "808080808080808080808040606060606060606060606040909090909090909090909040707070707070707070707070";
mode4spw12 = "999060309060379060309060349060309060309060309060999060309060309060309060349060309160309060309060999060309060309060309060349060309060309060309060";
mode4spw13 = "808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080";
mode4spw14 = "94959697989994959697989906 08 069408 06 0806 0806 0806950806 080608 06080699080608 06080608 060806089606080608 0608060806920806080608";
mode4spw15 = "903050108020309070600005903050108020309070600005903050108020309070600005903050108020309070600005903050108020309070600005";
mode4achi1 = [[24, 4], [11, 1], [25, 1]];
mode4achi2 = [[9, 10], [10, 5], [18, 5]];
mode4achi3 = [[8, 1], [25, 4], [17, 9]];
mode4achi4 = [[1, 5], [4, 5], [11, 28]];
mode4achi5 = [[16, 30], [25, 8], [15, 1]];
mode4achi6 = [[1, 12], [2, 3], [17, 5]];
mode4achi7 = [[23, 4], [12, 28], [19, 22]];
mode4achi8 = [[5, 45], [13, 2], [14, 2]];
mode4achi9 = [[19, 10], [10, 5], [18, 5]];
mode4achi10 = [[21, 8], [13, 5], [17, 4]];
mode4achi11 = [[22, 11], [4, 11], [23, 11]];
mode4achi12 = [[25, 3], [26, 2], [17, 10]];
mode4achi13 = [[25, 3], [25, 6], [25, 9]];
mode4achi14 = [[15, 3], [16, 3], [10, 3]];
mode4achi15 = [[1, 10], [9, 4], [25, 8]];
mode5lvl1 = "00000000000000000000000000000000000000000000000000000000000000000500000000000000000000030000000000000000000000030000000000000000070000000000000000000500000000000000000000000000000000000000000034000000000000000000030000000000000000000000000000000000004200000000000000000000000000050000000000000000000000050000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000010003000000000076000000000000000000000000000000000000000000000000050000000500000000000000000000000000000000000000000003000000000003000000000300000000000000000000000000000000000000";
mode5lvl2 = "00000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000050000000000000071000073000000000000000000000000000000000000000000000000000000030000000000000000000000030000000000000000002100000000000000000000000000000000000000000000000000000000000300005400540000000000050000000000000000000000000000000000000000000000000000070000000000000000000000030000000000000000000000030000000000000000000000000000000000000000000000000032000032000000000000000000000300000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000";
mode5lvl3 = "00000000000000000000000000000000000000000300000000000000050000000300000000000000000000030000000000000000000000000000000000000000000005000000007200000000000000340000000000000000000000000000000000000000000000000000000000004500000000000003000000030000000000000000000000000000000000000000000006000000000000000000000000030000000000000000000005000000000000000000450000000000000000000003000000000000000000000000000000000000340000000000000072000000000000000000000000000000000000000000000000030000000000050000000000000000000000000005000000000000000005000000000000000000000000000000000000";
mode5lvl4 = "00000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000030000000074000000000000002300000000000000000000000000000000000000000000000000030000000000000050003200000000000000000000030000000000000000000000000000000000000007000000000000000076000000000000000000000032000000000000000000000000070000000000000000000000000003000000000000000000000000030000000000000050003200000000000000000000000000000000000000000000007400000000000000230000000000000000000000000000000000000000030000000000000000000000000300000000000000000000000000000000000000000000";
mode5lvl5 = "00000000000000000000000000000000000000000003000000000003000000000500000000000000000000000000000000000000000032000000005300000000320000000000000000000000000000000000000000000000050053000000000053000000050000000000000000750000000000000000000000000000000000000000000000000000000000530075000006750000005300000000000000000000000000000000000000000000000000000075000000000000000000000000050053000000000053000000050000000000000000000000000000000000000000003200000000530000000032000000000000000000000000000000000000000000000000030000000000030000000005000000000000000000000000000000000000";
mode5lvl6 = "00000000000000000000000000000000000000000500000000000003000000000500000000000000000000000000000000000000007100000000000000000074000000000000000000000000000000000000000000000000000000580000005800000000000000000003000000003200000000000005000000000000000000000000000000000000000000005800320006003200580000000000000000000000000000000000000000000000000300000000320000000000000500000000000000580000005800000000000000000000000000000000000000000000000000730000000000000000007600000000000000000000000000000000000000000000000005000000000000030000000005000000000000000000000000000000000000";
mode5lvl7 = "00000000000000000000000000000000000000000000000000000000000000000000000000030000030000030000030000030000000000000000000000000000000000000000740000005700000057000000330000000000000000000000000000000000000000000006000003000003000003000003000000000000000000000000000000000000000074000000570000005700000032000000000000000000000000000000000000000000000600000300000300000300000300000000000000000000000000000000000000007400000057000000570000003200000000000000000000000000000000000000000000000300000300030000030000030000000000000000000000000000000000000000000000000000000000000000000000";
mode5lvl8 = "00000000000000000000000000000000000000000003000000000000000000000300000000000032003200320032000000000000000006000000000000000000000600000000000000000000000000000000000000000000050056005600560056000000050000000000000000000000000000000000000000000500000000000000000000000500000000000056005600560056000000000000000005000000000000000000000005000000000000000000000000000000000000000000050056005600560056000000050000000000000000000000000000000000000000000500000000000000000000000500000000007601760176007600000000000000000000030000000000000000000003000000000000000000000000000000000000";
mode5lvl9 = "00000000000000000000000000000000000000000300000003000000000000030000000000000000000000000003000000000000000000000000000000000000000005000000007700000000060000000003000000000000000000000000000000000000000000000000000000000000420000000003000000000000000055000000000000000000000003000600000034000000060000050000000000000000000000000000000000000000000003004200000000000000000000000000000000000000000000000000000000000000000003000600007700000000000000000500000000000000000000000000000000000000000003000000000000000000000000030000000000000300000005000000000000000000000000000000000000";
mode5lvl10 = "00000000000000000000000000000000000000000000000000000000000000000000000000000021007000000021000000000000000000000000000000000000000000000000007000000000000000700000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000032003200000000000000000070000000200006002000700000000000000000000000320032000000000000000000000000000000200000000000000000000000000000000000000000000000000000000070000000000000007000000000000000000000000000000000000000000000000000000021007000000021000000000000000000000000000000000000000000000000000000000000000000000000000000";
mode5achi1 = [[25, 1], [17, 1], [18, 5]];
mode5achi2 = [[25, 1], [17, 2], [18, 6]];
mode5achi3 = [[25, 1], [17, 2], [18, 10]];
mode5achi4 = [[25, 2], [17, 3], [18, 9]];
mode5achi5 = [[25, 1], [17, 4], [18, 12]];
mode5achi6 = [[25, 1], [17, 4], [18, 12]];
mode5achi7 = [[25, 2], [17, 3], [18, 10]];
mode5achi8 = [[25, 2], [17, 4], [18, 12]];
mode5achi9 = [[25, 4], [17, 1], [18, 5]];
mode5achi10 = [[25, 1], [17, 3], [18, 12]];
mode6lvl1 = "00000000000000000000000000000000000000000000000000040001000000000400000000000400000000000000000000000000000000000001006361616164000100000000000000040000600000006000000000000000000000010060000100600004000000000004010000006000000060000000000000000000000100600004006000010000006161616400000060000000600000000000000000600001006000010067000000000000010060000000600000000000000000000000006000040060000100000000000000000400600000006000000004000100000000000062616161650000000000000000000000000000000000000000000000000000000004010001000100000400000004000000000000000000000000000000000000";
mode6lvl2 = "00000000000000000000000000000000000000000400600000000000000002000000000000000060000000000000000000040000000001006000010001000100000000000000000000600000000000000000000000006161616166616161640001000100000000000000006000000060000000000000000000000100600001006000010001000000000000000060000000600000000000000000000001006261616166616161640000000000000000000000006000000060000000000000010001000100600001006000000000000000000000000060000067000000000000000000000001006261610000000000000000040000000000000000000000000000000000000002000001000001000100000000000000000000000000000000000000";
mode6lvl3 = "00000000000000000000000000000000000000000000000000000200000000000400000000000002000000000000020000000000000000000000000000000067000000000000000463616161666161610000000000000000006000000060000000600000000000000004600001006000010060000004000000000060000000600000006000000000000000046661616166616161660000000000000000600000006000000060000004000000000460000100600001006000000000000000006000000060000000600000000000616161666161616661616165000004000000000060000000000000000000000000000000046000000000000000020000000000000000600000000002000000000004000000000000000000000000000000000000";
mode6lvl4 = "00000000000000000000000000000000000000000000030060006000000000030000000000000000006000600000000000000000000000050063650062640000000005000000000000636500010062640000000000000000006365000001000062640000000000000063650000000100000062640000000000636500000001000100000062640000000060000101010006000101010060000000006264000000010001000000636500000000006264000000010000006365000000000000006264000001000063650000000000000000006264000100636500000000000000000005006264006365000000000500000000000000006267000000000000000000000000000300000000000000000300000000000000000000000000000000000000";
mode6lvl5 = "00000000000000000000000000000000000000000200000000000200000000000200000000000000020000000000020000000000000000000000000000000000000000000000000200636161616161640063616100000000006365000000000060006000000000000063650000636164006000600000000000006000000060006000600060000000000067006161616661666166616661610000000000000000600060006000600000000000006264000060006000626165000000000000006264006000600000000000000000000002006261650062616161616161000000000000000000000000000000000000000000000000020000000000020000000000000002000000000002000000000002000000000000000000000000000000000000";
mode6lvl6 = "00000000000000000000000000000000000000006000006000000100010001000000000000600000600001000000000000010000000160000060000063616161616400000000006000006000006000000000600000000000600000600000600000010060000000010060000060000060000100006000000000006000006000006000000000600000000000600000600067006164000060000000000160000060000000006000006000000000006000006000000000600000600000000000600000626161616165000060000000010060000100000000000001006000000000006000000001000001000000600000000000626161616161616161616165000000000100000000000000000000000001000000000000000000000000000000000000";
mode6lvl7 = "00000000000000000000000000000000000000000060000000000000000000000000000000046000000007000007000007000000000000600000000000000000000000000061616166616661666166616400000000000000006000600060006000600000050000000200606166616661666166000000000000000060006000600060006000000000000000046061666166616661666700000000000000600060006000600060000000000000020060616661666166616600000000000000006000600060006000600000050000616161666166616661666165000000000000000060000000000000000000000000000000046000000007000007000007000000000000600000000000000000000000000000000000000000000000000000000000";
mode6lvl8 = "00000000000000000000000000000000000000600100000001000000010000000100000060006361640063616400636164000000006000600060006000600060006000000000600060006000600060006000600000000060006000600060006000600060000000006000600060006000600060006000000000600060006000600060006000600000000060006000600067006000600060000000006000600060000000600060006000000000600060006000600060006000600000000060006000600060006000600060000000006000600060006000600060006000000000600060006000600060006000600000000062616500626165006261650060000000010000000100000001000000016000000000000000000000000000000000000000";
mode6lvl9 = "00000000000000000000000000000000000000000004000000020000000200000000000100000000000000000000000000040000010060616161616161616400000000000000006000000000000000600000000100006161666161616400636166616400010000000060000000600060006000600001000061616661640060006000626165000100000000600060006000600000006700000000616165006000626166616161000000000000000000600000006000000060000100006161616166616161650063616500010000000000006000000000006000000001000001000000606161616161650000000100000000000400000000000000000000040000000000000000000200000002000000000000000000000000000000000000000000";
mode6lvl10 = "00000000000000000000000000000000000000000400000000000000006000000400000000006361616161616400600000000000000000600000000000600060000000000061616165006361616165006261640000000000000006600000010006000060000000006361640062616400636164006000000000600060010000600060006000600000000060006000636167006500600060000000006000600060000000000160006000000000600062616500626164006261650000000060000006000100006006000000000000006261640063616161650063616161000000000060006000000000006000000000000000006000626161616161650000000000000004600000000000000000000004000000000000000000000000000000000000";
mode6achi1 = [[20, 3], [20, 5], [20, 10]];
mode6achi2 = [[20, 3], [20, 5], [20, 10]];
mode6achi3 = [[20, 3], [20, 5], [20, 10]];
mode6achi4 = [[20, 3], [20, 5], [20, 10]];
mode6achi5 = [[20, 3], [20, 5], [20, 10]];
mode6achi6 = [[20, 3], [20, 5], [20, 10]];
mode6achi7 = [[20, 3], [20, 5], [20, 10]];
mode6achi8 = [[20, 3], [20, 5], [20, 10]];
mode6achi9 = [[20, 3], [20, 5], [20, 10]];
mode6achi10 = [[20, 3], [20, 5], [20, 10]];
mode6spw1 = [[5], [8], [5], [8], [1]];
mode6spw2 = [[5, 5], [8, 8], [1, 1], [4, 4], [0, 0]];
mode6spw3 = [[5, 8], [1, 2], [8, 5], [2, 1], [0, 4]];
mode6spw4 = [[1, 0], [5, 4], [0, 1], [4, 5], [2, 10]];
mode6spw5 = [[5, 5, 5], [1, 1, 1], [0, 0, 0], [2, 2, 2], [10, 10, 10]];
mode6spw6 = [[10, 1], [10, 1], [10, 1], [10, 1], [10, 1]];
mode6spw7 = [[1, 8, 5, 2], [0, 2, 1, 5], [2, 1, 0, 8], [1, 8, 10, 2], [10, 4, 0, 1]];
mode6spw8 = [[10, 4], [2, 0], [4, 10], [0, 2], [10, 0]];
mode6spw9 = [[8, 8, 8, 8], [4, 4, 4, 4], [2, 2, 2, 2], [0, 0, 0, 0], [10, 10, 10, 10]];
mode6spw10 = [[2, 4, 0, 10], [2, 4, 0, 10], [2, 4, 0, 10], [2, 4, 0, 10], [2, 4, 0, 10]];
lvl1p0 = [[8, 1], [8, 2], [8, 3], [8, 4], [8, 4], [9, 4], [10, 4], [11, 4], [12, 4], [13, 4], [13, 5], [13, 6], [13, 7], [13, 8], [12, 8], [11, 8], [10, 8], [9, 8], [8, 8], [7, 8], [6, 8], [5, 8], [4, 8], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [9, 12]];
lvl2p0 = [[1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [9, 5], [9, 6], [9, 7], [9, 8], [9, 9], [9, 10], [9, 11], [9, 12], [9, 13], [10, 13], [11, 13], [12, 13]];
lvl2p1 = [[5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 9], [6, 9], [7, 9], [8, 9], [9, 9], [10, 9], [11, 9], [12, 9], [13, 9], [13, 10], [13, 11], [13, 12]];
lvl3p0 = [[12, 1], [12, 2], [12, 3], [12, 4], [12, 5], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [8, 11], [8, 10], [8, 9], [8, 8], [8, 7], [8, 6], [8, 5], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12]];
lvl3p1 = [[15, 4], [14, 4], [13, 4], [12, 4], [11, 4], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [4, 4], [4, 5], [4, 6], [4, 7], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8], [9, 8], [10, 8], [11, 8], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [7, 12], [6, 12], [5, 12], [4, 12]];
lvl4p0 = [[1, 7], [2, 7], [3, 7], [3, 7], [3, 6], [4, 6], [4, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [8, 2], [9, 2], [9, 3], [10, 3], [10, 4], [11, 4], [11, 5], [12, 5], [12, 6], [13, 6], [13, 7], [14, 7], [14, 8]];
lvl4p1 = [[1, 9], [2, 9], [3, 9], [3, 9], [3, 10], [4, 10], [4, 11], [5, 11], [5, 12], [6, 12], [6, 13], [7, 13], [7, 14], [8, 14], [9, 14], [9, 13], [10, 13], [10, 12], [11, 12], [11, 11], [12, 11], [12, 10], [13, 10], [13, 9], [14, 9]];
lvl5p0 = [[4, 15], [4, 14], [4, 13], [4, 13], [5, 13], [6, 13], [7, 13], [8, 13], [9, 13], [10, 13], [10, 12], [10, 11], [9, 11], [8, 11], [7, 11], [6, 11], [5, 11], [4, 11], [4, 10], [4, 9], [4, 8], [4, 7], [4, 6], [4, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [8, 3]];
lvl5p1 = [[8, 15], [8, 14], [8, 13], [8, 12], [8, 11], [8, 10], [8, 9], [8, 8], [8, 7], [8, 6], [8, 5], [8, 4], [8, 3]];
lvl5p2 = [[12, 15], [12, 14], [12, 13], [12, 12], [12, 11], [12, 10], [12, 9], [12, 9], [11, 9], [10, 9], [9, 9], [8, 9], [7, 9], [6, 9], [6, 8], [6, 7], [7, 7], [8, 7], [9, 7], [10, 7], [11, 7], [12, 7], [12, 6], [12, 5], [11, 5], [11, 4], [10, 4], [10, 3], [9, 3]];
lvl6p0 = [[1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [7, 3], [8, 3], [9, 3], [10, 3], [11, 3], [12, 3], [13, 3], [14, 3], [14, 4], [14, 5], [14, 6], [14, 7], [14, 8], [14, 9], [14, 10], [14, 11], [14, 12], [14, 13], [14, 14], [13, 14], [12, 14], [11, 14], [10, 14], [9, 14], [8, 14], [7, 14], [6, 14], [5, 14], [4, 14], [3, 14], [3, 13], [3, 12], [3, 11], [3, 10], [3, 9], [4, 9], [5, 9], [6, 9], [7, 9], [8, 9]];
lvl6p1 = [[1, 6], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [11, 7], [11, 8], [11, 9], [11, 10], [11, 11], [10, 11], [9, 11], [8, 11], [8, 10], [8, 9]];
lvl7p0 = [[1, 4], [2, 4], [3, 4], [4, 4], [5, 4], [6, 4], [7, 4], [8, 4], [9, 4], [10, 4], [11, 4], [12, 4], [12, 4], [12, 5], [12, 6], [11, 6], [10, 6], [9, 6], [8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 7], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8], [9, 8], [10, 8], [11, 8], [12, 8], [12, 9], [12, 10], [11, 10], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [4, 11], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [8, 13]];
lvl7p1 = [[4, 1], [4, 2], [4, 3], [4, 4], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12], [4, 12], [5, 12], [6, 12], [6, 11], [6, 10], [6, 9], [6, 8], [6, 7], [6, 6], [6, 5], [6, 4], [7, 4], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13]];
lvl7p2 = [[12, 1], [12, 2], [12, 3], [12, 4], [12, 5], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [12, 12], [11, 12], [10, 12], [10, 11], [10, 10], [10, 9], [10, 8], [10, 7], [10, 6], [10, 5], [10, 4], [9, 4], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13]];
lvl7p3 = [[15, 4], [14, 4], [13, 4], [12, 4], [11, 4], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [4, 4], [4, 5], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [12, 6], [12, 7], [12, 8], [11, 8], [10, 8], [9, 8], [8, 8], [7, 8], [6, 8], [5, 8], [4, 8], [4, 9], [4, 10], [5, 10], [6, 10], [7, 10], [8, 10], [9, 10], [10, 10], [11, 10], [12, 10], [12, 11], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [8, 13]];
lvl8p0 = [[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [11, 2], [12, 2], [13, 2], [14, 2], [14, 2], [14, 3], [14, 4], [13, 4], [12, 4], [11, 4], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [2, 5], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [12, 6], [13, 6], [14, 6], [14, 7], [14, 8], [13, 8], [12, 8], [11, 8], [10, 8], [9, 8]];
lvl8p1 = [[15, 14], [14, 14], [13, 14], [12, 14], [11, 14], [10, 14], [9, 14], [8, 14], [7, 14], [6, 14], [5, 14], [4, 14], [3, 14], [2, 14], [2, 14], [2, 13], [2, 12], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [9, 12], [10, 12], [11, 12], [12, 12], [13, 12], [14, 12], [14, 11], [14, 10], [13, 10], [12, 10], [11, 10], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [3, 10], [2, 10], [2, 9], [2, 8], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]];
lvl9p0 = [[5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 7], [6, 7], [7, 7], [8, 7], [9, 7], [9, 8], [9, 9], [9, 10], [9, 11], [9, 12], [9, 13]];
lvl9p1 = [[7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [7, 5], [8, 5], [9, 5], [10, 5], [11, 5], [12, 5], [13, 5], [13, 6], [13, 7], [13, 8], [13, 9], [13, 10], [13, 11], [12, 11], [11, 11], [11, 12], [11, 13], [10, 13], [9, 13]];
lvl9p2 = [[9, 1], [9, 2], [9, 3], [9, 3], [8, 3], [7, 3], [6, 3], [5, 3], [4, 3], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [4, 11], [5, 11], [6, 11], [7, 11], [7, 12], [7, 13], [8, 13]];
lvl9p3 = [[11, 1], [11, 2], [11, 3], [11, 4], [11, 5], [11, 6], [11, 7], [11, 8], [11, 9], [11, 9], [10, 9], [9, 9], [8, 9], [7, 9], [6, 9], [5, 9], [5, 10], [5, 11], [5, 12], [5, 13], [6, 13], [7, 13], [8, 13]];
lvl10p0 = [[1, 12], [2, 12], [3, 12], [4, 12], [4, 12], [4, 13], [4, 14], [5, 14], [6, 14], [7, 14], [8, 14], [9, 14], [10, 14], [10, 13], [10, 12], [9, 12], [8, 12], [7, 12], [6, 12], [6, 11], [6, 10], [7, 10], [8, 10], [8, 9]];
lvl10p1 = [[4, 1], [4, 2], [4, 3], [4, 4], [4, 4], [3, 4], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [3, 10], [4, 10], [4, 9], [4, 8], [4, 7], [4, 6], [5, 6], [6, 6], [6, 7], [6, 8], [7, 8], [8, 8]];
lvl10p2 = [[12, 15], [12, 14], [12, 13], [12, 12], [12, 12], [13, 12], [14, 12], [14, 11], [14, 10], [14, 9], [14, 8], [14, 7], [14, 6], [13, 6], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [11, 10], [10, 10], [10, 9], [10, 8], [9, 8]];
lvl10p3 = [[15, 4], [14, 4], [13, 4], [12, 4], [12, 4], [12, 3], [12, 2], [11, 2], [10, 2], [9, 2], [8, 2], [7, 2], [6, 2], [6, 3], [6, 4], [7, 4], [8, 4], [9, 4], [10, 4], [10, 5], [10, 6], [9, 6], [8, 6], [8, 7], [8, 8]];
mode7lvl = "00000000000000000000000000000000000000000000000000000000000000000000000000040001000100010001000000040000000000000000000000000000000000000000000001003000300030000100000000000000000000000000000000000000000000000001003000325532003000010000000000000000000000000000000000000000000001003000325534003200300001000000000000000000000000000000000000000000000100300032553200300001000000000000000000000000000000000000000000000000010030003000300001000000000000000000000000000000000000000000000000040001000100010001000000040000000000000000000000000000000000000000000000000000000000000000000000";
mode7spw1 = [[5, 30]];
mode7spw2 = [[1, 30]];
mode7spw3 = [[8, 30]];
mode7spw4 = [[0, 30]];
mode7spw5 = [[9, 25]];
mode7spw6 = [[2, 45]];
mode7spw7 = [[6, 30]];
mode7spw8 = [[7, 30]];
mode7spw9 = [[3, 30]];
mode7spw10 = [[10, 40]];
mode7achi1 = [[18, 5], [18, 20], [18, 35]];
mode7achi2 = [[18, 5], [18, 20], [18, 35]];
mode7achi3 = [[18, 5], [18, 20], [18, 35]];
mode7achi4 = [[18, 5], [18, 20], [18, 35]];
mode7achi5 = [[18, 5], [18, 20], [18, 35]];
mode7achi6 = [[18, 5], [18, 20], [18, 35]];
mode7achi7 = [[18, 5], [18, 20], [18, 35]];
mode7achi8 = [[18, 5], [18, 20], [18, 35]];
mode7achi9 = [[18, 5], [18, 20], [18, 35]];
mode7achi10 = [[18, 5], [18, 20], [18, 35]];
mode8lvl1 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000001000000000000000000000000010022000000220001000000000000000000000000000000000000000000000000000001000024000001000000000000000000000000000000000000000000000000000001002200000022000000000000000000000000000001000000010000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl2 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000010022000100220001000000000000000000000000000000000000000000000001002200010022000100000000000000000000000000000000000000000000000000000001002400010024000100000000000000000000000000000000000000000000000100220001002200000000000000000000000000000000000000000000000000000000000100220001002200010000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl3 = "00000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000100000000000000000000000000000000000000000000000100220001002200010022000100000000000000000000000000000000000000010022000100220001002200010000000000000000000000000000000000000000000000010024000100240001002400010000000000000000000000000000000000000001002200010022000100220001000000000000000000000000000000000000000000000001002200010022000100220001000000000000000000000000000000000000000000000001000000010000000100000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl4 = "00000000000000000000000000000000000000000000000000000000000000000000000000000100000100000100000100000000000000002200002200002200002200000000000100000100000100000100000100000000002200002200002200002200000000000000000100000100000100000100000000000000000000000000000000000000000001002401002401002401002400010000000000000000000000000000000000000000000000010000010000010000010000000000002200002200002200002200000000000001000001000001000001000001000000000000220000220000220000220000000000000100000100000100000100000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl5 = "00000000000000000000000000000000000000000000000000000000000000000000000000002200002200002200002200000000000001000001000001000001000000000000010000220000220000220001000000000000010000010000010000010000000000000000220000220000240000220000000000000100000100000100000100000000000001000024000024000024000100000000000001000001000001000001000000000000000022000022000024000022000000000000010000010000010000010000000000000100002200002200002200010000000000000100000100000100000100000000000000002200002200002200002200000000000000000000000000000000000000000000000000000000000000000000000000";
mode9lvl = "00000000000000000000000000000000000000000000000001000000000000010000000000010000000000000100000000000000000000000000000000000000000000000000010000000100000000000100000000000000000000000000010000000000000000000000010000000000000000000100000000000000000000000000000000000000000000000000000000000100000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000100000100000000000000000000000000000000000000010000000000000001000000000000000000000000000000000000000000010000000000000100000000000000000000000000000000000000";
loadGame();
openScreen("main", true);
stop();
Symbol 5 MovieClip [teslahit] Frame 6
this.removeMovieClip();
Symbol 8 MovieClip [star2] Frame 1
stop();
vspeed = 1 + random(3);
rot = 7 + random(5);
_alpha = 0;
timer = 20 + random(10);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_y = (_y - vspeed);
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
} else if (_alpha < 100) {
_alpha = (_alpha + 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 9 MovieClip [star1] Frame 1
stop();
rot = 7 + random(5);
_alpha = 0;
timer = 20 + random(10);
onEnterFrame = function () {
_rotation = (_rotation + rot);
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
} else if (_alpha < 100) {
_alpha = (_alpha + 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 12 MovieClip [pero2] Frame 1
dir = random(360);
speed = (3 + random(4)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 20 + random(20);
_rotation = random(360);
onEnterFrame = function () {
_y = (_y + vspeed);
_rotation = (_rotation + rot);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 4;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 15 MovieClip [pero] Frame 1
dir = random(360);
speed = (3 + random(4)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 20 + random(20);
_rotation = random(360);
onEnterFrame = function () {
_y = (_y + vspeed);
_rotation = (_rotation + rot);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 4;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 22 MovieClip [nuke1] Frame 10
playSound("explo");
_root.quake = 10;
Symbol 22 MovieClip [nuke1] Frame 14
_root.flashobj.gotoAndPlay(2);
castExplo(_root.levelmap._xmouse, _root.levelmap._ymouse, 640);
Symbol 22 MovieClip [nuke1] Frame 15
this.removeMovieClip();
Symbol 29 MovieClip Frame 1
gotoAndStop(1 + random(3));
Symbol 30 MovieClip [list] Frame 1
dir = random(360);
speed = (4 + random(5)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 10 + random(15);
_rotation = random(360);
onEnterFrame = function () {
_y = (_y + vspeed);
_rotation = (_rotation + rot);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 4;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 35 MovieClip [lakefx] Frame 49
this.removeMovieClip();
Symbol 38 MovieClip [hulk6] Frame 1
stop();
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
} else {
dir = 60 + random(30);
}
timer = 15 + random(15);
onEnterFrame = function () {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 41 MovieClip [hulk5] Frame 1
stop();
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
rot = -5 - random(5);
} else {
dir = 60 + random(30);
rot = 5 + random(5);
}
timer = 15 + random(15);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 48 MovieClip [hulk4] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 40 - random(80);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 51 MovieClip [hulk3] Frame 1
stop();
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
rot = -5 - random(5);
} else {
dir = 60 + random(30);
rot = 5 + random(5);
}
timer = 15 + random(15);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 58 MovieClip [hulk2] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 40 - random(80);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 65 MovieClip [hulk1] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 20 - random(40);
vrot = random(10);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (_yscale > 90) {
_yscale = -100;
} else {
_yscale = (_yscale + vrot);
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 86 MovieClip [explo2] Frame 19
this.removeMovieClip();
Symbol 87 MovieClip [explo1] Frame 19
this.removeMovieClip();
Symbol 110 MovieClip [dirt] Frame 1
gotoAndPlay(1 + random(3));
Symbol 110 MovieClip [dirt] Frame 28
this.removeMovieClip();
Symbol 115 MovieClip [damage1] Frame 1
stop();
_rotation = random(360);
onEnterFrame = function () {
if (_alpha < 10) {
this.removeMovieClip();
} else {
_alpha = (_alpha - 10);
}
};
Symbol 119 MovieClip [crack] Frame 1
if (random(2) == 0) {
_xscale = -100;
}
if (random(2) == 0) {
_yscale = -100;
}
Symbol 119 MovieClip [crack] Frame 33
this.removeMovieClip();
Symbol 122 MovieClip [clip2] Frame 1
dir = 60 + random(10);
vspeed = 0;
speed = 7 + random(3);
rot = 20 + random(10);
timer = speed * 4;
_rotation = -30;
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 125 MovieClip [clip1] Frame 1
dir = 60 + random(10);
vspeed = 0;
speed = 6 + random(2);
rot = 20 + random(10);
timer = speed * 4;
_rotation = -30;
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 132 MovieClip [chip] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 20 - random(40);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 135 MovieClip Frame 1
gotoAndStop(1 + random(3));
Symbol 136 MovieClip [bushflow] Frame 1
dir = random(360);
speed = (4 + random(5)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 10 + random(15);
_rotation = random(360);
onEnterFrame = function () {
_y = (_y + vspeed);
_rotation = (_rotation + rot);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 4;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 143 MovieClip [bullet] Frame 1
dir = random(360);
speed = 10;
damx = _root.damGun;
timer = 5;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
if (timer > 0) {
timer--;
} else {
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(_x, _y, z)) {
if (z.hp > 0) {
attackTree(z, 1, 0);
this.removeMovieClip();
}
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (hitPoint(_x, _y, z)) {
if (z._currentframe < 4) {
castHitChest(this);
this.removeMovieClip();
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(_x, _y, z)) {
trace(bankEnemy[i]);
castHitEnemy(this);
this.removeMovieClip();
}
i++;
}
}
if ((((_x < 0) || (_x > 800)) || (_y < 0)) || (_y > 600)) {
this.removeMovieClip();
}
}
};
Symbol 166 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 182 MovieClip [batdie] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 3 + random(2);
rot = 10 - random(20);
timer = 30 + random(10);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 182 MovieClip [batdie] Frame 17
stop();
Symbol 202 MovieClip [tree_s] Frame 1
stop();
Symbol 214 MovieClip [tree] Frame 1
if (img._currentframe == 1) {
hp = 40;
} else {
hp = 10;
}
w1 = -75;
w2 = 75;
h1 = -160;
h2 = -30;
act = 0;
scale = 20;
onEnterFrame = function () {
if (img._currentframe < 5) {
if (act > 0) {
if (_yscale < 100) {
_yscale = (_yscale + scale);
} else {
_yscale = (_yscale - scale);
}
if (scale < 1) {
act = 0;
_yscale = 100;
}
scale--;
}
}
};
Symbol 226 MovieClip Frame 1
stop();
Symbol 227 MovieClip [teslaobj] Frame 1
lifes = _root.bonusTesla;
timer = 5;
onEnterFrame = function () {
if (_root.paused == false) {
if (timer > 0) {
timer--;
} else {
fx.play();
playSound("tesla1", "tesla2");
castTesla(_x + 24, _y - 10);
timer = 15;
lifes--;
if (lifes == 0) {
createPart(_x + 24, _y + 18, "boom", levelmap.getNextHighestDepth(), 1);
_root.colmap[ytile][xtile] = 1;
bankTesla.splice(j, 1);
this.removeMovieClip();
}
}
}
};
Symbol 227 MovieClip [teslaobj] Frame 5
stop();
Symbol 230 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 232 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 234 MovieClip Frame 35
_parent.removeMovieClip();
Symbol 240 MovieClip Frame 26
_parent.removeMovieClip();
Symbol 243 MovieClip Frame 26
_parent.removeMovieClip();
Symbol 412 MovieClip [weap] Frame 1
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
w1 = -25;
w2 = 25;
h1 = -30;
h2 = 30;
if (info == 0) {
limit = limit + 10;
}
wait = 5;
onEnterFrame = function () {
if (wait > 0) {
wait--;
}
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
return;
case 2 :
if (limit > (-1 * vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else if (limit == (-1 * vspeed)) {
vspeed = -1 * (vspeed + 4);
limit = vspeed;
} else {
act = 0;
}
}
}
};
Symbol 605 MovieClip Frame 1
if (_parent.blue == undefined) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(_parent.blue + 1);
}
img.gotoAndPlay(1 + random(30));
timer = 40;
onEnterFrame = function () {
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_parent._x - 7) + random(14), (_parent._y - 7) + random(14), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 40;
}
}
};
Symbol 605 MovieClip Frame 2
img.gotoAndPlay(1 + random(30));
Symbol 605 MovieClip Frame 3
img.gotoAndPlay(1 + random(30));
Symbol 605 MovieClip Frame 4
img.gotoAndPlay(1 + random(30));
Symbol 639 MovieClip Frame 1
if (_parent.blue == undefined) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(_parent.blue + 1);
}
img.gotoAndPlay(1 + random(30));
timer = 40;
onEnterFrame = function () {
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_parent._x - 7) + random(14), (_parent._y - 7) + random(14), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 40;
}
}
};
Symbol 639 MovieClip Frame 2
img.gotoAndPlay(1 + random(30));
Symbol 639 MovieClip Frame 3
img.gotoAndPlay(1 + random(30));
Symbol 639 MovieClip Frame 4
img.gotoAndPlay(1 + random(30));
Symbol 790 MovieClip [prize] Frame 1
kill = false;
timer = 250 + random(50);
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
speed = vspeed / 2;
w1 = -50 * _root.bonusMagnet;
w2 = 50 * _root.bonusMagnet;
h1 = -50 * _root.bonusMagnet;
h2 = 50 * _root.bonusMagnet;
if (info == 0) {
limit = limit + 10;
speed = speed + 2;
}
if (info == 1) {
limit = 0;
speed = 0;
act = 2;
}
dir = (dir2 = random(360));
if (_x < 64) {
_x = 64;
}
if (_x > 704) {
_x = 704;
}
if (_y < 30) {
_y = 30;
}
if (_y > 500) {
_y = 500;
}
switch (_currentframe) {
case 1 :
img.gotoAndPlay(1 + random(12));
x = 90;
y = 68;
info = undefined;
break;
case 2 :
x = 90;
y = 68;
info = undefined;
break;
case 3 :
case 4 :
case 5 :
case 6 :
x = info._x + 24;
y = info._y + 18;
break;
case 7 :
x = 94;
y = 98;
info = undefined;
break;
case 8 :
case 9 :
x = 94;
y = 78;
blue = info;
info = undefined;
break;
case 10 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
x = 260 + ((_currentframe - 10) * 60);
y = 510;
info = undefined;
}
onEnterFrame = function () {
if ((_root.paused == false) or (_root.win == true)) {
if (kill == false) {
if (timer == 0) {
if (_xscale == 0) {
if (info != undefined) {
food = info;
dieFood(this);
}
diePrize(this);
} else {
_yscale = (_yscale - 5);
_xscale = (_yscale - 5);
}
} else {
timer--;
}
if (act > 0) {
if ((((_x < 90) or (_x > 730)) or (_y < 60)) or (_y > 520)) {
speed = 0;
}
if (speed > 0) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y - lengthdir_y(speed, dir));
speed = speed - 0.2;
}
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (limit > (-1 * vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else if (limit == (-1 * vspeed)) {
vspeed = -1 * (vspeed + 4);
limit = vspeed;
} else {
act = 0;
speed = 2;
dir = -1 * point_direction(_x, _y, x, y);
if (!((_root.magnit == true) or (_root.automagnet == true))) {
break;
}
kill = true;
}
}
} else if (_root.magnit == true) {
kill = true;
_yscale = 100;
_xscale = 100;
}
} else {
dist = point_distance(_x, _y, x, y);
if (dist > speed) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = Math.max(dist / 10, 20);
} else {
switch (_currentframe) {
case 1 :
_root.curr_money = _root.curr_money + (10 * _root.bonusDeposit);
_root.achi[6]++;
addStat(2, 10 * _root.bonusDeposit);
diePrize(this);
break;
case 2 :
_root.curr_money = _root.curr_money + (20 * _root.bonusDeposit);
_root.achi[7]++;
addStat(2, 30 * _root.bonusDeposit);
diePrize(this);
break;
case 3 :
case 4 :
case 5 :
case 6 :
if (info.count < 5) {
info.count++;
z = info["grib" + info.count];
z._visible = true;
z._xscale = (z._yscale = 10);
}
createScore(info._x, info._y, 1);
diePrize(this);
break;
case 7 :
_root.key++;
diePrize(this);
break;
case 8 :
_root.curr_money = _root.curr_money + (250 * _root.bonusDeposit);
_root.achi[8]++;
addStat(2, 150 * _root.bonusDeposit);
diePrize(this);
break;
case 9 :
_root.curr_money = _root.curr_money + (50 * _root.bonusDeposit);
addStat(2, 50 * _root.bonusDeposit);
diePrize(this);
break;
case 10 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
addMine(_currentframe - 2);
diePrize(this);
}
}
}
}
};
Symbol 790 MovieClip [prize] Frame 2
img.gotoAndPlay(1 + random(12));
Symbol 794 MovieClip [mineobj] Frame 5
stop();
Symbol 797 MovieClip [lakeobj] Frame 1
timer = 30 + random(60);
onEnterFrame = function () {
if (timer == 0) {
timer = 30 + random(60);
createGroundPart((_x + 64) + 350, (_y + 30) + 260, "lakefx");
} else {
timer--;
}
};
Symbol 827 MovieClip [lairobj] Frame 1
timer = 30;
count = 0;
hp = 80;
w1 = -55;
w2 = 55;
h1 = -4;
h2 = 76;
act = 0;
scale = 10;
animal = 0;
limit = 3;
onEnterFrame = function () {
if (_root.paused == false) {
if (img._currentframe < 5) {
if (timer == 0) {
if (count < limit) {
count++;
if (_currentframe == 1) {
animal = 1 + random(7);
} else {
animal = _currentframe - 1;
}
switch (animal) {
case 1 :
createEnemy(xtile, ytile + 1, 1, 0, this);
timer = 45;
break;
case 2 :
createEnemy(xtile, ytile + 1, 2, 0, this);
timer = 80;
break;
case 3 :
createEnemy(xtile, ytile + 1, 5, 0, this);
timer = 30;
break;
case 4 :
createEnemy(xtile, ytile + 1, 8, 0, this);
timer = 50;
break;
case 5 :
createEnemy(xtile, ytile + 1, 9, 0, this);
timer = 60;
break;
case 6 :
createEnemy(xtile, ytile + 1, 0, 0, this);
timer = 70;
break;
case 7 :
createEnemy(xtile, ytile + 1, 10, 0, this);
timer = 120;
}
}
} else {
timer--;
}
if (act > 0) {
if (img._x < 0) {
img._x = img._x + scale;
} else {
img._x = img._x - scale;
}
if (scale < 1) {
act = 0;
img._x = 0;
}
scale--;
}
} else if (img._alpha > 0) {
img._alpha = img._alpha - 4;
}
}
};
Symbol 853 MovieClip [kap] Frame 23
stop();
Symbol 896 MovieClip Frame 1
gotoAndStop(((5 * (_parent.type - 1)) + 2) + random(5));
onEnterFrame = function () {
if (_xscale != 100) {
if (_xscale < 100) {
_yscale = (_yscale + 20);
_xscale = (_yscale + 20);
} else {
_yscale = (_yscale - 30);
_xscale = (_yscale - 30);
}
}
};
Symbol 897 MovieClip [food] Frame 1
kill = false;
xtile = _x / 48;
ytile = _y / 36;
krot = new Array();
krot[0] = false;
krot[1] = false;
krot[2] = false;
krot[3] = false;
krot[4] = false;
krot[5] = false;
krot[6] = false;
krot[7] = false;
i = 1;
while (i <= 5) {
x = this["grib" + i];
y = this["grib" + (1 + random(5))];
z = x._name;
x._name = y._name;
y._name = z;
i++;
}
i = count + 1;
while (i <= 5) {
this["grib" + i]._visible = false;
i++;
}
onEnterFrame = function () {
if (kill == true) {
_alpha = (_alpha - 5);
if (_alpha < 1) {
this.removeMovieClip();
}
}
};
Symbol 909 MovieClip Frame 1
stop();
Symbol 1003 MovieClip [enemy10] Frame 1
stop();
hp = 100;
w1 = -20;
w2 = 70;
h1 = -35;
h2 = 40;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
cargo = false;
cargonum = 0;
grib1._visible = false;
grib2._visible = false;
grib3._visible = false;
grib4._visible = false;
grib5._visible = false;
grib1.grib.gotoAndStop(1);
grib2.grib.gotoAndStop(1);
grib3.grib.gotoAndStop(1);
grib4.grib.gotoAndStop(1);
grib5.grib.gotoAndStop(1);
fade = true;
_alpha = 10;
scale = 10;
scaleon = false;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
if (scaleon == true) {
if (imin._yscale < 100) {
imin._yscale = imin._yscale + scale;
} else {
imin._yscale = imin._yscale - scale;
}
if (scale < 1) {
scaleon = false;
imin._yscale = 100;
}
scale--;
}
warn._visible = cargo;
if (moving == 1) {
if (_root.minigame != 1) {
moveBig(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
} else {
moving++;
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib1._xscale != 100) {
if (grib1._xscale < 100) {
grib1._xscale = (grib1._yscale = grib1._yscale + 20);
grib2._xscale = (grib2._yscale = grib2._yscale + 20);
grib3._xscale = (grib3._yscale = grib3._yscale + 20);
grib4._xscale = (grib4._yscale = grib4._yscale + 20);
grib5._xscale = (grib5._yscale = grib5._yscale + 20);
} else {
grib1._xscale = (grib1._yscale = grib1._yscale - 30);
grib2._xscale = (grib2._yscale = grib2._yscale - 30);
grib3._xscale = (grib3._yscale = grib3._yscale - 30);
grib4._xscale = (grib4._yscale = grib4._yscale - 30);
grib5._xscale = (grib5._yscale = grib5._yscale - 30);
}
}
}
};
Symbol 1016 MovieClip Frame 1
stop();
Symbol 1034 MovieClip [enemy9] Frame 1
stop();
speed = 2;
w1 = -40;
w2 = 40;
h1 = -30;
h2 = 40;
if (_root.minigame != 1) {
xstart = (xtile = _x / 48);
} else {
xstart = 0;
}
ystart = (ytile = _y / 36);
if (random(10) < 5) {
bird._xscale = bird._xscale * -1;
}
moving = 1;
step = 2 + random(2);
die = false;
cargo = false;
bird.grib._visible = false;
bird.weap._visible = false;
if (info > 0) {
bird.weap._visible = true;
bird.weap.gotoAndStop(info + 6);
}
huntBat(this);
onEnterFrame = function () {
if (_root.paused == false) {
warn._visible = cargo;
if (moving == 1) {
dist = point_distance(_x, _y, flyx, flyy);
if (dist > 5) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = Math.min(dist / 10, 10);
} else {
if (step > 0) {
moving = -25 - random(15);
} else {
moving = -30;
if (step == 0) {
if (food.count > 0) {
cargo = (bird.grib._visible = true);
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
} else if (cargo == true) {
dieFood(this);
} else {
delEnemy(this);
}
}
step--;
}
if (_y != ypre) {
this.swapDepths(6400000 + id);
}
ypre = _y;
} else {
if (moving == 0) {
huntBat(this);
}
moving++;
}
if (_x < 20) {
if (_root.minigame == 1) {
delEnemy(this);
}
}
}
};
Symbol 1184 MovieClip Frame 16
_parent.act = 4;
_parent.gotoAndStop("fly");
Symbol 1201 MovieClip Frame 26
gotoAndPlay (16);
Symbol 1202 MovieClip [enemy8] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
flying = false;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 10);
gotoAndStop (6);
}
_root[(("lvl" + lvl) + "p") + ww];
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
warn._visible = cargo;
if (flying == false) {
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
gotoAndStop(_currentframe - 8);
moving = 1;
}
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
}
} else {
switch (act) {
case 3 :
y = _y;
break;
case 4 :
_y = (_y - 3);
if (_xscale > 100) {
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
}
if (_y >= -30) {
break;
}
if (cargo != true) {
break;
}
dieFood(this);
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._xscale = (grib._yscale = grib._yscale + 20);
} else {
grib._xscale = (grib._yscale = grib._yscale - 30);
}
}
}
};
Symbol 1383 MovieClip [enemy7] Frame 1
hp = 100;
w1 = -25;
w2 = 25;
h1 = -35;
h2 = 15;
hplow = hp;
hpgui = 0;
hpbar._visible = false;
hplowbar._visible = false;
hpbor._visible = false;
act = 0;
timer = 0;
nodam = false;
cargo = false;
image_index = 1;
if (_root.minigame != 1) {
huntKrot(this);
food.krot[place] == true;
nodam = false;
} else {
gotoAndStop (4);
nodam = true;
warn._visible = false;
}
this.swapDepths((_y * 10000) + id);
onEnterFrame = function () {
if (_root.paused == false) {
img.gotoAndStop(image_index);
switch (act) {
case 0 :
image_index++;
if (image_index > 9) {
act = 1;
if (_root.minigame != 1) {
timer = 20 + random(20);
} else {
timer = 20 + random(120);
}
}
break;
case 1 :
if (timer > 0) {
timer--;
} else {
nodam = false;
act = 2;
}
break;
case 2 :
image_index++;
if (image_index > 29) {
act = 3;
timer = 60 + random(40);
}
break;
case 3 :
if (timer > 0) {
timer--;
} else if (_root.minigame != 1) {
act = 4;
} else {
act = 7;
}
break;
case 4 :
image_index++;
if (image_index > 35) {
act = 5;
if (food.count > 0) {
cargo = true;
img.grib.gotoAndStop(food.type);
img.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
}
break;
case 5 :
image_index++;
if (image_index > 44) {
act = 6;
timer = 9;
nodam = true;
}
break;
case 6 :
if (timer > 0) {
timer--;
_alpha = (_alpha - 10);
} else {
dieFood(this);
}
break;
case 7 :
image_index--;
if (image_index >= 11) {
break;
}
_root.life--;
_root.achi[20]--;
act = 6;
timer = 9;
nodam = true;
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1406 MovieClip Frame 14
gotoAndPlay (1);
Symbol 1407 MovieClip [enemy6] Frame 1
stop();
hp = 100;
if (_root.minigame != 1) {
_y = -30;
} else {
_y = 600;
}
shad._alpha = 25;
shad._xscale = (shad._yscale = 75);
w1 = -30;
w2 = 30;
h1 = bird._y - 40;
h2 = bird._y + 30;
hplow = hp;
hpgui = 0;
sleep = false;
moving = 1;
if (random(10) < 5) {
bird._xscale = bird._xscale * -1;
shad._xscale = shad._xscale * -1;
}
if (((_root.minigame == 0) || (_root.minigame == 5)) || (_root.minigame == 6)) {
ishunt = true;
} else {
ishunt = false;
}
if (ishunt) {
huntSova(this);
}
cargo = false;
goback = false;
bird.weap._visible = false;
shad.weap._visible = false;
bird.grib._visible = false;
shad.grib._visible = false;
if (ishunt) {
speed = 3 + random(3);
this.swapDepths((food._y * 10000) + id);
} else if (_root.minigame == 1) {
speed = (3 + (_root.mini_diff / 10)) + random(3);
this.swapDepths((_y * 10000) + id);
}
onEnterFrame = function () {
if (_root.paused == false) {
warn._visible = cargo;
if (moving == 1) {
if (ishunt) {
dist = Math.abs(_y - food._y);
if (dist < 100) {
if (speed > 0) {
_y = (_y + Math.ceil(((speed * dist) / 100) + 0.1));
} else {
_y = (_y + Math.floor(((speed * dist) / 100) - 0.1));
}
shad._visible = true;
shad._y = dist;
shad._alpha = 50 - (dist / 2);
shad._xscale = 100 - (dist / 4);
shad._yscale = shad._xscale;
if (dist < 5) {
if (goback == false) {
speed = speed * -1;
goback = true;
if (food.count > 0) {
cargo = (bird.grib._visible = true);
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
}
}
} else {
_y = (_y + speed);
shad._visible = false;
}
}
if (sleep == true) {
bird.gotoAndPlay(1);
shad.gotoAndPlay(1);
sleep = false;
}
} else {
moving++;
}
if (ishunt) {
if (_y < -30) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else if (_root.minigame == 1) {
_y = (_y - speed);
if (_y < 0) {
delEnemy(this);
}
}
hpbar._y = bird._y - 40;
hplowbar._y = bird._y - 40;
hpbor._y = bird._y - 40;
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1575 MovieClip [enemy5] Frame 1
stop();
step = 0;
hp = 100;
w1 = -5;
w2 = 53;
h1 = -15;
h2 = 40;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
eating = 0;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 1;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntKrolik(this);
}
} else {
speed = Math.round(((25 + (_root.mini_diff * 4)) + random(25)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
if (moving == 1) {
if (_root.minigame != 1) {
moveKrolik(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
gotoAndStop(_currentframe - 8);
moving = 1;
}
}
z = y - _y;
shad._xscale = (shad._yscale = 100 - z);
shad._y = z + 20;
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1647 MovieClip [enemy4] Frame 1
gotoAndStop (8);
speed = 2;
w1 = 0;
w2 = 50;
h1 = -15;
h2 = 35;
if ((_root.minigame == 1) || (_root.minigame == 3)) {
xstart = 0;
} else {
xstart = (xtile = _x / 48);
}
ystart = (ytile = _y / 36);
moving = 1;
act = 0;
die = false;
path = new Array();
if (_root.minigame == 2) {
speed = 1;
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntSpider(this);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (moving == 1) {
moveSpider(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else {
if (moving == 0) {
huntSpider(this);
spid.play();
}
moving++;
}
if (_x < 20) {
if (_root.minigame == 1) {
delEnemy(this);
}
}
}
};
Symbol 1647 MovieClip [enemy4] Frame 20
if ((_root.minigame == 0) or (_root.minigame == 6)) {
_root.rain.gotoAndPlay(2);
}
Symbol 1647 MovieClip [enemy4] Frame 36
stop();
onEnterFrame = function () {
_alpha = (_alpha - 2);
if (_alpha < 2) {
this.removeMovieClip();
}
};
Symbol 1672 MovieClip Frame 14
gotoAndPlay (1);
Symbol 1673 MovieClip [enemy3] Frame 1
stop();
hp = 100;
shad._alpha = 25;
shad._xscale = (shad._yscale = 75);
hplow = hp;
hpgui = 0;
moving = 1;
w1 = -30;
w2 = 30;
h1 = bird._y - 30;
h2 = bird._y + 30;
if (_x < 300) {
_x = 24;
path = -1;
bird._xscale = bird._xscale * -1;
shad._xscale = shad._xscale * -1;
} else {
_x = 808;
path = 1;
}
if (((_root.minigame == 0) || (_root.minigame == 5)) || (_root.minigame == 6)) {
ishunt = true;
} else {
ishunt = false;
}
if (info == 0) {
bird.weap._visible = false;
shad.weap._visible = false;
if (ishunt) {
huntVor(this);
}
} else {
bird.weap.gotoAndStop(info);
shad.weap.gotoAndStop(info);
_y = (200 + random(260));
}
sleep = false;
cargo = false;
bird.grib._visible = false;
shad.grib._visible = false;
if (ishunt) {
speed = (-4 - random(4)) * path;
} else if (_root.minigame == 2) {
speed = 3 + (random(41) / 10);
} else {
speed = (4 + (_root.mini_diff / 10)) + random(4);
}
this.swapDepths((_y * 10000) + id);
onEnterFrame = function () {
if (_root.paused == false) {
warn._visible = cargo;
if (moving == 1) {
if (ishunt) {
_x = (_x + speed);
if (info == 0) {
h1 = bird._y - 30;
h2 = bird._y + 30;
dist = Math.abs((_x - food._x) - 24);
if (dist < 100) {
shad._alpha = 50 - (dist / 4);
shad._xscale = (100 - (dist / 4)) * path;
shad._yscale = shad._xscale * path;
bird._y = -dist;
if (dist < 5) {
if (cargo == false) {
if (food.count > 0) {
cargo = (bird.grib._visible = true);
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
}
}
}
}
}
if (sleep == true) {
bird.gotoAndPlay(1);
shad.gotoAndPlay(1);
sleep = false;
}
} else {
moving++;
}
if (ishunt) {
if (_x < 24) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
if (_x > 808) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else if (_root.minigame == 2) {
_x = (_x + speed);
if (_x > 828) {
dieBird(this);
}
} else {
_x = (_x - speed);
if (_x < 0) {
delEnemy(this);
}
}
hpbar._y = bird._y - 30;
hplowbar._y = bird._y - 30;
hpbor._y = bird._y - 30;
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1895 MovieClip Frame 39
gotoAndPlay (15);
Symbol 1906 MovieClip [enemy2] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 56;
h1 = -46;
h2 = 43;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
eating = 0;
act = 0;
vspeed = 0;
killgrib = false;
cargo = false;
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((12 + (_root.mini_diff * 3)) + random(12)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
if ((moving == 1) and (eating == 0)) {
if (_root.minigame != 1) {
moveMedved(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
} else if (moving < 1) {
moving++;
if (moving == 1) {
if (eating > 5) {
eating = 43;
gotoAndStop (10);
} else {
trace(last);
gotoAndStop(last);
}
}
} else if (eating > 0) {
eating--;
if (eating == 5) {
if (food.count > 1) {
playSound("beareat");
food["grib" + food.count]._visible = false;
food.count--;
_root.achi[18]--;
createScore(_x, _y, 2);
} else if (food.count == 1) {
playSound("beareat");
food.grib1._visible = false;
food.count = 0;
dieFood(this);
}
food = undefined;
huntEnemy(this);
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1906 MovieClip [enemy2] Frame 13
onEnterFrame = function () {
_alpha = (_alpha - 2);
if (_alpha < 2) {
this.removeMovieClip();
}
};
Symbol 1906 MovieClip [enemy2] Frame 21
stop();
Symbol 2087 MovieClip [enemy1] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
grib.grib.gotoAndStop(1);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
warn._visible = cargo;
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
gotoAndStop(_currentframe - 8);
moving = 1;
}
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._xscale = (grib._yscale = grib._yscale + 20);
} else {
grib._xscale = (grib._yscale = grib._yscale - 30);
}
}
}
};
Symbol 2330 MovieClip [enemy0] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
armor = true;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
grib.grib.gotoAndStop(1);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 1;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 30);
gotoAndStop (30);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
warn._visible = cargo;
shad._alpha = 30;
shad._xscale = (shad._yscale = 100);
shad._y = 29;
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - (speed * 5));
} else {
delEnemy(this);
}
if (sleep == true) {
if (armor == true) {
gotoAndStop(_currentframe + 8);
} else {
gotoAndStop(_currentframe - 16);
}
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
if (armor != true) {
gotoAndStop(_currentframe - 8);
}
moving = 1;
}
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._xscale = (grib._yscale = grib._yscale + 20);
} else {
grib._xscale = (grib._yscale = grib._yscale - 30);
}
}
}
};
Symbol 2344 MovieClip [crystal] Frame 1
hp = 100 - (img._currentframe * 20);
w1 = -35;
w2 = 35;
h1 = -70;
h2 = 10;
act = 0;
scale = 20;
timer = random(40);
onEnterFrame = function () {
if (img._currentframe < 5) {
if (act > 0) {
if (_rotation < 0) {
_rotation = (_rotation + scale);
} else {
_rotation = (_rotation - scale);
}
if (scale < 1) {
act = 0;
_rotation = 0;
}
scale--;
}
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_x - 20) + random(40), (_y - 70) + random(80), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 40;
}
}
}
};
Symbol 2353 MovieClip Frame 1
stop();
Symbol 2362 MovieClip Frame 1
stop();
Symbol 2390 MovieClip Frame 1
stop();
timer = 5;
key1._visible = false;
keys = 1;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 2393 MovieClip Frame 1
stop();
timer = 5;
key1._visible = false;
keys = 1;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 2397 MovieClip Frame 1
stop();
timer = 5;
key1._visible = false;
key2._visible = false;
key3._visible = false;
keys = 3;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 2398 MovieClip [chest] Frame 1
hp = 100;
w1 = -12;
w2 = 58;
h1 = -35;
h2 = 40;
Symbol 2406 MovieClip [bushobj] Frame 1
if (img._currentframe == 1) {
hp = 20;
} else {
hp = 10;
}
w1 = -70;
w2 = 70;
h1 = -110;
h2 = -15;
act = 0;
scale = 20;
onEnterFrame = function () {
if (img._currentframe < 5) {
if (act > 0) {
if (_yscale < 100) {
_yscale = (_yscale + scale);
} else {
_yscale = (_yscale - scale);
}
if (scale < 1) {
act = 0;
_yscale = 100;
}
scale--;
}
}
};
Symbol 3755 MovieClip [__Packages.Playtomic.LogRequest] Frame 0
class Playtomic.LogRequest
{
var Pieces;
function LogRequest () {
}
function Queue(data) {
Pieces++;
Data = Data + (((Data == "") ? "" : "~") + data);
if ((Pieces == 8) || (Data.length > 300)) {
Pieces = 0;
Ready = true;
}
}
function Send() {
var _local3 = function (success) {
if ((this.Data.indexOf("v/") == 0) || (this.Data.indexOf("~v/") > -1)) {
Playtomic.Log.IncreaseViews();
}
if ((this.Data.indexOf("p/") == 0) || (this.Data.indexOf("~p/") > -1)) {
Playtomic.Log.IncreasePlays();
}
};
var _local2 = new LoadVars();
_local2.sendAndLoad(((((((((("http://g" + Playtomic.Log.GUID) + ".api.playtomic.com/Tracker/q.aspx?swfid=") + Playtomic.Log.SWFID) + "&q=") + Data) + "&url=") + Playtomic.Log.SourceUrl) + "&") + Math.random()) + "z", _local3, "POST");
}
var Data = "";
var Ready = false;
}
Symbol 3756 MovieClip [__Packages.Playtomic.Log] Frame 0
class Playtomic.Log
{
static var SourceUrl, Cookie;
function Log () {
}
static function View(swfid, guid, defaulturl) {
if (swfid == undefined) {
swfid = 0;
}
if (guid == undefined) {
guid = "";
}
if (defaulturl == undefined) {
defaulturl = "";
}
if (SWFID > 0) {
return(undefined);
}
SWFID = swfid;
GUID = guid;
Enabled = true;
if ((SWFID == 0) || (GUID == "")) {
Enabled = false;
return(undefined);
}
if (defaulturl.indexOf("http://") != 0) {
Enabled = false;
return(undefined);
}
SourceUrl = defaulturl;
if (((SourceUrl == null) || (SourceUrl == "")) || (SourceUrl.indexOf("https://") == 0)) {
Enabled = false;
return(undefined);
}
Cookie = SharedObject.getLocal("playtomic");
var _local5 = GetCookie("views");
Send("v/" + _local5, true);
_global.setTimeout(PingServer, 60000);
}
static function ForceSend() {
if (Request == null) {
return(undefined);
}
Request.Send();
Request = new Playtomic.LogRequest();
}
static function Play() {
if (!Enabled) {
return(undefined);
}
LevelCounters = new Array();
LevelAverages = new Array();
LevelRangeds = new Array();
Send("p/" + (Plays + 1), true);
}
static function CustomMetric(name, group, unique) {
if (!Enabled) {
return(undefined);
}
if ((group == null) || (group == undefined)) {
group = "";
}
if ((unique == null) || (unique == undefined)) {
unique = false;
}
if (unique) {
if (Contains(Customs, name)) {
return(undefined);
}
Customs.push(name);
}
Send((("c/" + Clean(name)) + "/") + Clean(group));
}
static function Link(url, name, group, unique, total, fail) {
if (!Enabled) {
return(undefined);
}
Send((((((((((("l/" + Clean(name)) + "/") + Clean(group)) + "/") + Clean(url)) + "/") + unique) + "/") + total) + "/") + fail);
}
static function LevelCounterMetric(name, level, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
var _local1 = (name + ".") + level.toString();
if (Contains(LevelCounters, _local1)) {
return(undefined);
}
LevelCounters.push(_local1);
}
Send((("lc/" + Clean(name)) + "/") + Clean(level));
}
static function LevelRangedMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
var _local1 = (name + ".") + level.toString();
if (Contains(LevelRangeds, _local1)) {
return(undefined);
}
LevelRangeds.push(_local1);
SaveCookie("lr_" + name, 1);
}
Send((((("lr/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function LevelAverageMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
var _local1 = (name + ".") + level.toString();
if (Contains(LevelAverages, _local1)) {
return(undefined);
}
LevelAverages.push(_local1);
}
Send((((("la/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function Contains(arr, key) {
var _local1 = arr.length - 1;
while (_local1 > -1) {
if (arr[_local1] == key) {
return(true);
}
_local1--;
}
return(false);
}
static function Heatmap(metric, heatmap, x, y) {
if (!Enabled) {
return(undefined);
}
Send((((((("h/" + Clean(metric)) + "/") + Clean(heatmap)) + "/") + x) + "/") + y);
}
static function Funnel(name, step, stepnum) {
if (!Enabled) {
return(undefined);
}
Send((((("f/" + Clean(name)) + "/") + Clean(step)) + "/") + stepnum);
}
static function PlayerLevelStart(levelid) {
if (!Enabled) {
return(undefined);
}
Send("pls/" + levelid);
}
static function PlayerLevelWin(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plw/" + levelid);
}
static function PlayerLevelQuit(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plq/" + levelid);
}
static function PlayerLevelRetry(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plr/" + levelid);
}
static function PlayerLevelFlag(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plf/" + levelid);
}
static function PingServer() {
if (!Enabled) {
return(undefined);
}
Pings++;
Send((("t/" + (FirstPing ? "y" : "n")) + "/") + Pings, true);
if (FirstPing) {
FirstPing = false;
setInterval(PingServer, 60000);
}
}
static function Send(s, view) {
if (view == undefined) {
view = false;
}
Request.Queue(s);
if ((Request.Ready || (view)) || (!Queue)) {
Request.Send();
Request = new Playtomic.LogRequest();
}
}
static function GetCookie(n) {
if (Cookie.data[n] == undefined) {
return(0);
}
return(parseInt(Cookie.data[n]));
}
static function SaveCookie(n, v) {
Cookie.data[n] = v.toString();
Cookie.flush();
}
static function Clean(s) {
while (s.indexOf("/") > -1) {
s = Replace(s, "/", "\\");
}
while (s.indexOf("~") > -1) {
s = Replace(s, "~", "-");
}
return(escape(s));
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static function IncreaseViews() {
var _local1 = GetCookie("views");
_local1++;
SaveCookie("views", _local1);
}
static function IncreasePlays() {
Plays++;
}
static var Enabled = false;
static var Queue = true;
static var SWFID = 0;
static var GUID = "";
static var Request = new Playtomic.LogRequest();
static var FirstPing = true;
static var Pings = 0;
static var Plays = 0;
static var HighestGoal = 0;
static var Customs = new Array();
static var LevelCounters = new Array();
static var LevelAverages = new Array();
static var LevelRangeds = new Array();
}
Symbol 3757 MovieClip [__Packages.Playtomic.Link] Frame 0
class Playtomic.Link
{
function Link () {
}
static function Open(url, name, group) {
var _local9 = 0;
var _local5 = 0;
var _local3 = 0;
var _local4 = 0;
var _local8 = 0;
var _local11 = 0;
var _local6 = (url + ".") + name;
var _local7;
var _local1 = url;
_local1 = Replace(_local1, "http://", "");
if (_local1.indexOf("/") > -1) {
_local1 = _local1.substring(0, _local1.indexOf("/"));
}
if (_local1.indexOf("?") > -1) {
_local1 = _local1.substring(0, _local1.indexOf("?"));
}
_local1 = ("http://" + _local1) + "/";
var _local2 = _local1;
if (_local2.indexOf("//") > -1) {
_local2 = _local2.substring(_local2.indexOf("//") + 2);
}
_local2 = Replace(_local2, "www.", "");
if (_local2.indexOf("/") > -1) {
_local2 = _local2.substring(0, _local2.indexOf("/"));
}
try {
getURL (url, "_blank");
if (Clicks.indexOf(_local6) > -1) {
_local3 = 1;
} else {
_local3 = 1;
_local9 = 1;
Clicks.push(_local6);
}
if (Clicks.indexOf(_local2) > -1) {
_local4 = 1;
} else {
_local4 = 1;
_local5 = 1;
Clicks.push(_local2);
}
_local7 = true;
} catch(err) {
_local8 = 1;
_local11 = 1;
_local7 = false;
}
Playtomic.Log.Link(_local1, _local2.toLowerCase(), "DomainTotals", _local5, _local4, _local11);
Playtomic.Log.Link(url, name, group, _local9, _local3, _local8);
Playtomic.Log.ForceSend();
return(_local7);
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static var Clicks = new Array();
}
Symbol 2430 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndStop (1);
}
Symbol 2436 MovieClip Frame 1
stop();
Symbol 2436 MovieClip Frame 7
stop();
Symbol 2440 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
visitSite("spon");
}
Symbol 2443 Button
on (release) {
visitSite("spon");
}
Symbol 2469 MovieClip Frame 86
_root.gotoAndStop(4);
Symbol 2479 MovieClip Frame 86
_root.gotoAndStop("Language");
Symbol 2487 MovieClip Frame 1
stop();
Symbol 2580 MovieClip Frame 1
stop();
Symbol 2580 MovieClip Frame 2
gotoAndStop (1);
Symbol 2580 MovieClip Frame 7
gotoAndStop (1);
Symbol 2580 MovieClip Frame 13
gotoAndStop (1);
Symbol 2580 MovieClip Frame 19
gotoAndStop (1);
Symbol 2580 MovieClip Frame 25
gotoAndStop (1);
Symbol 2580 MovieClip Frame 31
gotoAndStop (1);
Symbol 2580 MovieClip Frame 37
gotoAndStop (1);
Symbol 2580 MovieClip Frame 43
gotoAndStop (1);
Symbol 2580 MovieClip Frame 49
gotoAndStop (1);
Symbol 2580 MovieClip Frame 55
gotoAndStop (1);
Symbol 2580 MovieClip Frame 61
gotoAndStop (1);
Symbol 2580 MovieClip Frame 67
gotoAndStop (1);
Symbol 2580 MovieClip Frame 73
gotoAndStop (1);
Symbol 2580 MovieClip Frame 79
gotoAndStop (1);
Symbol 2580 MovieClip Frame 85
gotoAndStop (1);
Symbol 2580 MovieClip Frame 91
gotoAndStop (1);
Symbol 2580 MovieClip Frame 97
gotoAndStop (1);
Symbol 2580 MovieClip Frame 103
gotoAndStop (1);
Symbol 2580 MovieClip Frame 109
gotoAndStop (1);
Symbol 2580 MovieClip Frame 115
gotoAndStop (1);
Symbol 2580 MovieClip Frame 121
gotoAndStop (1);
Symbol 2580 MovieClip Frame 127
gotoAndStop (1);
Symbol 2580 MovieClip Frame 133
gotoAndStop (1);
Symbol 2580 MovieClip Frame 139
gotoAndStop (1);
Symbol 2580 MovieClip Frame 145
gotoAndStop (1);
Symbol 2580 MovieClip Frame 151
gotoAndStop (1);
Symbol 2580 MovieClip Frame 157
gotoAndStop (1);
Symbol 2580 MovieClip Frame 163
gotoAndStop (1);
Symbol 2580 MovieClip Frame 169
gotoAndStop (1);
Symbol 2580 MovieClip Frame 175
gotoAndStop (1);
Symbol 2580 MovieClip Frame 181
gotoAndStop (1);
Symbol 2580 MovieClip Frame 187
gotoAndStop (1);
Symbol 2580 MovieClip Frame 193
gotoAndStop (1);
Symbol 2580 MovieClip Frame 199
gotoAndStop (1);
Symbol 2580 MovieClip Frame 205
gotoAndStop (1);
Symbol 2580 MovieClip Frame 211
gotoAndStop (1);
Symbol 2580 MovieClip Frame 217
gotoAndStop (1);
Symbol 2580 MovieClip Frame 223
gotoAndStop (1);
Symbol 2580 MovieClip Frame 229
gotoAndStop (1);
Symbol 2580 MovieClip Frame 235
gotoAndStop (1);
Symbol 2580 MovieClip Frame 241
gotoAndStop (1);
Symbol 2580 MovieClip Frame 247
gotoAndStop (1);
Symbol 2580 MovieClip Frame 253
gotoAndStop (1);
Symbol 2580 MovieClip Frame 259
gotoAndStop (1);
Symbol 2580 MovieClip Frame 265
gotoAndStop (1);
Symbol 2580 MovieClip Frame 271
gotoAndStop (1);
Symbol 2580 MovieClip Frame 277
gotoAndStop (1);
Symbol 2580 MovieClip Frame 283
gotoAndStop (1);
Symbol 2580 MovieClip Frame 289
gotoAndStop (1);
Symbol 2580 MovieClip Frame 295
gotoAndStop (1);
Symbol 2580 MovieClip Frame 301
gotoAndStop (1);
Symbol 2580 MovieClip Frame 307
gotoAndStop (1);
Symbol 2580 MovieClip Frame 313
gotoAndStop (1);
Symbol 2580 MovieClip Frame 319
gotoAndStop (1);
Symbol 2580 MovieClip Frame 325
gotoAndStop (1);
Symbol 2580 MovieClip Frame 331
gotoAndStop (1);
Symbol 2580 MovieClip Frame 337
gotoAndStop (1);
Symbol 2580 MovieClip Frame 343
gotoAndStop (1);
Symbol 2580 MovieClip Frame 349
gotoAndStop (1);
Symbol 2580 MovieClip Frame 355
gotoAndStop (1);
Symbol 2580 MovieClip Frame 361
gotoAndStop (1);
Symbol 2580 MovieClip Frame 367
gotoAndStop (1);
Symbol 2580 MovieClip Frame 373
gotoAndStop (1);
Symbol 2580 MovieClip Frame 379
gotoAndStop (1);
Symbol 2580 MovieClip Frame 385
gotoAndStop (1);
Symbol 2580 MovieClip Frame 391
gotoAndStop (1);
Symbol 2580 MovieClip Frame 397
gotoAndStop (1);
Symbol 2580 MovieClip Frame 403
gotoAndStop (1);
Symbol 2580 MovieClip Frame 409
gotoAndStop (1);
Symbol 2580 MovieClip Frame 415
gotoAndStop (1);
Symbol 2580 MovieClip Frame 421
gotoAndStop (1);
Symbol 2580 MovieClip Frame 427
gotoAndStop (1);
Symbol 2580 MovieClip Frame 433
gotoAndStop (1);
Symbol 2580 MovieClip Frame 439
gotoAndStop (1);
Symbol 2580 MovieClip Frame 445
gotoAndStop (1);
Symbol 2580 MovieClip Frame 451
gotoAndStop (1);
Symbol 2580 MovieClip Frame 457
gotoAndStop (1);
Symbol 2580 MovieClip Frame 463
gotoAndStop (1);
Symbol 2580 MovieClip Frame 469
gotoAndStop (1);
Symbol 2580 MovieClip Frame 475
gotoAndStop (1);
Symbol 2580 MovieClip Frame 481
gotoAndStop (1);
Symbol 2580 MovieClip Frame 487
gotoAndStop (1);
Symbol 2580 MovieClip Frame 493
gotoAndStop (1);
Symbol 2580 MovieClip Frame 499
gotoAndStop (1);
Symbol 2580 MovieClip Frame 505
gotoAndStop (1);
Symbol 2580 MovieClip Frame 511
gotoAndStop (1);
Symbol 2580 MovieClip Frame 517
gotoAndStop (1);
Symbol 2580 MovieClip Frame 523
gotoAndStop (1);
Symbol 2580 MovieClip Frame 529
gotoAndStop (1);
Symbol 2580 MovieClip Frame 535
gotoAndStop (1);
Symbol 2580 MovieClip Frame 541
gotoAndStop (1);
Symbol 2580 MovieClip Frame 547
gotoAndStop (1);
Symbol 2580 MovieClip Frame 553
gotoAndStop (1);
Symbol 2580 MovieClip Frame 559
gotoAndStop (1);
Symbol 2580 MovieClip Frame 565
gotoAndStop (1);
Symbol 2622 MovieClip Frame 1
stop();
Symbol 2627 MovieClip Frame 1
stop();
Symbol 2627 MovieClip Frame 9
weap.gotoAndStop(10);
Symbol 2627 MovieClip Frame 10
weap.gotoAndStop(10);
Symbol 2650 MovieClip Frame 1
_visible = false;
stop();
Symbol 2650 MovieClip Frame 2
_visible = true;
y = 0;
i = 0;
while (i < bankFood.length) {
z = bankFood[i];
if (z.count < 5) {
_root.achi[18]++;
y = 1;
z.count++;
x = z["grib" + z.count];
x._visible = true;
x._xscale = (x._yscale = 10);
createScore(z._x, z._y, 1);
if (_root.effect == true) {
j = 5;
while (j--) {
createPart(z._x + random(48), z._y + random(36), "star2", _root.levelmap.getNextHighestDepth(), 1);
}
}
}
i++;
}
playSound("lightning");
if (y == 1) {
playSound("holy");
}
Symbol 2650 MovieClip Frame 103
gotoAndStop (1);
Symbol 2661 MovieClip Frame 1
stop();
Symbol 2722 MovieClip Frame 1
onEnterFrame = function () {
txt1.text = _root.achi[type];
if (_currentframe == 1) {
if (_root.achi[type] >= need) {
gotoAndStop (2);
}
} else if (_root.achi[type] < need) {
gotoAndStop (1);
}
};
Symbol 2733 MovieClip Frame 1
onEnterFrame = function () {
if (_root.win == false) {
if (img._xscale > 0) {
if (_visible == false) {
_visible = true;
_alpha = 0;
} else if (_alpha != 100) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
} else {
_alpha = 100;
}
}
}
} else if (_alpha != 0) {
if (_alpha > 0) {
_alpha = (_alpha - 10);
} else {
_alpha = 0;
}
}
};
Symbol 2736 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 2743 MovieClip Frame 1
stop();
Symbol 2744 MovieClip Frame 1
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
ib3.ico.gotoAndStop(3);
ib1.desc.text = "SOUND";
ib2.desc.text = "MUSIC";
ib3.desc.text = "PAUSE";
ib1.desc._visible = false;
ib2.desc._visible = false;
ib3.desc._visible = false;
ib1.but.onRollOver = function () {
ib1.desc._visible = true;
};
ib1.but.onRollOut = function () {
ib1.desc._visible = false;
};
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib3.but.onRollOver = function () {
ib3.desc._visible = true;
};
ib3.but.onRollOut = function () {
ib3.desc._visible = false;
};
ib1.but.onPress = function () {
playSound("click");
if (_root.sound == true) {
_root.sound = false;
ib1.gotoAndStop(2);
} else {
_root.sound = true;
ib1.gotoAndStop(1);
}
};
ib2.but.onPress = function () {
playSound("click");
if (_root.music == true) {
_root.music = false;
playMusic("stop");
ib2.gotoAndStop(2);
} else {
_root.music = true;
playMusic("pre");
ib2.gotoAndStop(1);
}
};
ib3.but.onPress = function () {
ib3.desc._visible = false;
playSound("click");
if (_root.paused == false) {
showLogo(5);
openMenu("game");
_root.musicVol.setVolume(0);
}
};
Symbol 2747 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
mousePressed = false;
playSound("click");
gotoAndPlay ("on");
_root.reload = 5;
_root.selectMine(img._currentframe);
}
Symbol 2752 MovieClip Frame 1
stop();
Symbol 2753 MovieClip Frame 1
stop();
Symbol 2753 MovieClip Frame 7
stop();
Symbol 2759 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
_root.reload = 2;
_root.cursor.gotoAndStop(1);
_root["mine" + _root.curr_mine].img.select._visible = false;
}
Symbol 2809 MovieClip Frame 1
stop();
Symbol 2814 MovieClip Frame 1
stop();
Symbol 2861 MovieClip Frame 1
stop();
Symbol 2906 MovieClip Frame 1
stop();
Symbol 2953 MovieClip Frame 1
stop();
Symbol 3000 MovieClip Frame 1
stop();
Symbol 3047 MovieClip Frame 1
stop();
Symbol 3094 MovieClip Frame 1
stop();
Symbol 3141 MovieClip Frame 1
stop();
Symbol 3186 MovieClip Frame 1
stop();
Symbol 3233 MovieClip Frame 1
stop();
Symbol 3234 MovieClip Frame 1
gotoAndStop(_root.handnum);
Symbol 3238 MovieClip Frame 1
stop();
Symbol 3238 MovieClip Frame 2
createInterPart(_parent._x + 24, _parent._y + 20, "clip1");
Symbol 3247 MovieClip Frame 1
stop();
Symbol 3247 MovieClip Frame 2
createInterPart(_parent._x + 32, _parent._y + 26, "clip1");
Symbol 3254 MovieClip Frame 1
stop();
Symbol 3254 MovieClip Frame 2
createInterPart(_parent._x + 24, _parent._y + 20, "clip2");
Symbol 3285 MovieClip Frame 1
stop();
Symbol 3285 MovieClip Frame 2
Symbol 3292 MovieClip Frame 1
onEnterFrame = function () {
_x = ((Math.round(_root._xmouse / tileW) * tileW) - _root._xmouse);
_y = (((Math.round(_root._ymouse / tileH) * tileH) - _root._ymouse) - 18);
};
Symbol 3295 MovieClip Frame 1
ammo = 0;
speed = 0;
_root.pre_weap = 1;
lopata.rad._visible = false;
_root.butdrop._visible = false;
stop();
onEnterFrame = function () {
_x = _root._xmouse;
_y = _root._ymouse;
if (_xscale != 100) {
if (_xscale > 100) {
_yscale = (_yscale - 5);
_xscale = (_yscale - 5);
} else {
_yscale = 100;
_xscale = 100;
}
}
};
Symbol 3295 MovieClip Frame 2
if ((_root.minigame == 1) or (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipPistol;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 3);
Symbol 3295 MovieClip Frame 3
if ((_root.minigame == 1) or (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipGun;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 4);
Symbol 3295 MovieClip Frame 4
if ((_root.minigame == 1) or (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipShot;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 3);
Symbol 3295 MovieClip Frame 5
if ((_root.minigame == 1) or (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipTesla;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 4);
Symbol 3295 MovieClip Frame 6
if ((_root.minigame == 1) or (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipGauss;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 5);
Symbol 3295 MovieClip Frame 7
if ((_root.minigame == 1) or (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipRocket;
} else {
ammo = _root.pre_ammo;
}
rad._xscale = (rad._yscale = _root.radRocket * 2);
ammoend = Math.ceil(ammo / 3) + 1;
Symbol 3295 MovieClip Frame 8
ammo = -1;
Symbol 3295 MovieClip Frame 9
ammo = -1;
rad._xscale = (rad._yscale = _root.radBomb * 2);
Symbol 3295 MovieClip Frame 10
ammo = -1;
Symbol 3295 MovieClip Frame 11
ammo = -1;
Symbol 3295 MovieClip Frame 12
ammo = -1;
rad._xscale = (rad._yscale = _root.radBomb * 2);
Symbol 3295 MovieClip Frame 13
ammo = -1;
rad._xscale = (rad._yscale = _root.radTesla * 2);
Symbol 3303 MovieClip Frame 1
stop();
Symbol 3321 Button
on (rollOver) {
_parent.mess.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.text = "";
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.mess.text = "";
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
eff.gotoAndPlay(2);
x = _parent._x + _x;
y = _parent._y + _y;
z = 13;
while (z--) {
createInterPart(x + (20 * z), y + random(43), "star2");
}
playSound("buy");
}
}
}
Symbol 3383 MovieClip Frame 1
stop();
Symbol 3404 Button
on (rollOver) {
_parent.mess.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.text = "";
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.mess.text = "";
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
eff.gotoAndPlay(2);
x = (_parent._x + _x) - 44;
y = (_parent._y + _y) - 30;
z = 9;
while (z--) {
createInterPart(x + (10 * z), y + random(70), "star2");
}
playSound("buy");
}
}
}
Symbol 3408 MovieClip Frame 1
stop();
Symbol 3422 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent["but" + (_root.handnum + 9)].selback._visible = false;
_root.handnum = id - 9;
_parent["but" + (_root.handnum + 9)].selback._visible = true;
}
}
}
Symbol 3423 MovieClip Frame 4
if (_root.handnum == (id - 9)) {
selback._visible = true;
} else {
selback._visible = false;
}
Symbol 3434 Button
on (rollOver) {
_parent.mess.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.text = "";
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.mess.text = "";
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
eff.gotoAndPlay(2);
x = (_parent._x + _x) - 44;
y = (_parent._y + _y) - 30;
z = 9;
while (z--) {
createInterPart(x + (10 * z), y + random(70), "star2");
}
playSound("buy");
}
}
}
Symbol 3437 MovieClip Frame 1
stop();
Symbol 3444 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.upgr[id] == 11) {
selback._visible = false;
_root.upgr[id] = 12;
} else {
selback._visible = true;
_root.upgr[id] = 11;
}
_root.vipChange();
}
}
}
Symbol 3445 MovieClip Frame 4
if (_root.upgr[id] == 11) {
selback._visible = true;
} else {
selback._visible = false;
}
Symbol 3459 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndPlay ("on");
}
Symbol 3463 MovieClip Frame 1
stop();
Symbol 3463 MovieClip Frame 7
stop();
Symbol 3468 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
visitSite("spon");
}
Symbol 3472 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 3481 MovieClip Frame 1
stop();
Symbol 3490 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndPlay ("on");
}
Symbol 3512 MovieClip Frame 1
stop();
Symbol 3512 MovieClip Frame 7
stop();
Symbol 3512 MovieClip Frame 13
gotoAndStop (1);
Symbol 3527 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.lvlmode = this.mode;
_root.minigame = this.minigame;
openScreen("game");
}
}
}
Symbol 3544 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.lvlmode = this.mode;
_root.minigame = this.minigame;
_root.money = _root.money - need;
_root.bonus_cost = need;
openScreen("game");
}
}
}
Symbol 3551 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvlmode = this.mode;
_root.minigame = this.minigame;
_root.lvl = this.title;
openScreen("game");
}
}
}
Symbol 3552 MovieClip Frame 1
onEnterFrame = function () {
if (timer > 0) {
timer--;
} else if (_xscale < 100) {
_xscale = (_xscale + 20);
_yscale = _xscale;
_alpha = _xscale;
}
};
Symbol 3564 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (2);
_parent.icon.gotoAndStop(2);
_parent.txtcost._visible = false;
playSound("star");
if (award == true) {
obj = _root.attachMovie("scoreobj", "score", _root.getNextHighestDepth());
obj._x = (_parent._x + _parent._parent._x) + 100;
obj._y = _parent._y + _parent._parent._y;
obj.gotoAndStop(5);
obj.combo.combo.count.text = ("+" + _parent.cost) + " $";
}
}
}
};
stop();
Symbol 3564 MovieClip Frame 13
stop();
Symbol 3577 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
visitSite(lnk);
}
Symbol 3592 MovieClip Frame 1
stop();
title = "PLAY\nMushroom Madness";
lnk = "MM1";
Symbol 3592 MovieClip Frame 2
title = "PLAY\nMushroom Madness 2";
lnk = "MM2";
Symbol 3592 MovieClip Frame 3
title = "PLAY\nPrizma Puzzle Challenges";
lnk = "PPC";
Symbol 3592 MovieClip Frame 4
title = "PLAY\nGranny Strikes Back";
lnk = "GSB";
Symbol 3592 MovieClip Frame 5
title = "PLAY\nFlying Candy";
lnk = "FC";
Symbol 3592 MovieClip Frame 6
title = "PLAY\nIcy Gifts";
lnk = "IG";
Symbol 3592 MovieClip Frame 7
title = "PLAY\nThe Bee Way";
lnk = "TBW";
Symbol 3592 MovieClip Frame 8
title = "PLAY\nNinja Painter";
lnk = "NP";
Symbol 3619 MovieClip Frame 1
stop();
Symbol 3624 MovieClip Frame 1
stop();
Symbol 3627 MovieClip Frame 1
stop();
Symbol 3628 MovieClip Frame 1
stop();
Symbol 3629 MovieClip Frame 1
stop();
Symbol 3648 MovieClip Frame 1
stop();
Symbol 3697 MovieClip Frame 1
stop();
Symbol 3699 MovieClip Frame 1
close = true;
_yscale = 0;
_xscale = 0;
tar = "";
backmenu = "";
gotoAndStop ("exit");
onEnterFrame = function () {
if (close == false) {
if (_xscale != 100) {
if (_xscale < 100) {
_yscale = (_yscale + 30);
_xscale = (_yscale + 30);
} else {
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
}
}
} else if (_xscale > 30) {
_yscale = (_yscale - 40);
_xscale = (_yscale - 40);
} else if (_currentframe != tar) {
close = false;
gotoAndStop(tar);
}
};
Symbol 3699 MovieClip Frame 2
_root.menubut2._visible = true;
mess.text = "";
reUpgr(this);
getUpgrDone();
xbut1.title = "CONTINUE";
xbut1.but.onPress = function () {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openScreen("stage");
}
}
};
Symbol 3699 MovieClip Frame 11
_root.menubut2._visible = true;
but1.title = "RESUME GAME";
but2.title = "Tutorial";
but3.title = "Walkthrough";
but4.title = "Restart Level";
but5.title = "More Games";
but6.title = "Save & Quit";
if ((_root.minigame == 3) || (_root.minigame == 7)) {
but4._visible = false;
} else {
but4._visible = true;
}
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.musicVol.setVolume(100);
showLogo(0);
_root.menubut._visible = true;
openMenu("exit");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("hint");
}
}
};
but3.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("walk");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("game");
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but6.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.minigame == 6) {
if (_root.surscore < _root.curr_money) {
_root.surscore = _root.curr_money;
}
_root.money = _root.money + _root.curr_money;
}
saveGame();
_root.lvl = 0;
_root.bonus = 0;
_root.minigame = 0;
openScreen("stage");
}
}
};
Symbol 3699 MovieClip Frame 21
_root.menubut2._visible = true;
but1.title = "START GAME";
but2.title = "Walkthrough";
but3.title = "Tutorial";
but4.title = "Credits";
but5.title = "More Games";
but6.title = "Host This Game";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.sav[2][1][0] != -1) {
openMenu("cont");
} else {
createInterPart(350, 300, "nuke1");
playSound("nuke");
openScreen("stage");
}
}
}
};
but2.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("walk");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("hint");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("cred");
}
}
};
but5.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but6.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("add");
}
}
};
Symbol 3699 MovieClip Frame 31
_root.menubut2._visible = true;
but5.title = "CONTINUE";
if (_root.sound == true) {
but1.title = "Sound: ON";
} else {
but1.title = "Sound: OFF";
}
if (_root.music == true) {
but2.title = "Music: ON";
} else {
but2.title = "Music: OFF";
}
if (_root.effect == true) {
but3.title = "Visual FX: ON";
} else {
but3.title = "Visual FX: OFF";
}
if (_root.hint == true) {
but4.title = "Hints: ON";
} else {
but4.title = "Hints: OFF";
}
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.sound == true) {
_root.sound = false;
but1.title = "Sound: OFF";
} else {
_root.sound = true;
but1.title = "Sound: ON";
}
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.music == true) {
_root.music = false;
but2.title = "Music: OFF";
playMusic("stop");
} else {
_root.music = true;
but2.title = "Music: ON";
playMusic("pre");
}
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.effect == true) {
_root.effect = false;
but3.title = "Visual FX: OFF";
} else {
_root.effect = true;
but3.title = "Visual FX: ON";
}
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.hint == true) {
_root.hint = false;
but4.title = "Hint: OFF";
} else {
_root.hint = true;
but4.title = "Hint: ON";
}
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openMenu("back");
}
}
};
Symbol 3699 MovieClip Frame 41
_root.menubut2._visible = true;
i = 1;
while (i < 4) {
this["star" + i].gotoAndPlay(_root.sav[0][i - 1] + 1);
i++;
}
but1.title = "EASY";
but2.title = "NORMAL";
but3.title = "HARD";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
_root.lvl = 31;
_root.diff = 0.5;
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
_root.lvl = 31;
_root.diff = 1;
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
_root.lvl = 31;
_root.diff = 1.5;
}
}
};
Symbol 3699 MovieClip Frame 51
_root.menubut2._visible = true;
but1.title = "CONTINUE";
but2.title = "New Game";
but3.title = "Back";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
createInterPart(350, 300, "nuke1");
playSound("nuke");
openScreen("stage");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
resetGame();
saveGame();
createInterPart(350, 300, "nuke1");
playSound("launch");
openScreen("stage");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
};
Symbol 3699 MovieClip Frame 61
_root.menubut2._visible = true;
i = 1;
while (i < 10) {
z = this["mode" + i];
z.id = i;
z.newimg._visible = false;
if (_root.modes[i][3] <= _root.stat[7]) {
z.gotoAndStop(1);
if ((((_root.sav[i][1][0] == -1) & (i != 3)) & (i != 8)) & (i != 9)) {
z.newimg._visible = true;
}
} else {
z.gotoAndStop("lock");
z.need.text = "Need " + _root.modes[i][3];
}
z.title = _root.modes[i][0];
z.desc = _root.modes[i][5];
z.img.gotoAndStop(i);
z.img.comp._visible = false;
z.img.perc._visible = false;
if ((i < 8) & (_root.modes[i][3] <= _root.stat[7])) {
z.img.perc._visible = true;
if (i == 3) {
z.img.perc.text = "Wave record: " + _root.stat[8];
} else {
z.perc = Math.round((getStarDone(i) * 100) / (_root.modes[i][2] * 3));
z.img.perc.text = z.perc + "% completed";
if (z.perc > 99) {
z.img.comp._visible = true;
}
}
}
i++;
}
stars.text = _root.stat[7];
showLevels = function (type) {
_root.modeselect = type;
i = 1;
while (i < 10) {
this["mode" + i].img.select._visible = false;
i++;
}
this["mode" + type].img.select._visible = true;
modename.text = _root.modes[type][0] + " Levels";
modedesc.text = _root.modes[type][5];
if (_root.modes[type][4] > 0) {
modestars._visible = true;
modestars.stars.text = getStarDone(type);
modestars.maxstars.text = "/" + (_root.modes[type][2] * 3);
} else {
modestars._visible = false;
}
i = 1;
while (i < 16) {
z = this["l" + i];
z._xscale = 0;
z.timer = i;
z.mode = type;
if (i > _root.modes[type][2]) {
z._visible = false;
} else {
z._visible = true;
z.id = i;
z.title = i;
z.minigame = _root.modes[type][1];
switch (type) {
case 3 :
if (i == 1) {
z.title = 1;
} else {
z.title = (i - 1) * 5;
}
if ((z.title != 1) & (_root.stat[8] < z.title)) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(5);
}
break;
case 8 :
z.need = (z.id * 250) * _root.bonusDeposit;
if (_root.money < z.need) {
z.gotoAndStop(4);
} else {
z.gotoAndStop(3);
}
break;
case 9 :
z.need = (z.id * 500) * _root.bonusDeposit;
if (_root.money < z.need) {
z.gotoAndStop(4);
} else {
z.gotoAndStop(3);
}
break;
default :
if (_root.sav[type][i][0] == -2) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
z.star.gotoAndStop(((2 + _root.sav[type][i][0]) + _root.sav[type][i][1]) + _root.sav[type][i][2]);
}
}
}
i++;
}
};
showLevels(_root.modeselect);
mode1.but.onPress = function () {
showLevels(1);
};
mode2.but.onPress = function () {
showLevels(2);
};
mode3.but.onPress = function () {
showLevels(3);
};
mode4.but.onPress = function () {
showLevels(4);
};
mode5.but.onPress = function () {
showLevels(5);
};
mode6.but.onPress = function () {
showLevels(6);
};
mode7.but.onPress = function () {
showLevels(7);
};
mode8.but.onPress = function () {
showLevels(8);
};
mode9.but.onPress = function () {
showLevels(9);
};
gachis = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
if (_root.gachi[i][j] == -1) {
gachis++;
}
j++;
}
i++;
}
kongsend("achievements", gachis);
kongsend("enemies", _root.stat[0]);
kongsend("money", _root.stat[2]);
kongsend("quests", _root.stat[7]);
kongsend("upgrades", _root.stat[6]);
trace("achi=" + gachis);
xbut1.title = "Armored Shop";
achibut.title = ("Achievements " + gachis) + "/40";
xbut3.title = "Save & Quit";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("upgr");
}
}
};
achibut.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("achi");
}
}
};
xbut3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openScreen("main");
}
}
};
Symbol 3699 MovieClip Frame 71
_root.menubut2._visible = true;
if ((_root.stat[7] > 5) & ((_root.lvl % 2) == 0)) {
ads1._visible = true;
ads2._visible = true;
ads1.img.gotoAndStop(1 + random(8));
do {
ads2.img.gotoAndStop(1 + random(8));
} while (ads1.img._currentframe == ads2.img._currentframe);
} else {
ads1._visible = false;
ads2._visible = false;
}
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Quests";
starscnt = 0;
i = 0;
while (i < 3) {
z = this["but" + i];
z.type = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][0];
z.need = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][1];
z.cost = _root.lvl * 100;
z.quest.gotoAndStop(z.type + 1);
z.icon.gotoAndStop(_root.sav[_root.lvlmode][_root.lvl][i] + 1);
z.txt1.text = z.need;
z.txt2.text = _root["str_achi_" + z.type];
if (_root.sav[_root.lvlmode][_root.lvl][i] == 1) {
z.back.gotoAndStop("on");
z.txtcost._visible = false;
} else {
z.back.gotoAndStop("off");
z.txtcost._visible = true;
z.txtcost.text = ("+" + z.cost) + " $";
}
z.back.timer = 0;
z.back.award = false;
if (z.need <= _root.achi[z.type]) {
starscnt++;
z.back.timer = (10 * i) + 20;
if (_root.sav[_root.lvlmode][_root.lvl][i] < 1) {
_root.sav[_root.lvlmode][_root.lvl][i] = 1;
_root.curr_money = _root.curr_money + z.cost;
addStat(2, z.cost);
z.back.award = true;
}
}
i++;
}
if (starscnt == 3) {
playSound("holy");
_root.warachi.gotoAndPlay(2);
}
_root.money = _root.money + _root.curr_money;
if (_root.sav[_root.lvlmode][_root.lvl][0] == -1) {
_root.sav[_root.lvlmode][_root.lvl][0] = 0;
}
if (_root.sav[_root.lvlmode][_root.lvl + 1][0] == -2) {
_root.sav[_root.lvlmode][_root.lvl + 1][0] = -1;
}
addStat(1, _root.achi[17]);
setStat(13, 1);
setStat(7, getStarDone(0));
setStat(_root.modes[1][4], getLevelDone(1));
setStat(_root.modes[2][4], getLevelDone(2));
setStat(_root.modes[4][4], getLevelDone(4));
setStat(_root.modes[5][4], getLevelDone(5));
setStat(_root.modes[6][4], getLevelDone(6));
setStat(_root.modes[7][4], getLevelDone(7));
saveGame();
kongsend("enemies", _root.stat[0]);
kongsend("money", _root.stat[2]);
if (_root.stat[14] == 16) {
kongsend("adventure_complete", 1);
}
if (_root.stat[15] == 8) {
kongsend("rush_complete", 1);
}
if (_root.stat[16] == 8) {
kongsend("defence_complete", 1);
}
xbut1.title = "CONTINUE";
xbut2.title = "Restart Level";
xbut3.title = "More Games";
xbut4.title = "Save & Quit";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if ((_root.lvlmode == 4) & (_root.lvl == 15)) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
};
xbut2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("game");
}
}
};
xbut3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
xbut4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = 0;
openScreen("main");
}
}
};
Symbol 3699 MovieClip Frame 81
_root.menubut2._visible = true;
t1._visible = false;
t2._visible = false;
t3._visible = false;
t4._visible = false;
if (_root.lvlmode == 2) {
reHint(this, _root.lvl);
}
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Quests";
i = 0;
while (i < 3) {
z = this["but" + i];
trace((_root.lvlmode + " achi ") + _root.lvl);
z.type = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][0];
z.need = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][1];
z.cost = _root.lvl * 100;
z.quest.gotoAndStop(z.type + 1);
z.icon.gotoAndStop(_root.sav[_root.lvlmode][_root.lvl][i] + 1);
z.txt1.text = z.need;
z.txt2.text = _root["str_achi_" + z.type];
if (_root.sav[_root.lvlmode][_root.lvl][i] == 1) {
z.back.gotoAndStop("on");
z.txtcost._visible = false;
} else {
z.back.gotoAndStop("off");
z.txtcost._visible = true;
z.txtcost.text = ("+" + z.cost) + " $";
}
i++;
}
xbut1.title = "CONTINUE";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
showLogo(0);
playMusic("muz");
_root.menubut._visible = true;
if (_root.randweap == true) {
_root.butdrop._visible = true;
}
playVocal();
openMenu("exit");
}
}
};
Playtomic.Log.LevelCounterMetric("Plays", (_root.lvlmode * 100) + _root.lvl);
Symbol 3699 MovieClip Frame 91
_root.menubut2._visible = true;
playSound("gameover");
record = _root.surscore;
if (_root.surscore < _root.curr_money) {
_root.surscore = _root.curr_money;
beat_txt._visible = true;
} else {
beat_txt._visible = false;
}
setStat(8, _root.mini_diff);
_root.money = _root.money + _root.curr_money;
saveGame();
kongsend("survival_score", _root.surscore);
kongsend("survival_level", _root.stat[8]);
but1.title = "CONTINUE";
but2.title = "More Games";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("upgr");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
Symbol 3699 MovieClip Frame 101
_root.menubut2._visible = true;
setStat(11, 1);
hints.gotoAndStop(3);
reHint(hints, 0);
but1.title = "CONTROLS";
but2.title = "ITEMS";
but3.title = "ENEMIES";
but4.title = "WEAPONS";
but5.title = "Back to menu";
title = "Tutorial - Enemies";
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
};
but1.but.onPress = function () {
hints.gotoAndStop(1);
reHint(hints, 0);
title = "Tutorial - Controls";
};
but2.but.onPress = function () {
hints.gotoAndStop(2);
reHint(hints, 0);
title = "Tutorial - Items";
};
but3.but.onPress = function () {
hints.gotoAndStop(3);
reHint(hints, 0);
title = "Tutorial - Enemies";
};
but4.but.onPress = function () {
hints.gotoAndStop(4);
reHint(hints, 0);
title = "Tutorial - Weapons";
};
Symbol 3699 MovieClip Frame 111
_root.menubut2._visible = true;
playSound("vocal_14");
ads1._visible = true;
ads2._visible = true;
ads1.img.gotoAndStop(1 + random(8));
do {
ads2.img.gotoAndStop(1 + random(8));
} while (ads1.img._currentframe == ads2.img._currentframe);
but1.title = "TRY AGAIN";
but2.title = "Walkthrought";
but3.title = "More Games";
but4.title = "Save & Quit";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("game");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("walk");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
}
}
};
Playtomic.Log.LevelCounterMetric("GameOver", (_root.lvlmode * 100) + _root.lvl);
Symbol 3699 MovieClip Frame 121
_root.menubut2._visible = true;
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Bonus";
profit = _root.curr_money - _root.bonus_cost;
outgo_txt.text = "-" + _root.bonus_cost;
income_txt.text = _root.curr_money;
profit_txt.text = profit + "";
trace(profit);
if (profit < 0) {
playSound("vocal_14");
noprofit._visible = true;
profit_txt._visible = (profit_icon._visible = false);
} else {
playSound("win");
noprofit._visible = false;
profit_txt._visible = (profit_icon._visible = true);
_root.warachi.gotoAndPlay(2);
}
_root.money = _root.money + _root.curr_money;
saveGame();
but1.title = "CONTINUE";
but2.title = "More Games";
but3.title = "Save & Quit";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.lvl == 24) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = 0;
openScreen("main");
}
}
};
Symbol 3699 MovieClip Frame 131
_root.menubut2._visible = true;
but1.title = _root.str_but_mini1;
but2.title = _root.str_but_mini2;
but3.title = _root.str_but_mini3;
but4.title = _root.str_but_mini4;
but5.title = _root.str_but_mini5;
i = 1;
while (i < 6) {
z = this["but" + i];
z.id = i;
if (_root.sav[24 + i] != undefined) {
z.gotoAndStop(1);
} else {
z.gotoAndStop(2);
}
i++;
}
but1.title = "Crazy Assault";
but2.title = "Trap Defence";
but3.title = "Night Watch";
but4.title = "Duck Hunt";
but5.title = "Safe Breaker";
but6.title = "Back";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.minigame = 1;
openScreen("game");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.minigame = 2;
openScreen("game");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.minigame = 3;
openScreen("game");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.minigame = 4;
openScreen("game");
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.minigame = 5;
openScreen("game");
}
}
};
but6.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
};
Symbol 3699 MovieClip Frame 141
_root.menubut2._visible = true;
if (_root.minigame == 6) {
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.mini_diff) + " Wave";
survstat._visible = true;
survstat.maxwave.text = _root.stat[8];
survstat.maxscore.text = _root.surscore;
} else {
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Bonus";
survstat._visible = false;
}
desc = _root.modes[_root.lvlmode][5];
if (_root.minigame == 3) {
if (_root.key == 1) {
desc = desc + (("\nYou have " + _root.key) + " key.");
} else {
desc = desc + (("\nYou have " + _root.key) + " keys.");
}
}
but1.title = "CONTINUE";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.menubut._visible = true;
showLogo(0);
openMenu("exit");
playMusic("muz_0");
}
}
};
Symbol 3699 MovieClip Frame 151
_root.menubut2._visible = true;
but1.title = "Back";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("main");
}
}
};
Instance of Symbol 3669 MovieClip in Symbol 3699 MovieClip Frame 151
on (release) {
visitSite("dev");
}
Symbol 3699 MovieClip Frame 161
_root.menubut2._visible = true;
desc = "You have completed Adventure mode of the game!\nTry to get all achievements and the top score in Survival mode!";
but1.title = "CONTINUE";
but2.title = "More Games";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
Symbol 3699 MovieClip Frame 171
_root.menubut2._visible = false;
gachis = 0;
bonushave = 0;
bonusall = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
z = this[("but" + i) + j];
z.cost = _root[(("but" + i) + j) + "cost"];
z.title = _root[(("but" + i) + j) + "title"];
z.desc = _root[(("but" + i) + j) + "desc"];
z.have = _root.stat[i];
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(1);
bonushave = bonushave + z.cost;
gachis++;
} else {
z.perc = Math.floor((_root.stat[i] / _root.gachi[i][j]) * 100) + "%";
z.gotoAndStop(2);
}
if (z.cost > 0) {
bonusall = bonusall + z.cost;
if (z.cost < 1000) {
z.costtxt.text = z.cost;
} else {
z.costtxt.text = (z.cost / 1000) + "K";
}
}
j++;
}
i++;
}
if (_root.surv_allow == true) {
achitxt._visible = false;
} else {
achitxt._visible = true;
}
xbut1.title = "BACK";
xbut1.but.onPress = function () {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
if (backmenu == "stage") {
openScreen("stage");
} else {
openScreen("main");
}
}
}
};
Symbol 3699 MovieClip Frame 181
_root.menubut2._visible = false;
Symbol 3700 MovieClip Frame 1
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
ib1.desc.text = "SOUND";
ib2.desc.text = "MUSIC";
ib1.desc._visible = false;
ib2.desc._visible = false;
ib1.but.onRollOver = function () {
ib1.desc._visible = true;
};
ib1.but.onRollOut = function () {
ib1.desc._visible = false;
};
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib1.but.onPress = function () {
playSound("click");
if (_root.sound == true) {
_root.sound = false;
ib1.gotoAndStop(2);
_root.menubut.ib1.gotoAndStop(2);
} else {
_root.sound = true;
ib1.gotoAndStop(1);
_root.menubut.ib1.gotoAndStop(1);
}
};
ib2.but.onPress = function () {
playSound("click");
if (_root.music == true) {
_root.music = false;
playMusic("stop");
ib2.gotoAndStop(2);
_root.menubut.ib2.gotoAndStop(2);
} else {
_root.music = true;
playMusic("pre");
ib2.gotoAndStop(1);
_root.menubut.ib2.gotoAndStop(1);
}
};
Symbol 3711 MovieClip Frame 1
stop();
Symbol 3712 MovieClip Frame 1
stop();
Symbol 3712 MovieClip Frame 2
play();
Symbol 3712 MovieClip Frame 15
stop();
switch (img._currentframe) {
case 1 :
openMenu("main");
break;
case 2 :
if (((_root.minigame == 3) || (_root.minigame == 6)) || (_root.minigame == 7)) {
openMenu("minirdy");
} else {
openMenu("ready");
}
break;
case 3 :
if ((_root.minigame == 3) || (_root.minigame == 7)) {
openMenu("bonusscore");
} else {
playSound("win");
openMenu("score");
}
break;
case 4 :
openMenu("over");
playSound("gameover");
break;
case 6 :
openMenu("vict");
playSound("win");
}
Symbol 3743 MovieClip Frame 1
stop();
Symbol 3743 MovieClip Frame 8
_root.musicVol.setVolume(90);
Symbol 3743 MovieClip Frame 9
_root.musicVol.setVolume(80);
Symbol 3743 MovieClip Frame 10
_root.musicVol.setVolume(70);
Symbol 3743 MovieClip Frame 11
_root.musicVol.setVolume(60);
Symbol 3743 MovieClip Frame 12
_root.musicVol.setVolume(50);
Symbol 3743 MovieClip Frame 13
_root.musicVol.setVolume(40);
Symbol 3743 MovieClip Frame 14
_root.musicVol.setVolume(30);
Symbol 3743 MovieClip Frame 15
_root.musicVol.setVolume(20);
Symbol 3743 MovieClip Frame 16
_root.musicVol.setVolume(10);
Symbol 3743 MovieClip Frame 17
_root.musicVol.setVolume(0);
Symbol 3743 MovieClip Frame 18
clearLevel();
switch (tar) {
case "achi" :
_root.back.gotoAndStop(11);
_root.back.img.lin._visible = false;
openMenu(tar, true);
playMusic("amb_night");
_root.silenlogo._visible = false;
_root.kinglogo._visible = false;
break;
case "main" :
_root.back.gotoAndStop(9);
openMenu("exit", true);
playMusic("muz_0");
_root.silenlogo._visible = true;
_root.lvl = 0;
_root.kinglogo._visible = true;
break;
case "vict" :
_root.back.gotoAndStop(10);
openMenu("exit", true);
playMusic("muz_0");
break;
case "game" :
switch (_root.lvlmode) {
case 1 :
if (_root.lvl == 1) {
_root.weather = 6;
} else {
_root.weather = 7;
}
break;
case 5 :
_root.weather = 8;
break;
case 3 :
_root.weather = 1 + random(5);
break;
case 9 :
_root.weather = 6;
break;
default :
_root.weather = ((_root.lvl - 1) % 5) + 1;
}
_root.back.gotoAndStop(_root.weather);
loadLevel();
showMines(true);
addStat(18, 1);
openMenu("exit", true);
playMusic("amb_day");
_root.silenlogo._visible = false;
_root.kinglogo._visible = true;
if (_root.cursor._currentframe > 1) {
_root.butdrop._visible = true;
}
break;
case "upgr" :
_root.back.gotoAndStop(11);
_root.back.img.lin._visible = false;
openMenu(tar, true);
playMusic("amb_night");
_root.kinglogo._visible = false;
_root.silenlogo._visible = false;
break;
case "stage" :
_root.back.gotoAndStop(11);
_root.back.img.lin._visible = false;
openMenu(tar, true);
playMusic("amb_night");
_root.silenlogo._visible = false;
_root.kinglogo._visible = false;
break;
case "send" :
_root.back.gotoAndStop(1);
openMenu(tar, true);
}
Symbol 3743 MovieClip Frame 21
_root.musicVol.setVolume(0);
Symbol 3743 MovieClip Frame 22
_root.musicVol.setVolume(10);
Symbol 3743 MovieClip Frame 23
_root.musicVol.setVolume(20);
Symbol 3743 MovieClip Frame 24
_root.musicVol.setVolume(30);
Symbol 3743 MovieClip Frame 25
_root.musicVol.setVolume(40);
Symbol 3743 MovieClip Frame 26
_root.musicVol.setVolume(50);
Symbol 3743 MovieClip Frame 27
_root.musicVol.setVolume(60);
Symbol 3743 MovieClip Frame 28
_root.musicVol.setVolume(70);
Symbol 3743 MovieClip Frame 29
_root.musicVol.setVolume(80);
Symbol 3743 MovieClip Frame 30
_root.musicVol.setVolume(90);
Symbol 3743 MovieClip Frame 31
_root.musicVol.setVolume(100);
Symbol 3743 MovieClip Frame 36
_root.trans_delay = false;
switch (tar) {
case "main" :
showLogo(1);
playSound("vocal_3", "vocal_4", "vocal_5");
break;
case "vict" :
showLogo(6);
break;
case "game" :
showLogo(2);
}
Symbol 3747 MovieClip Frame 1
stop();
Symbol 3748 MovieClip Frame 1
stop();
Symbol 3748 MovieClip Frame 2
if (cost < 1000) {
img.costtxt.text = cost;
} else {
img.costtxt.text = (cost / 1000) + "K";
}
Symbol 3748 MovieClip Frame 11
x = _x - 70;
y = _y - 20;
z = 11;
while (z--) {
createInterPart(x + (20 * z), y + random(40), "star2");
}
playSound("holy");
Symbol 3750 MovieClip Frame 1
stop();
Symbol 3754 MovieClip Frame 1
stop();
Symbol 3754 MovieClip Frame 9
playSound(choose("vocal_10", "vocal_15", "vocal_16"));