Frame 1
function itemHandler1(obj, item) {
getURL ("http://apps.facebook.com/funflow/games/?ref=mushroom-madness-2", "_blank");
}
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 == "king.com") or (domain == "midasplayer.com")) or (domain == "newgrounds.com")) or (domain == "ungrounded.net")) or (domain == "ngfiles.com")) or (domain == "kongregate.com")) or (domain == "notdoppler.com")) {
surv_allow = true;
} else {
surv_allow = false;
}
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);
}
};
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item1 = new ContextMenuItem("Play More Games!", itemHandler1);
myMenu.customItems.push(item1);
_root.menu = myMenu;
var GAME_NAME = "mushroom-madness-2";
var MOCHI_SIGNATURE = "";
var gameWidth = 640;
var gameHeight = 480;
function initLoader() {
var _local2 = ((result_lv.b == undefined) ? "false" : (result_lv.b));
trace(("b ::" + _local2) + "::");
trace(("result_lv.h ::" + result_lv.h) + "::");
if (result_lv.h == "true") {
isHome = true;
surv_allow = true;
}
if (_local2 == "true") {
bannedSign._alpha = 100;
} else {
this.onEnterFrame = function () {
createNewParticle();
mcLoadLogoBg.bar._xscale = 100 * (1 - (getBytesLoaded() / getBytesTotal()));
emitter._x = (mcLoadLogoBg._x + (96 - mcLoadLogoBg.bar._width)) + 15;
emitter._y = mcLoadLogoBg._y + 44;
if (getBytesLoaded() == getBytesTotal()) {
kill();
this.onEnterFrame = undefined;
if (isHome) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(2);
}
}
};
bannedSign.onRelease = function () {
if (!isHome) {
openKingPage(LINK_TYPE_LOADER_PROGRESS);
}
};
}
}
function openKingPage(type, page) {
setStat(10, 1);
trace(type);
var _local4 = _root._url;
var _local3 = (((((("game=" + GAME_NAME) + "&from=") + _local4) + "&type=") + type) + "&session=") + sessionID;
if (page != undefined) {
_local3 = _local3 + ("&redirect=" + page);
}
var _local2 = "_blank";
if (isHome) {
_local2 = "_top";
}
getURL ((bounceURL + "?") + _local3, _local2);
}
function openOtherGamesLink() {
setStat(10, 1);
getURL ("http://apps.facebook.com/funflow/games/?ref=mushroom-madness-2", "_blank");
}
function openHighscoresLink() {
setStat(10, 1);
openKingPage(LINK_TYPE_HIGHSCORES, ("game/" + GAME_NAME) + "/highscores");
}
function openSignLink() {
setStat(10, 1);
if (!isHome) {
getURL ("http://apps.facebook.com/funflow/games/?ref=mushroom-madness-2_funflow", "_blank");
}
}
function openSurvLink() {
setStat(10, 1);
getURL ("http://apps.facebook.com/funflow/games/?gameId=70&ref=mushroom-madness-2_survival", "_blank");
}
function openMM1Link() {
setStat(10, 1);
getURL ("http://apps.facebook.com/funflow/games/?gameId=22&ref=mushroom-madness-2", "_blank");
}
function openMM2Link() {
setStat(10, 1);
getURL ("http://apps.facebook.com/funflow/games/?gameId=70&ref=mushroom-madness-2", "_blank");
}
function openShareLink() {
setStat(10, 1);
getURL ("http://www.facebook.com/sharer.php?u=http%3A%2F%2Ffacebook.king.com%2Ffacebook%2Fkinggames%2Fgames%2Fshare.jsp%3FgameId%3D70", "_blank");
}
function openAddToWebsiteLink() {
setStat(10, 1);
getURL ("http://apps.facebook.com/funflow/download.jsp?ref=mushroom-madness-2", "_blank");
}
function openLoaderMovieLink() {
setStat(10, 1);
openKingPage(LINK_TYPE_LOADER_MOVIE);
}
function openRightClickLink() {
setStat(10, 1);
openKingPage(LINK_TYPE_RIGHT_CLICK);
}
function openOfflineProtectionLink() {
setStat(10, 1);
openKingPage(LINK_TYPE_PROTECT);
}
function addScore(points) {
checkScore();
var _local1 = (iscore - 123) / 2;
_local1 = _local1 + points;
iscore = (_local1 * 2) + 123;
var _local2 = new md5();
checkStr = _local2.hash((((iscore + ":") + GAME_NAME) + ":") + SK);
return(_local1);
}
function resetScore() {
iscore = 123;
checkStr = null;
}
function submitInternalScore() {
checkScore();
var _local1 = (iscore - 123) / 2;
submitScore(_local1);
}
function checkScore() {
if (checkStr != null) {
var _local1 = new md5();
if (checkStr != _local1.hash((((iscore + ":") + GAME_NAME) + ":") + SK)) {
SSK = "ng41ui54hy35tdsnd6f54rews";
}
}
}
function submitScore(score) {
var _local2 = new md5();
var _local1 = _local2.hash((((score + ":") + GAME_NAME) + ":") + SSK);
try {
if (isHome) {
flash.external.ExternalInterface.call("submitScore", score, _local1);
} else {
openKingPage(LINK_TYPE_HIGHSCORES, (((("game/" + GAME_NAME) + "/submit/") + score) + ":") + _local1);
}
} catch(e:Error) {
trace(e);
}
}
function submitLevel(level) {
trace("Submit Level: " + level);
var _local2 = new md5();
var _local3 = _local2.hash((((level + ":") + GAME_NAME) + ":") + SSK);
try {
if (isHome) {
flash.external.ExternalInterface.call("submitLevel", level, _local3);
}
} catch(e:Error) {
trace(e);
}
}
function submitAchievement(achievement) {
var _local1 = new md5();
var _local2 = _local1.hash((((achievement + ":") + GAME_NAME) + ":") + SAK);
try {
if (isHome) {
flash.external.ExternalInterface.call("submitAchievement", achievement, _local2);
}
} catch(e:Error) {
trace(e);
}
}
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;
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);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&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);
}
function createNewParticle() {
var _local4 = emitter.attachMovie("libGlow", "newLibGlow", emitter.getNextHighestDepth());
var _local3 = new Particle(_local4, -10, -7, _root._width, _root._height);
_local3.setVel(randRange(minXVel, maxXVel), randRange(minYVel, maxYVel));
_local3.setSize(randRange(minSize, maxSize));
particles.push(_local3);
while (particles.length > numParticles) {
_local3 = particles.shift();
_local3.destroy();
}
var _local2 = 0;
while (_local2 < particles.length) {
particles[_local2].update();
_local2++;
}
}
function kill() {
var _local1 = 0;
while (_local1 < particles.length) {
particles[_local1].destroy();
_local1++;
}
}
function randRange(min, max) {
var _local1 = (Math.random() * (max - min)) + min;
return(_local1);
}
stop();
if (GAME_NAME == "") {
trace("You need to input the game name! Check the code in the instructions layer.");
}
var loadCountURL = "http://www.mygame.com/king/loadcount.jsp";
var bounceURL = "http://www.mygame.com/king/bounce.jsp";
var loadHomeParametersURL = "http://www.king.com/servlet/FreeGameServlet?action=load";
var LINK_TYPE_LOADER_MOVIE = "loader_movie";
var LINK_TYPE_LOADER_PROGRESS = "loader_progress";
var LINK_TYPE_PROTECT = "protect";
var LINK_TYPE_OTHER_GAMES = "other_games";
var LINK_TYPE_HIGHSCORES = "highscores";
var LINK_TYPE_SIGN = "sign";
var LINK_TYPE_ADD_GAME = "add_game";
var LINK_TYPE_RIGHT_CLICK = "rightclick";
var LINK_TYPE_RIGHT_CLICK = "rightclick";
var SSK = "ng43ui54hy35tdsnd6f54rews";
var SAK = "ggfd7sday923mdsfd8csfds34";
var SK = "vf78hxcsjak77cxzhjkwad87s";
var iscore = 123;
var checkStr = null;
var USER_TYPE_UNREGISTERED = 0;
var USER_TYPE_REGISTERED = 1;
var USER_TYPE_GOLD = 2;
var USER_TYPE_SUBSCRIPTION = 3;
var SessionID = "";
var isHome = false;
bannedSign._alpha = 0;
bannedSign._x = (bannedSign._y = 0);
bannedSign.bg._width = gameWidth;
bannedSign.bg._height = gameHeight;
mcLoadLogoBg._x = gameWidth - (mcLoadLogoBg._width + 10);
mcLoadLogoBg._y = gameHeight - (mcLoadLogoBg._height + 10);
preloaderMov._x = gameWidth * 0.5;
preloaderMov._y = gameHeight * 0.5;
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
_root.initLoader();
};
var my_lv = new LoadVars();
my_lv.game = GAME_NAME;
my_lv.from = _root._url;
var so = SharedObject.getLocal("session");
if (so.data.sessionID == null) {
var rnd1 = Math.floor(Math.random() * 4294967295);
var rnd2 = Math.floor(Math.random() * 4294967295);
so.data.sessionID = rnd1.toString(16) + rnd2.toString(16);
so.flush();
}
sessionID = so.data.sessionID;
my_lv.session = sessionID;
my_lv.sendAndLoad(loadCountURL, result_lv, "GET");
if (MOCHI_SIGNATURE != "") {
__com_mochibot__(MOCHI_SIGNATURE, this, 10301, true);
}
var numParticles = 20;
var minXVel = -1;
var maxXVel = 1;
var minYVel = -1;
var maxYVel = 1;
var minSize = 12;
var maxSize = 29;
var minAlpha = 10;
var maxAlpha = 20;
var particles = new Array();
var emitter = _root.createEmptyMovieClip("p_holder", _root.getNextHighestDepth());
Frame 2
function launchGame() {
gotoAndStop (3);
}
preloaderMov._x = gameWidth * 0.5;
preloaderMov._y = gameHeight * 0.5;
Frame 3
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 = "Hint ";
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 = "GATLING GUN";
str_upgr_2 = "MACHINE GUN";
str_upgr_3 = "SHOTGUN";
str_upgr_4 = "ROCKET GUN";
str_upgr_5 = "MINE";
str_upgr_6 = "TRAP";
str_upgr_7 = "BOMB";
str_upgr_8 = "COIN MAGNET";
str_upgr_9 = "MONEY RATE";
str_upgr_10 = "RACKET";
str_upgr_11 = "BRASSIE";
str_upgr_12 = "CLUB";
str_upgr_13 = "HAMMER";
str_upgr_14 = "MACE";
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 = "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 = "USE MINE";
str_achi_16 = "USE TRAP";
str_achi_17 = "GLADES";
str_achi_18 = "MUSHROOMS";
str_achi_19 = "WEAPONS LEFT";
str_achi_20 = "LIFES LEFT";
but00title = "First Step";
but00desc = "Send your first enemy away";
but01title = "Trapper";
but01desc = "Send 100 enemies away";
but02title = "Animals' Bane";
but02desc = "Send 1000 enemies away!";
but10title = "Mushroomer";
but10desc = "Save 5 glades";
but11title = "Forest Guardian";
but11desc = "Save 40 glades!";
but20title = "Rich Man";
but20desc = "Earn 10,000$";
but21title = "Oligarch";
but21desc = "Earn 100,000$!";
but30title = "Breaker";
but30desc = "Open 30 crates";
but31title = "Crusher";
but31desc = "Open 100 crates!";
but40title = "Locked and Loaded";
but40desc = "Use 80 guns";
but50title = "VIP Customer";
but50desc = "Buy all weapons";
but60title = "Researcher";
but60desc = "Get 15 upgrades";
but61title = "Genius";
but61desc = "Get all upgrades!";
but70title = "Veteran";
but70desc = "Complete 30 quests";
but71title = "Hero";
but71desc = "Complete all quests!";
but80title = "Tough One";
but80desc = "Achieve Level 10 in Survival";
but81title = "Immortal";
but81desc = "Achieve Level 40 in Survival";
but90title = "Newbie";
but90desc = "Play 10 minutes";
but91title = "Experienced";
but91desc = "Play 1 hour";
but100title = "Thank you!";
but100desc = "Visit sponsor site";
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 mode";
but150title = "Frontier Guard";
but150desc = "Complete Animal Rush mode";
but160title = "Vault Keeper";
but160desc = "Complete Vault Defence mode";
but180title = "Again and Again";
but180desc = "Begin any 60 levels";
but00cost = 100;
but01cost = 500;
but02cost = 5000;
but10cost = 250;
but11cost = 2000;
but20cost = 1000;
but21cost = 10000;
but30cost = 450;
but31cost = 1500;
but40cost = 800;
but50cost = 7500;
but60cost = 500;
but61cost = 5000;
but70cost = 2000;
but71cost = 20000;
but80cost = 2500;
but81cost = 22000;
but90cost = 250;
but91cost = 2500;
but100cost = 250;
but110cost = 250;
but120cost = 500;
but130cost = 150;
but140cost = 10000;
but150cost = 10000;
but160cost = 10000;
but180cost = 5000;
gotoAndPlay ("Functions");
Frame 13
_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);
}
}
j++;
}
};
_global.mineHere = function (ob) {
if (colmap[ob.ytile][ob.xtile] == 4) {
j = 0;
while (j < bankMine.length) {
if ((bankMine[j].xtile == ob.xtile) and (bankMine[j].ytile == ob.ytile)) {
achi[15]++;
x1 = bankMine[j]._x + 24;
y1 = bankMine[j]._y + 16;
colmap[ob.ytile][ob.xtile] = 1;
bankMine[j].removeMovieClip();
bankMine.splice(j, 1);
playSound("explo");
quake = 6;
if (ob.type == 2) {
dieEnemy(ob);
}
castExplo(x1, y1, radBomb * bonusMine);
break;
}
j++;
}
}
};
_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, 50, 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 1 :
case 5 :
case 7 :
attackEnemy(zz, 100, 0);
break;
case 2 :
attackEnemy(zz, 70, 4);
break;
case 4 :
attackSpider(zz);
}
}
i++;
}
createPart(xx, yy, "crack", 1, 1);
createPart(xx, yy, "explo" + num, levelmap.getNextHighestDepth(), 1);
};
_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) {
musicmap.gotoAndStop("stop");
if (music == true) {
if (z == "muz") {
muznum = (lvl % 3) + 1;
musicmap.gotoAndStop("muz_" + muznum);
} else {
musicmap.gotoAndStop(z);
}
}
};
_global.saveGame = function () {
my_so.data.maxlvl = maxlvl;
my_so.data.surlvl = surlvl;
my_so.data.surscore = surscore;
my_so.data.money = money;
my_so.data.dampow = dampow;
my_so.data.stupor = stupor;
my_so.data.spdpow = spdpow;
my_so.data.maxpow = maxpow;
my_so.data.bonusBomb = bonusBomb;
my_so.data.bonusKap = bonusKap;
my_so.data.bonusGun = bonusGun;
my_so.data.bonusShot = bonusShot;
my_so.data.bonusGauss = bonusGauss;
my_so.data.bonusRocket = bonusRocket;
my_so.data.bonusMine = bonusMine;
my_so.data.bonusMagnet = bonusMagnet;
my_so.data.bonusDeposit = bonusDeposit;
my_so.data.sound = sound;
my_so.data.music = music;
my_so.data.hint = hint;
my_so.data.effect = effect;
my_so.data.handnum = handnum;
i = 0;
while (i < 49) {
my_so.data["sav" + i] = sav[i];
i++;
}
i = 1;
while (i < 15) {
my_so.data["upgr" + i] = upgr[i];
i++;
}
trace("SAVE STAT...");
i = 0;
while (i < gachi.length) {
j = 0;
while (j < gachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
trace(my_so.data["stat" + i]);
i++;
}
trace("SAVE END...");
my_so.flush();
};
_global.loadGame = function () {
if (my_so.data.maxlvl == undefined) {
sound = true;
music = true;
hint = true;
effect = true;
upgr = new Array();
sav = new Array();
gachi = new Array();
stat = new Array();
sav[0] = [0, 0, 0];
if (sav[30] == undefined) {
sav[30] = 0;
}
resetGame();
} else {
maxlvl = my_so.data.maxlvl;
surlvl = my_so.data.surlvl;
surscore = my_so.data.surscore;
money = my_so.data.money;
dampow = my_so.data.dampow;
stupor = my_so.data.stupor;
spdpow = my_so.data.spdpow;
maxpow = my_so.data.maxpow;
bonusBomb = my_so.data.bonusBomb;
bonusKap = my_so.data.bonusKap;
bonusGun = my_so.data.bonusGun;
bonusShot = my_so.data.bonusShot;
bonusGauss = my_so.data.bonusGauss;
bonusRocket = my_so.data.bonusRocket;
bonusMine = my_so.data.bonusMine;
bonusMagnet = my_so.data.bonusMagnet;
bonusDeposit = my_so.data.bonusDeposit;
sound = my_so.data.sound;
music = my_so.data.music;
hint = my_so.data.hint;
effect = my_so.data.effect;
handnum = my_so.data.handnum;
upgr = new Array();
sav = new Array();
gachi = new Array();
stat = new Array();
i = 0;
while (i < 49) {
sav[i] = my_so.data["sav" + i];
i++;
}
i = 1;
while (i < 15) {
upgr[i] = my_so.data["upgr" + i];
i++;
}
trace("LOAD STAT...");
i = 0;
while (i < 19) {
gachi[i] = new Array();
j = 0;
while (j < 3) {
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);
}
};
_global.resetGame = function () {
maxlvl = 1;
surlvl = 1;
surscore = 0;
money = 0;
dampow = 0;
stupor = 50;
spdpow = 1;
maxpow = 10;
bonusBomb = 1;
bonusKap = 4;
bonusGun = 1;
bonusShot = 1;
bonusGauss = 1;
bonusRocket = 1;
bonusMine = 1;
bonusMagnet = 1;
bonusDeposit = 1;
handnum = 1;
i = 1;
while (i < 49) {
sav[i] = [-1, 0, 0];
i++;
}
i = 1;
while (i < 15) {
upgr[i] = 1;
i++;
}
upgr[10] = 10;
gachi[0] = [1, 100, 1000];
gachi[1] = [5, 40];
gachi[2] = [10000, 100000];
gachi[3] = [30, 100];
gachi[4] = [80];
gachi[5] = [4];
gachi[6] = [15, 81];
gachi[7] = [30, 96];
gachi[8] = [10, 40];
gachi[9] = [10, 60];
gachi[10] = [1];
gachi[11] = [1];
gachi[12] = [1];
gachi[13] = [1];
gachi[14] = [16];
gachi[15] = [8];
gachi[16] = [8];
gachi[17] = [1];
gachi[18] = [60];
i = 0;
while (i < gachi.length) {
stat[i] = 0;
trace((i + "-") + stat[i]);
i++;
}
};
_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);
}
};
_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);
}
};
_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(13);
tary = 1 + random(13);
} 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(11);
tary = 2 + random(11);
} while (colmap[tarx][tary] == 0);
} else {
tarx = ob.xstart;
tary = ob.ystart;
}
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
};
_global.huntKrolik = function (ob) {
if (ob.step > 0) {
do {
tarx = 2 + random(11);
tary = 2 + random(11);
} 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;
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);
}
}
};
_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);
ob.grib.grib.gotoAndStop(Math.ceil((ob._currentframe - 1) * 1.5));
} 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.food["grib" + ob.food.count]._visible = false;
ob.food.count--;
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 < 3) {
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.dieFood = function (ob) {
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) {
bankFood.splice(i, 1);
break;
}
i++;
}
if (bankFood.length == 0) {
playMusic("stop");
if (minigame != 6) {
showLogo(4);
} else {
openMenu("send");
}
}
}
}
if (ob.type != 2) {
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)) {
life--;
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++;
addStat(0, 1);
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
switch (ob.type) {
case 1 :
playSound("heddie1", "heddie2");
achi[0]++;
createPrize(ob._x + 24, ob._y + 18, 1, 1);
createPart(ob._x + 24, ob._y + 18, "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, 1, 2);
createPrize(ob._x + 24, ob._y + 18, 2, 1);
break;
case 4 :
playSound("spiddie");
achi[2]++;
ob.moving = -500;
ob.gotoAndPlay(10);
if ((minigame == 1) or (minigame == 1)) {
createPrize(z._x + 24, z._y + 18, 2, 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 < 8) {
createWeap(ob._x, ob._y + ob.bird._y, 1 + ob.info, 0);
} else {
createPrize(ob._x, ob._y + ob.bird._y, ob.info - 1, 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 + 18, "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();
}
};
_global.dieChest = function (ob) {
addStat(3, 1);
i--;
j = 0;
while (j < bankChest.length) {
if (bankChest[j] == ob) {
bankChest.splice(j, 1);
break;
}
j++;
}
switch (ob._currentframe) {
case 2 :
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 :
achi[12]++;
playSound("box2");
createPrize(ob._x + 24, ob._y + 10, 1, 2);
createPrize(ob._x + 24, ob._y + 10, 2, 4);
createPrize(ob._x + 24, ob._y + 10, 7, 1);
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, "hulk2", levelmap.getNextHighestDepth(), 8);
}
break;
case 4 :
achi[13]++;
if (minigame != 3) {
createPrize(ob._x + 24, ob._y + 10, 1, 3);
createPrize(ob._x + 24, ob._y + 10, 2, 3);
createPrize(ob._x + 24, ob._y + 10, 8, 2);
createWeap(ob._x + 24, ob._y + 10, 0);
} 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, 8);
break;
case 3 :
createPrize(ob._x + 24, ob._y + 10, 2, 8);
}
}
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
break;
case 5 :
achi[14]++;
if (minigame != 3) {
createPrize(ob._x + 24, ob._y + 10, 1, 6);
createPrize(ob._x + 24, ob._y + 10, 2, 6);
createPrize(ob._x + 24, ob._y + 10, 8, 5);
createWeap(ob._x + 24, ob._y + 10, 0);
} else {
switch (ob.info) {
case 0 :
case 1 :
createPrize(ob._x + 24, ob._y + 10, 8, 8);
break;
case 2 :
case 3 :
createEnemy(ob.xtile, ob.ytile, 4);
}
}
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) {
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.id = objCount;
obj.isEnemy = true;
bankEnemy.push(obj);
};
_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.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(11);
} else {
obj.gotoAndStop(weather + random(6));
}
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
bankTree.push(obj);
createShad(x, y);
obj.info = z;
};
_global.prizeCount = 0;
_global.createPrize = function (x, y, type, count, info) {
j = 1;
while (j <= 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);
j++;
}
};
_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(7);
} while (lvl < weapin[type]);
}
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)) - 374;
obj._y = ((y * tileH) + random(16)) - 260;
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) - 360;
obj._y = (y * tileH) - 252;
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) - 360;
z._y = (y * tileH) - 252;
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;
trace(obj.life);
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.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") {
obj.gotoAndStop(info + 1);
}
j++;
}
};
_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.clearLevel = function () {
curr_money = 0;
magnit = (win = false);
alarmEnemy = 0;
key = 0;
cursor.gotoAndStop(1);
logo.gotoAndStop(1);
ammopip.gotoAndStop(1);
inter._visible = false;
menubut._visible = false;
prog._visible = false;
inter_level._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]];
j = 0;
while (j < 21) {
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++;
}
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();
}
};
_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);
gotoAndPlay ("Controller");
Frame 23
var musicVol = new Sound(musicmap);
musicVol.setVolume(0);
var my_so = SharedObject.getLocal("mm2_save", "/");
loadGame();
openScreen("main", true);
paused = true;
cursor._visible = false;
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;
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.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];
weapin = new Array();
weapin[2] = 7;
weapin[3] = 5;
weapin[4] = 2;
weapin[5] = 4;
weapin[6] = 5;
weapin[7] = 8;
weapin[8] = 12;
hintin = new Array();
hintin[1] = 1;
hintin[2] = 2;
hintin[3] = 3;
hintin[4] = 4;
hintin[5] = 5;
hintin[6] = 6;
hintin[7] = 8;
wavew = new Array();
wavew[1] = 20;
wavew[2] = 30;
wavew[4] = 10;
wavew[5] = 12;
wavel = new Array();
wavel[1] = 0;
wavel[2] = 20;
wavel[4] = 80;
wavel[5] = 50;
wavexy = new Array();
wavexy[0] = [0, 0];
wavexy[1] = [0, 0];
wavexy[2] = [0, 0];
wavexy[3] = [0, 0];
wavep = new Array();
clipGun = 30;
clipShot = 10;
shellShot = 10;
clipGauss = 60;
clipRocket = 5;
radRocket = 100;
radBomb = 150;
handpow = 1;
handtype = new Array();
handatt = new Array();
handtype[1] = [0, 0];
handtype[2] = [0, 1];
handtype[3] = [1, 2];
handtype[4] = [2, 3];
handtype[5] = [2, 3];
handatt[1] = 1;
handatt[2] = 1.2;
handatt[3] = 1.5;
handatt[4] = 2;
handatt[5] = 3;
_global.loadLevel = function () {
cursor.lopata.gotoAndStop(handnum);
diff = 1;
key = 0;
inter._visible = true;
lostlifesnd = false;
alarmEnemy = 0;
spawnTimer = 0;
reload = 10;
if (minigame > 0) {
life = 10;
mini_diff = 0;
switch (minigame) {
case 1 :
mini_inter._visible = true;
mini_diff = lvl - 16;
z = _root["lvlspw" + lvl];
i = 0;
while (i < z.length) {
wavexy[i] = [z[i][0], z[i][1]];
i++;
}
switch (mini_diff) {
case 1 :
cursor.gotoAndStop(4);
break;
case 2 :
cursor.lopata.gotoAndStop(4);
break;
case 3 :
cursor.gotoAndStop(5);
break;
case 4 :
cursor.gotoAndStop(7);
break;
case 5 :
cursor.lopata.gotoAndStop(3);
break;
case 6 :
cursor.gotoAndStop(8);
break;
case 7 :
cursor.lopata.gotoAndStop(4);
break;
case 8 :
cursor.gotoAndStop(8);
}
break;
case 2 :
mini_inter._visible = true;
inter_level._visible = true;
inter_level.text = "Wave 1/5";
alarmEnemy = 0;
mini_diff = -1;
break;
case 3 :
magnit = true;
key = lvl - 32;
break;
case 6 :
if (lvl == 41) {
mini_diff = 1;
} else {
mini_diff = (lvl - 41) * 5;
lvl = 41;
}
inter_level.text = "Level " + mini_diff;
mini_prize = Math.ceil(1 + (mini_diff / 8));
alarmEnemy = 30;
spawnTimer = 2 + (mini_diff * 3);
inter_level._visible = true;
}
}
trace("level " + lvl);
trace("minigame " + minigame);
if (lvl == 21) {
weather = 6;
} else if (lvl == 41) {
weather = 1 + random(5);
} else {
weather = ((lvl - 1) % 5) + 1;
}
if (minigame < 2) {
if (minigame == 0) {
spawnLength = _root["lvlspw" + lvl].length / 2;
} else {
spawnLength = 60;
}
progStep = 3.33 / spawnLength;
}
k = 0;
ww = 0;
m = _root["lvlmap" + lvl];
i = 0;
while (i < 16) {
j = 0;
while (j < 16) {
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, 5);
colmap[j][i] = 0;
}
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 :
if (z != 8) {
colmap[j][i] = 1;
}
createRoad(i, j, z - 49);
}
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 14 :
wavexy[i][j] = 15;
}
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++;
}
}
}
};
onEnterFrame = function () {
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;
win = true;
showLogo(3);
achi[17] = bankFood.length;
addStat(1, achi[17]);
achi[19] = bankWeap.length;
achi[20] = life;
j = 0;
while (j < bankFood.length) {
achi[18] = achi[18] + bankFood[j].count;
j++;
}
j = 0;
while (j < bankPrize.length) {
switch (bankPrize[j]._currentframe) {
case 1 :
_root.achi[6]++;
break;
case 2 :
_root.achi[7]++;
break;
case 8 :
_root.achi[8]++;
}
j++;
}
}
} else {
x = Number(_root["lvlspw" + lvl].substr(spawnTimer * 2, 2));
if (x != 0) {
y = x % 10;
z = (x - y) / 10;
switch (y) {
case 0 :
if (random(2) > 1) {
createEnemy(choose(0, 15), random(16), z, y);
} else {
createEnemy(random(16), choose(0, 15), z, y);
}
break;
case 1 :
createEnemy(15, random(16), z, y);
break;
case 2 :
createEnemy(random(16), 0, z, y);
break;
case 3 :
createEnemy(0, random(16), z, y);
break;
case 4 :
createEnemy(random(16), 15, 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 < 1800) {
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 1 :
createEnemy(15, random(12) + 2, 1);
break;
case 2 :
createEnemy(15, random(11) + 3, 2);
break;
case 3 :
createEnemy(15, random(10) + 5, 3, 0);
break;
case 4 :
createEnemy(15, random(12) + 2, 4);
break;
case 5 :
createEnemy(15, random(12) + 2, 5);
break;
case 6 :
createEnemy(random(10) + 3, 15, 6);
break;
case 7 :
if (mini_diff == 2) {
createEnemy(random(6) + 5, random(6) + 5, 7);
} else {
createEnemy(random(10) + 3, random(10) + 3, 7);
}
}
}
i++;
}
} else if (bankEnemy.length == 0) {
magnit = true;
win = true;
showLogo(3);
achi[20] = life;
}
break;
case 2 :
if (life < 1) {
playMusic("stop");
showLogo(4);
} else if (spawnTimer == 0) {
z = _root["lvlspw" + 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 = 120 + (30 * mini_diff);
spawnTimer = 180;
if (mini_diff > 0) {
playSound("win");
}
createEnemy(0, 0, 3, choose(1, 2, 5));
if ((mini_diff % 2) == 0) {
createEnemy(0, 0, 3, 2);
}
if (lvl > 26) {
createEnemy(0, 0, 3, 1 + random(lvl - 25));
}
if (lvl > 29) {
createEnemy(0, 0, 3, choose(1, 2, 5));
}
}
} else if (bankEnemy.length == 0) {
magnit = true;
win = true;
showLogo(3);
achi[20] = life;
}
} else {
spawnTimer--;
}
break;
case 3 :
if (alarmEnemy == 0) {
if (key < 1) {
alarmEnemy = 150;
}
} else {
alarmEnemy--;
if (key > 0) {
alarmEnemy = 0;
}
if (alarmEnemy == 50) {
if (minigame == 5) {
openMenu("send");
} else {
money = money + curr_money;
saveGame();
openScreen("upgr");
}
}
}
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 = "Level " + mini_diff;
spawnTimer = 2 + (mini_diff * 3);
alarmEnemy = 100;
setStat(8, _root.mini_diff);
playSound("win");
} else {
alarmEnemy = 10;
}
} else {
alarmEnemy = Math.max(15, 40 - mini_diff);
x = 1 + random(Math.min(6, Math.round(2 + (mini_diff / 4))));
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 = 2;
spawnTimer = spawnTimer - 3;
break;
case 4 :
xx = 6;
spawnTimer = spawnTimer - 2;
break;
case 5 :
xx = 7;
spawnTimer = spawnTimer - 3;
break;
case 6 :
xx = 3;
spawnTimer = spawnTimer - 2;
}
if (random(2) > 1) {
createEnemy(choose(0, 15), random(16), xx, 0);
} else {
createEnemy(random(16), choose(0, 15), xx, 0);
}
} else if (random(10) < 2) {
if (random(2) > 1) {
createEnemy(choose(0, 15), random(16), 4);
} else {
createEnemy(random(16), choose(0, 15), 4);
}
} else {
switch (1 + random(Math.min(7, Math.round(2 + (mini_diff / 3))))) {
case 1 :
createEnemy(15, random(10) + 5, 3, 1);
break;
case 2 :
createEnemy(15, random(10) + 5, 3, 2);
break;
case 3 :
createEnemy(15, random(10) + 5, 3, 3);
break;
case 4 :
createEnemy(15, random(10) + 5, 3, 4);
break;
case 5 :
createEnemy(15, random(10) + 5, 3, 5);
break;
case 6 :
createEnemy(15, random(10) + 5, 3, 6);
break;
case 7 :
createEnemy(15, random(10) + 5, 3, 7);
}
spawnTimer = spawnTimer + 4;
}
}
} else {
alarmEnemy--;
}
}
if (combo != 0) {
if (combo > 1) {
if (combo > achi[10]) {
achi[10] = 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 (mousePressed == true) {
if (cursor._currentframe == 1) {
power = power + 1;
if (power > 12) {
handpow = 1;
if (power > 15) {
power = 13;
}
} else {
handpow = 0;
}
cursor.lopata.img.gotoAndStop(Math.round(power));
} else if (reload < 0) {
switch (cursor._currentframe) {
case 2 :
playSound("explo");
quake = 6;
castExplo(levelmap._xmouse, levelmap._ymouse, radBomb * bonusBomb);
break;
case 3 :
case 6 :
x = Math.floor((levelmap._xmouse + 8) / tileW);
y = Math.floor((levelmap._ymouse - 12) / tileH);
if (colmap[y][x] == 1) {
playSound("trapcr");
if (cursor._currentframe == 3) {
createKap(x, y);
} else {
createMine(x, y);
}
} else {
cursor.ammo++;
}
break;
case 8 :
cursor.fx.play();
playSound("shot1", "shot2");
reload = 20 / bonusRocket;
quake = 4;
castExplo(levelmap._xmouse, levelmap._ymouse, radRocket * bonusRocket);
createPart(levelmap._xmouse, levelmap._ymouse, "explo", levelmap.getNextHighestDepth(), 1);
break;
case 4 :
case 5 :
case 7 :
cursor.fx.play();
if (cursor._currentframe != 5) {
if (cursor._currentframe == 4) {
playSound("gun1", "gun2", "gun3");
reload = 3 + (2 / bonusGun);
damx = bonusGun;
} else {
playSound("gauss1", "gauss2", "gauss3");
if (cursor.speed < 5) {
cursor.speed = cursor.speed + 1;
}
reload = 7 - cursor.speed;
damx = bonusGauss;
}
x = 5;
y = 1;
if (cursor.ammo < 15) {
ammopip.play();
}
} else {
playSound("shot1", "shot2");
reload = 6 + (6 / bonusShot);
damx = bonusShot;
x = 20;
y = shellShot;
if (cursor.ammo < 5) {
ammopip.play();
}
}
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, 1, 0);
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
switch (z._currentframe) {
case 2 :
attackChest(z, 20 * damx);
playSound("box1d1", "box1d2");
break;
case 3 :
attackChest(z, 10 * damx);
playSound("box2d1", "box2d2");
break;
case 4 :
case 5 :
playSound("miss1", "miss2");
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
switch (z.type) {
case 1 :
if (random(10) > 3) {
attackEnemy(z, 20 * damx, 2);
} else {
attackEnemy(z, 20 * damx, 1);
}
break;
case 5 :
if (random(10) > 3) {
attackEnemy(z, 30 * damx, 2);
} else {
attackEnemy(z, 30 * damx, 1);
}
break;
case 2 :
if (cursor._currentframe == 5) {
attackEnemy(z, 10 * damx, 4);
} else {
attackEnemy(z, 10 * damx, 3);
}
break;
case 3 :
attackEnemy(z, 30 * damx, 5);
break;
case 4 :
attackSpider(z);
break;
case 6 :
attackEnemy(z, 20 * damx, 5);
break;
case 7 :
attackEnemy(z, 30 * damx, 6);
}
}
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) {
break;
}
playSound("hit11", "hit12");
}
cursor.ammo--;
if (cursor.ammo <= 0) {
cursor.gotoAndStop(1);
cursor._xscale = (cursor._yscale = 140);
ammopip.gotoAndStop(1);
} else {
cursor._xscale = (cursor._yscale = 120);
}
}
}
if (reload >= 0) {
reload--;
}
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) {
playSound("coin1", "coin2", "coin3", "coin4");
} else {
playSound("almaz1", "almaz2");
}
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;
ammopip.gotoAndStop(3);
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);
}
}
}
}
};
onMouseUp = function () {
mousePressed = false;
if (paused == false) {
if (cursor._currentframe == 1) {
hitrad = 0;
if (handpow == 1) {
playSound("hit3");
cursor.lopata.img.gotoAndPlay(15);
quake = handtype[handnum][handpow];
switch (handtype[handnum][handpow]) {
case 1 :
case 2 :
if (effect == true) {
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
}
break;
case 3 :
hitrad = 80;
createPart(levelmap._xmouse, levelmap._ymouse, "crack", 1, 1);
break;
case 4 :
hitrad = 120;
createPart(levelmap._xmouse, levelmap._ymouse, "crack", 1, 1);
}
} else {
cursor.lopata.img.gotoAndPlay(16);
}
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
attackTree(z, (Math.floor(power / 10) * 2) + 1, 0);
if (z.img._currentframe < 5) {
playSound("tree1", "tree2");
} else if (z.img._currentframe == 5) {
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, 20 * handatt[handnum]);
} else {
attackChest(z, 40 * 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 1 :
if (handpow == 0) {
attackEnemy(z, 20 * handatt[handnum], 2);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 45 * 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], 5);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 70 * handatt[handnum], 5);
playSound("hit2");
}
break;
case 4 :
attackSpider(z);
break;
case 5 :
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], 5);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 45 * handatt[handnum], 5);
playSound("hit2");
}
break;
case 7 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 6);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 100, 6);
playSound("hit2");
}
}
}
i++;
}
if (hitrad != 0) {
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (point_distance(levelmap._xmouse, levelmap._ymouse, z._x, z._y) < hitrad) {
switch (z.type) {
case 1 :
case 5 :
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, 6);
}
}
i++;
}
}
power = 0;
}
}
};
gotoAndPlay ("Weapons");
Frame 33
_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) {
z.hp = z.hp - (dam / diff);
if (type > 0) {
switch (type) {
case 1 :
z.moving = (-stupor) * handatt[handnum];
if (z.cargo > 0) {
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.cargo = (z.grib._visible = 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) {
z.gotoAndStop(z._currentframe + 16);
z.sleep = true;
}
}
break;
case 2 :
z.moving = (-stupor) * handatt[handnum];
z.vspeed = 4 + random(4);
if (z.act == 0) {
z.y = z._y;
z.act = 1;
if (z.sleep == false) {
z.gotoAndStop(z._currentframe + 8);
}
}
break;
case 3 :
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 :
if (z.moving == 1) {
playSound("bearstay");
if (z._currentframe < 10) {
z.last = z._currentframe;
}
}
z.gotoAndStop(11 + random(2));
z.dam.gotoAndPlay(1);
z.moving = (-stupor) * handatt[handnum];
break;
case 5 :
if (z.type == 3) {
playSound("bird1", "bird2");
} else {
playSound("owl1", "owl2");
}
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) {
if (z.info < 8) {
createWeap(z._x, z._y + z.bird._y, 1 + z.info, 0);
} else {
createPrize(z._x, z._y + z.bird._y, z.info - 1, 1, 0);
}
z.bird.weap._visible = false;
z.info = undefined;
}
z.moving = -6;
z.speed = z.speed * 1.2;
z.bird.gotoAndPlay(15);
z.shad.gotoAndPlay(15);
break;
case 6 :
z.act = 2;
z.image_index = 18;
if (z.cargo <= 0) {
break;
}
z.cargo = false;
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
}
if (z.hp < 1) {
if (z.cargo > 0) {
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;
dieEnemy(z);
}
};
_global.attackTree = function (z, dam, type) {
if (z.img._currentframe != 6) {
z.hp = z.hp - dam;
z.act = 1;
z.scale = z.scale + (dam * 6);
if (z.scale > 10) {
z.scale = 10;
}
if (z.img._currentframe != 5) {
if (effect == true) {
if (type != 1) {
createPart(levelmap._xmouse, levelmap._ymouse, "list", 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), "list", levelmap.getNextHighestDepth(), 1, z._currentframe);
}
}
}
}
if (z.hp < 1) {
achi[9]++;
z.img.gotoAndStop(6);
playSound("box2");
z.info.removeMovieClip();
createPrize(z._x, z._y - 40, 1, 2 + random(4), 0);
if (effect == true) {
dam = 10;
while (dam--) {
createPart((z._x - 75) + random(150), (z._y - 30) - random(130), "chip", levelmap.getNextHighestDepth(), 1, z._currentframe);
}
}
} else {
z.img.gotoAndStop(1 + Math.floor((50 - z.hp) / 10));
}
}
};
gotoAndPlay ("Upgrades");
Frame 43
_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) {
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.but10.title = str_upgr_10;
ob.but11.title = str_upgr_11;
ob.but12.title = str_upgr_12;
ob.but13.title = str_upgr_13;
ob.but14.title = str_upgr_14;
if (weapin[2] > (maxlvl - 1)) {
ob.but7.gotoAndStop(3);
}
if (weapin[3] > (maxlvl - 1)) {
ob.but6.gotoAndStop(3);
}
if (weapin[4] > (maxlvl - 1)) {
ob.but2.gotoAndStop(3);
}
if (weapin[5] > (maxlvl - 1)) {
ob.but3.gotoAndStop(3);
}
if (weapin[6] > (maxlvl - 1)) {
ob.but5.gotoAndStop(3);
}
if (weapin[7] > (maxlvl - 1)) {
ob.but1.gotoAndStop(3);
}
if (weapin[8] > (maxlvl - 1)) {
ob.but4.gotoAndStop(3);
}
};
_global.reUpgr = function (ob) {
ob.but1.cost = Math.round((200 * upgr[1]) * (upgr[1] / 2));
ob.but2.cost = Math.round((150 * upgr[2]) * (upgr[2] / 2));
ob.but3.cost = Math.round((150 * upgr[3]) * (upgr[3] / 2));
ob.but4.cost = Math.round((200 * upgr[4]) * (upgr[4] / 2));
ob.but5.cost = Math.round((150 * upgr[5]) * (upgr[5] / 2));
ob.but6.cost = Math.round((100 * upgr[6]) * (upgr[6] / 2));
ob.but7.cost = Math.round((200 * upgr[7]) * (upgr[7] / 2));
ob.but8.cost = Math.round((100 * upgr[8]) * (upgr[8] / 2));
ob.but9.cost = Math.round((200 * upgr[9]) * (upgr[9] / 2));
ob.but10.cost = 0;
ob.but11.cost = 1000;
ob.but12.cost = 5000;
ob.but13.cost = 25000;
ob.but14.cost = 90000 /* 0x015F90 */;
i = 1;
while (i < 15) {
z = ob["but" + i];
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++;
}
};
_global.doUpgr = function (z) {
upgr[z]++;
switch (z) {
case 1 :
bonusGauss = bonusGauss + 0.1;
break;
case 2 :
bonusGun = bonusGun + 0.2;
break;
case 3 :
bonusShot = bonusShot + 0.2;
break;
case 4 :
bonusRocket = bonusRocket + 0.05;
break;
case 5 :
bonusMine = bonusMine + 0.05;
break;
case 6 :
bonusKap = bonusKap + 1;
break;
case 7 :
bonusBomb = bonusBomb + 0.05;
break;
case 8 :
bonusMagnet = bonusMagnet + 0.2;
break;
case 9 :
bonusDeposit = bonusDeposit + 0.1;
break;
case 10 :
case 11 :
case 12 :
case 13 :
case 14 :
if (upgr[z] == 10) {
} else {
upgr[z] = 10;
}
gamemenu["but" + (handnum + 9)].selback._visible = false;
handnum = z - 9;
}
getUpgrDone();
setStat(6, upgr_done);
getWeapDone();
setStat(5, weap_done);
};
_global.getUpgrDone = function () {
upgr_done = 0;
i = 1;
while (i < 10) {
upgr_done = upgr_done + (upgr[i] - 1);
i++;
}
};
_global.getWeapDone = function () {
weap_done = 0;
i = 11;
while (i < 15) {
if (upgr[i] == 10) {
weap_done++;
}
i++;
}
};
_global.reHint = function (ob) {
ob.title = (str_menu_hint + hintnum) + "/7";
ob.img.gotoAndStop(hintnum);
};
gotoAndPlay ("Game");
Frame 53
lvlmap1 = "00000000000000000000000000000000000000000000120201000000021100000000000200100000000000000000130000000000100100000000000000000200000001100200000000010000000000000000140000000000000000000001000000000000000000000001010100000000000100000000000001000000010000000000010101010101010034000100000000010000000000000100000001000000000000000000000000010101000000000000150000000000000000000001000000000013020000000001000001000200000000001300010000000000000012000000000000130200000000000214000000000000000000000000000000000000";
lvlmap2 = "00000000000000000000000000000000000000000001000100010001000000000000000001000000010000000100000000000000010031000000310001000000000000000000000031000000000000000000000042000100000001004200000000000015001200010101001500120000000000001900000000000000190000000000010000000000420000000000000000000000000000150012000000010000000101000000000019000000000000000000000101000000000000000101000000000002000101010000010100000000000000000002000001010000000002000000000000000000020000000200000000000000000000000000000000000000";
lvlmap3 = "00000000000000000000000000000000000000000000000000020000000100000000000200000200000001000100000000000000000000180000000100000000000000000200100011001200000000000000000000100020001900000001000000000200100021000000000012000000000000160022000032000010000100000000000017000000000016000000000000010010000032000022001700000000000014000000000021001000000002000001000000180020001000000000000000000000140011001000000200000000000000010001001900000000000002000000010000000000000200000000000000000000000000000000000000000000";
lvlmap4 = "00000000000000000000000000000000000002000000020000000000000002000000000000000000000200020000000000000002000000020000000101010100000000000000000001010100000000000000020000020101000000000000000000000000000100000000000000000000000000020100000000010000000000000000000001000043010101430000000000000201000000010000000100000000000001000000010100340001010000000000010000000001000000010000000000020100000000430101014300000000000100000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000";
lvlmap5 = "00000000000000000000000000000000000000000000000300000012010000000000000003000000200010000001000000000000000000000016003000010000000003000000030000001341000100000000000000000000000041000100000000000000030000000000124100000000000000000000000000100000000000000000000000030000001100000000000000000003000000000000134400000000000000000000000000004400010000000000030000000300000012440001000000000000000000000016003000010000000000000300000020001100000100000000000000000003000000130100000000000000000000000000000000000000";
lvlmap6 = "00000000000000000000000000000000000000000000000200020000000200000000000002000000000000000000000000000000000001010101010000000200000000020001000000000001000000000000000001000000320000000100000000000001000000000000000000010000000002010032000000000000000100000000000100000000000032000001000000000001000000000000000000010000000000020100003200000000010000000000000000010000000000010000000000000000020001010101010000000200000000000000000000000000000000000000000200000002000002000002000000000000000000000000000000000000";
lvlmap7 = "00000000000000000000000000000000000000000000020000000002000000000000000200000000000000000000020000000000210000000002000021000000000000000002000000000000000200000000020000004001400000000000000000000000004000000040000000000200000000000201003400010000000000000000020000400000004000000000020000000000000240014000000000000000000000000000000000000000022100000000000200000000020000000000020000000000000021000000000000000000000000000002000000000002000000000000000000000002000000000000020000000000000000000000000000000000";
lvlmap8 = "00000000000000000000000000000000000000000000000000000000000000000000000100000000010000000000000000000000000000000000000100000000000100000001000000000000000000000000000000220000320000450100000000000000000000000000000000000000000001000000000000000000000000000000000045010000230000320000000000000000000000000000000000000000000000000000320000000000000100000000000000000000000000220000000000000001000000004500010000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000";
lvlmap9 = "00000000000000000000000000000000000000000000000200000200000002000000000002000000000000000000000000000200000000000000000000000200000000000000000000000000000000000000010000004141410000000100000000010000004100000041000000010000000100000041003200410000000100000001000000410000004100000001000000000100000041414100000001000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000200000000000200000000000200000000000000000000000002000000000002000000000000000000000000000000000000";
lvlmap10 = "00000000000000000000000000000000000000000000001215000000000000000000010021001001001100200001000000000023001000000000110021000000000021001000003200000011002200000000001000110000000010001100000000001000000011010010000100110000001401003200001110000000000013000015000000000010110100320000120000001100010010010011000000100000000000110010000000001100100000000000220011000032000000100021000000000021001100000000100023000000000001002000110100100021000100000000000000000019140000000000000000000000000000000000000000000000";
lvlmap11 = "00000000000000000000000000000000000000000003010101000003000000000000000300010000000100000003000000000000010000000000010000000000000003010000002300000001000003000000010020002100210020000100000000010000002100000021000000010000000100002300003200000000210100000001000000210000002100000001000000000100200021002100200001000000000000010000002300000001000000000000030001000000000001000000030000000000000100000001000000000000000000030000010101000000000300000000000000030000000003000000000000000000000000000000000000000000";
lvlmap12 = "00000000000000000000000000000000000000000001010101010000000000000000000101000000000001010000000000000100000000300000000001000000000001003000000000003000010000000001000000000000000000000001000000010030000046000046003000010000000100000000000101000000000100000001000000000001010000000001000000010030000046000046003000010000000100000000000000000000000100000000010030000000000030000100000000000100000000300000000001000000000000010100000000000101000000000000000000010101010100000000000000000000000000000000000000000000";
lvlmap13 = "00000000000000000000000000000000000000000200000000000000000200000000020100001200000000010000020000000000001000000015000000010000000100001641003200001700000100000000000000110000001000000000000000001200000011001000000115000000001441010000441944003200001300000015410032004418440000010012000000001301000010001100000014000000000000000010000000110000000000000001000016410032000017000001000000000000001300000014000000000000000200010000130000000100010002000000000002000000000000000200000000000000000000000000000000000000";
lvlmap14 = "00000000000000000000000000000000000000000002000002000002000000000000020000000000000000000000020000000000000100000000000000000000000000200000210000220000200000000000000100000001000000000100000000010000000000000000000000000000000000300030003000300030000000000000000030003000300030003000000000000100000000000000000000000000000000000001000000000000000100000000002000002200002101002000000000000100000000010000000000000000000002000000000000000000000002000000000000020000020000020000000000000000000000000000000000000000";
lvlmap15 = "00000000000000000000000000000000000000000000000200000000000002000000000002000000000000020000000000000000000002000000020000000000000000020000000000020000000002000000000000000000000000000000000000000018000100000001000018000000000010001100010001000010001100000010004500110001000010004200110000114500460017000016004200431000001000460010000000001100430011000011000014000000010000130000100000100041000031000000004100001100001144000000000000310001440010000000130000000100000000000014000000000000000000000000000000000000";
lvlmap16 = "00000000000000000000000000000000000000000000000000000000000000000000000000000101010000000000000000000000010100000001010000000000000000010000002300000001000000000000000100220000002200010000000000000100000000000000000001000000000001002200003000002200010000000000010000000000000000000100000000000001002200000022000100000000000000010000002300000001000000000000000001010000000101000000000000000000000001010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
lvlmap17 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000001000000000000000000000100000000000000000000000001000000000000000000000100000000000000000000000001000000000000000000010000000000000000000000010000000000000000000000000000000000010000000000000000010000010000000000000000000100000000000000000000000000000000000000000000000000000001000000000000000000000100000000000000000000000200000000000000000002000000000000000002000002010000000000000000000000000000000000000000";
lvlmap18 = "00000000000000000000000000000000000000000000000200020000000200000000000002000000000000000000000000000000000001010101010000000200000000020001000000000001000000000000000001000000000000000100000000000001000000000000000000010000000002010000000000000000000100000000000100000000000000000001000000000001000000000000000000010000000000020100000000000000010000000000000000010000000000010000000000000000020001010101010000000200000000000000000000000000000000000000000200000002000002000002000000000000000000000000000000000000";
lvlmap19 = "00000000000000000000000000000000000001000000000000000000000201000001000000000000000000000000020000010000000000000000000000000100000100000000000000000000000201000001000000000000000000000000010000010000000000000000000000000200000100000000000000000000000001000001000000000000000000000000010000010000000000000000000000000200000100000000000000000000000001000001000000000000000000000002010000010000000000000000000000000100000100000000000000000000000002000000010000000000000000000002010000000000000000000000000000000000";
lvlmap20 = "00000000000000000000000000000000000100000000000000000000000100000001000000000000000000000001000000010000000000000000000000010000000100000000000000000000000100000001000000000000000000000001000000010000000000000000000000010000000100000000000000000000000100000001000000000000000000000001000000010000000000000000000000010000000100000000000000000000000100000001000000000000000000000001000000010000000000000000000000010000000100000200000000000000000102000000000000000002000002010000000000000000000000000000000000000000";
lvlmap21 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000003000000000000000300000300000300000000000000000000000000000000000000";
lvlmap22 = "00000000000000000000000000000000000000000000020000000002000000000000000200000000000000000000020000000000000000000002000000000000000000000002000000000000000200000000000000000000000000000000000000000002000000020000000200000200000000000000000000000000000000000000020000000000000200000000020000000000000200000000000000000000000000000000000000000002000000000000000200000000020000000000020000000000000000000000000000000000000000000002000000000002000000000000000000000002000000000000020000000000000000000000000000000000";
lvlmap23 = "00000000000000000000000000000000000000020001010101010000000002000000000101000000000001010000000000020100000000000000000001000000000001000000000000000000010000000001000000000000000000000001000000010000000000000000000000010000000100000000000000000000000100000001000000000000000000000001000000010000000000000000000000010000000100000000000000000000000100000000010000000000000000000100000000020100000000000000000001000000000000010100000000000101000000000000000200010101010100000000020000000000000000000000000000000000";
lvlmap24 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000010000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000001000000000000000000000000000000000000000000000000000000000000000000000000000001000000000100000000000000000000000000000000000000000000000000000000000000000000000100000000010000000000000000000000000000000000000000000000000000000000";
lvlmap25 = "00000000000000000000000000000000000001500001005000000000000200000001005000010050010000000000000000000052515151565151515400000000000000020001005000010050000100000000000001000050000001500001000000000053515151565151515500000000000100500001005000000100000000000001005000000150000100000000020000000152515151565151515400000000000000000000005000010050000000000000000002005700010000500001000000000000000000005151515500000000000100000100000001000000000000000000000000000100000000000002000000000000000000000000000000000000";
lvlmap26 = "00000000000000000000000000000000000000000000000000030000500000000000000300000000000000005000000000005351515151515151540050000300000050000000000000005000500000000000500053515151540350005000000000005003500000005000500050000000000050005000005700005000500000000000500050000000000050005003000000005000500003000000500050000000000050005251515151515500500000000000500000000000000000005000000000005251515151515151515155000300000000030000000000000000000000000000000000000000000300000000000000000000000000000000000000000000";
lvlmap27 = "00000000000000000000000000000000000000000250000000000200000002000000020000500000000000000000000000005351515651515151515151515100000050010150000000000000000000000000500101500000000000000000000000005001015000005700515154000000000050010150000000000101500000000000500101500000500101015000000000005251515651515501010150000000000000000050010101010101500000000000000000500101010101015000000000000000025251515151515155000000000002000000000000000000000002000000000000000200000002000000000000000000000000000000000000000000";
lvlmap28 = "00000000000000000000000000000000000000000200000000000000020000000000000000535154000000000000020000000200535501525400000000000000000000535501000152515400000001000000005001000000010152515401010000000252515401000000010152515100000000000057000100000000000000000000000000000001000000000000000000000253515501000000010153515100000000500100000001015351550101000000005254010001535155000000010000000200525401535500000000000000000000000052515500000000000002000000000002000000000000000200000000000000000000000000000000000000";
lvlmap29 = "00000000000000000000000000000000000000000000000000000000000000000000000101010101000000000200000000000001535151515401010153515100000101025001010150010101500101000001535155015351565154015001010000015001010150015002500150010100000157005401500152515651565151000001000150015001010150015001010000015001525156515151565155010100000150010101500101015001010201000001525151515501020152515151510000010102010101010101010101010100000000000000000100000100000000000000000000000000000000000000000000000000000000000000000000000000";
lvlmap30 = "00000000000000000000000000000000000001500000005000000050010000000000015000000050000000500100000000000152515151565154005001000000000001010101015001500050010000000000015351515156515500500100000000000150000000500000005001000000000001500053515651515155010000000000015000500150010101010100000000000150005251565151515401000000000001500000005000000050010000000000015000000050000000500100000000000152515157005151515501000000000001000000000000000000010000000000010000000000000000000100000000000000000000000000000000000000";
lvlmap31 = "00000000000000000000000000000000000000005000500050005003000000000000030050005003500050000000000000000000500052515651565154000300000000005003000050005000500000000000535156515151550350005000000000005000500000000000500050030000000050005003535151515500500000000000500050005000000300005000000000005003525156515151540050030000000050000000500300005000500000000000525154005000535156515500000000000000500350005003500000000300000000005251555700515500000000000000000003000000000000030000000000000000000000000000000000000000";
lvlmap32 = "00000000000000000000000000000000000000000001000000500000000000000000000100000100005000010001000000000153515151540052515154000000000000500000005000010000500000005151515500010050000100015000000000000100010000500000000050010000000000000000005700515151550000000000535151515100000000000100000000005000000100500000010000000000000050000100005000000053515151000001500000000150000100500000000000005251515400525151515500010000000000000150000100000001000000000000010000500000000100000000000000000000000000000000000000000000";
lvlmap33 = "00000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000000010000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000022000022000000000000000000010000000000000001000000000000000000000000000000000000000000000100000022000022000000000000000000000000000000000000000000000000000000000000000000000100000000000000000100000001000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
lvlmap34 = "00000000000000000000000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000002200000000010000000000000000000000000000000000000000010000002200000022000000000000000000000000000000000001000000000000010001000023000000000000000000000000000000000000000000000000000000000022000000220000000000000100000000000000000000000000000000000001000000220000000100000000000000000000000000000000000000000001000001000000000100000000000000000000000000000000000000000000000000000000000000000000000000";
lvlmap35 = "00000000000000000000000000000000000000000000000000000000000000000000010000000000000001000100000000000000000022000000000000000000000100000000000000220000010000000000000022000100000000000000000000000000000100230000002200000000000000000000000000010000000000000000010000220000002300000001000000000000000000000000000022000000000001000000002200000000000000000000000000000000000022000000000000000100000100000000000001000000000000000100000000010000000000000000000000000000000000000000000000000000000000000000000000000000";
lvlmap36 = "00000000000000000000000000000000000000000000000000000000000000000001000000000100000000000001000000000000220000002200010022000000000001000000000000000000000000000000000001002300000022000001000000000000000000000000000000000000000100002200010023000000220100000000000000000000000000000000000000000100000022000100230001000000000000000000000000000000000100000000000022000000220000002200000000000100000000000100000000010000000000000000010000000100010000000000000000000000000000000000000000000000000000000000000000000000";
lvlmap37 = "00000000000000000000000000000000000000000000000000000000000000000000010000010000010100000100000000010000000001000000000000010000000000220000220000220000220000000001000000000000000000000000000000000022000023000023000022000000000100000000010000000100010000000000010001000000010000000001000000000022000023000023000022000000000000000000000000000000000001000000002200002200002200002200000000010000010000000000000000010000000000000000000101000100010000000000010000000000000000000000000000000000000000000000000000000000";
lvlmap38 = "00000000000000000000000000000000000000000100000100000000010000000000010000002200000022000001000000010000220000010001000022000000000100000000010000000100000000000000002200002300000023000022000000010000000000000100000000000000000000002200010023000100220001000001000000000000000100000000000000000022000023000000230000220000000100000000000100000000000000000000000022000000000000002200000000000100000022000100220000010000000100010001000000000100010000000000000000000000010000000000000000000000000000000000000000000000";
lvlmap39 = "00000000000000000000000000000000000000000000000000010000000000000001000001000000000000010000000000000022000000220022000000220000000001000022000000000022000000000000000000000000230000000000000000000022000023000000230000220000000000000100000001000001000000000000010000000001000000000000000000000022000023000000230000220000000000000000000023000000000000000001000000220000000000220000000000000022000000220022000000220000000000000001000000000001000000000000010000000000010000000001000000000000000000000000000000000000";
lvlmap40 = "00000000000000000000000000000000000000010000000000000100000000000000000000000001000000000001000000000000220000002200000022000000000001000000220000002200000000000000000022000000220000002200000000000000000023000000230000000000000000220000000100010000002200000001000000230000230000230000000000000022000000010001000000220000000000000000230000002300000000000000000022000000220000002200000000000100000022000000220000010000000000002200000022000000220000000000000000000100000001000000000000000000000000000000000000000000";
lvlmap41 = "00000000000000000000000000000000000000000002000000020000020001000000000000000000000000000000020000000002000000001800180000000000000000010100001000190011000000000000010000001600000000001300000000010000000000130032000101000000000001000000000001000000000100000000000101010001000000000000010000000000000032000015000000000000000000001500000000001700000001000000000200110018001000000101000000000000000019001900000000000000000000000002000000000000000002000000000000000000000200000200010000000000000000000000000000000000";
lvlspw1 = "00525200005252525200005252525252";
lvlspw2 = "11111100001111111111101000000000535353535353";
lvlspw3 = "000010501050000000105010501050000000105010501050105010";
lvlspw4 = "23232300000053535353535300000023232323230000000010101010101010";
lvlspw5 = "00424200000022222222222200000000125222001252220000424200000022125222521222222222";
lvlspw6 = "007000700070000000707070700000002020202000000040007070700070707000707070";
lvlspw7 = "201050105050100040505010102050102010505010004010201050501010202010501000402010102020501010202020";
lvlspw8 = "006060600000380000006060606060000038380000606060606060606000003839380000006060606060606060606060";
lvlspw9 = "5050505050505050505000003232320000001010101010101010101010101000003535350000002020202020312020202020312020202020";
lvlspw10 = "703060006030700060307000003830300031303030003038303030000000707070007070707000007070707070000000707070707070";
lvlspw11 = "102010207020102070201020505050505040405050505050000000202020200000391010101010000000202020202039000000201020102010201020";
lvlspw12 = "603060306030603960306030000000706060606060606000000070303030303930303030303030000000706030603060603060306030603960306030";
lvlspw13 = "50102060307000102010005070500040000030105060207000201060503170000060702010503020104000003070107050202030105050306000003130605020101020102030203030";
lvlspw14 = "535353535353535353530040111111111111111111110040232323232323232323230040606060606060606060603939112311231123112311233939112311231123112311233939";
lvlspw15 = "232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323";
lvlspw16 = "50601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030207000383950601030202020";
lvlachi1 = [[3, 11], [18, 5], [6, 11]];
lvlachi2 = [[0, 10], [17, 3], [19, 2]];
lvlachi3 = [[11, 2], [12, 2], [13, 2]];
lvlachi4 = [[10, 2], [18, 5], [7, 8]];
lvlachi5 = [[2, 4], [15, 3], [16, 3]];
lvlachi6 = [[5, 16], [17, 4], [7, 37]];
lvlachi7 = [[2, 3], [12, 4], [9, 19]];
lvlachi8 = [[4, 25], [13, 2], [14, 1]];
lvlachi9 = [[1, 8], [16, 20], [7, 20]];
lvlachi10 = [[12, 6], [13, 2], [14, 2]];
lvlachi11 = [[2, 2], [19, 12], [8, 11]];
lvlachi12 = [[4, 22], [1, 26], [5, 3]];
lvlachi13 = [[15, 4], [16, 8], [17, 4]];
lvlachi14 = [[2, 3], [17, 10], [8, 10]];
lvlachi15 = [[9, 9], [6, 190], [7, 90]];
lvlachi16 = [[10, 3], [13, 6], [8, 35]];
lvlspw17 = [[5, 50]];
lvlspw18 = [[7, 50]];
lvlspw19 = [[6, 35]];
lvlspw20 = [[1, 45], [2, 85]];
lvlspw21 = [[4, 45]];
lvlspw22 = [[3, 45], [6, 60]];
lvlspw23 = [[7, 45]];
lvlspw24 = [[1, 50], [2, 80], [3, 90], [4, 100], [5, 45], [6, 90], [7, 100]];
lvlspw25 = [[1, 1], [1, 2], [2, 2], [1, 2], [1, 1]];
lvlspw26 = [[1], [5], [4], [5], [4]];
lvlspw27 = [[2, 1], [2, 5], [2, 4], [5, 5], [2, 1]];
lvlspw28 = [[1, 1], [2, 2], [5, 5], [4, 1], [2, 4]];
lvlspw29 = [[2, 1, 1], [2, 1, 5], [1, 5, 5], [1, 5, 4], [5, 5, 4]];
lvlspw30 = [[1, 2, 1], [5, 2, 5], [1, 5, 1], [5, 2, 5], [1, 4, 1]];
lvlspw31 = [[1, 1, 1, 1], [2, 2, 2, 2], [5, 5, 5, 5], [4, 4, 4, 4], [1, 1, 1, 1]];
lvlspw32 = [[1, 2, 4, 5], [2, 5, 1, 4], [4, 1, 2, 5], [1, 4, 5, 2], [5, 2, 4, 1]];
lvlachi17 = [[20, 3], [20, 6], [20, 10]];
lvlachi18 = [[20, 3], [20, 6], [20, 10]];
lvlachi19 = [[20, 3], [20, 6], [20, 10]];
lvlachi20 = [[20, 3], [20, 6], [20, 10]];
lvlachi21 = [[20, 3], [20, 6], [20, 10]];
lvlachi22 = [[20, 3], [20, 6], [20, 10]];
lvlachi23 = [[20, 3], [20, 6], [20, 10]];
lvlachi24 = [[20, 3], [20, 6], [20, 10]];
lvlachi25 = [[20, 3], [20, 6], [20, 10]];
lvlachi26 = [[20, 3], [20, 6], [20, 10]];
lvlachi27 = [[20, 3], [20, 6], [20, 10]];
lvlachi28 = [[20, 3], [20, 6], [20, 10]];
lvlachi29 = [[20, 3], [20, 6], [20, 10]];
lvlachi30 = [[20, 3], [20, 6], [20, 10]];
lvlachi31 = [[20, 3], [20, 6], [20, 10]];
lvlachi32 = [[20, 3], [20, 6], [20, 10]];
lvl25p0 = [[1, 3], [2, 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], [6, 10], [6, 9], [6, 8], [6, 7], [6, 6], [6, 5], [6, 4], [6, 3], [7, 3], [8, 3], [9, 3], [9, 4], [9, 5], [9, 6], [9, 7], [9, 8], [9, 9], [9, 10], [9, 11], [10, 11], [11, 11], [12, 11], [12, 10], [12, 9], [12, 8], [12, 7]];
lvl25p1 = [[1, 7], [2, 7], [3, 7], [4, 7], [5, 7], [6, 7], [7, 7], [8, 7], [9, 7], [10, 7], [11, 7], [12, 7]];
lvl26p0 = [[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, 7], [12, 6], [12, 5], [12, 4], [12, 3], [12, 2], [11, 2], [10, 2], [9, 2], [8, 2], [7, 2], [6, 2], [5, 2], [4, 2], [3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [4, 10], [5, 10], [6, 10], [7, 10], [8, 10], [9, 10], [10, 10], [10, 9], [10, 8], [10, 7], [10, 6], [10, 5], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [6, 8], [7, 8]];
lvl27p0 = [[1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [10, 5], [11, 5], [12, 5], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [7, 12], [6, 12], [6, 11], [6, 10], [6, 9]];
lvl27p1 = [[3, 14], [3, 13], [3, 12], [3, 11], [3, 10], [3, 9], [3, 8], [3, 7], [3, 6], [3, 5], [3, 4], [3, 3], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [9, 3], [9, 4], [9, 5], [9, 6], [9, 7], [9, 8], [8, 8], [7, 8]];
lvl28p0 = [[6, 14], [6, 13], [6, 12], [5, 12], [5, 11], [5, 10], [4, 10], [4, 9], [4, 8], [3, 8], [3, 7], [2, 7], [2, 6], [2, 5], [3, 5], [3, 4], [4, 4], [4, 3], [5, 3], [6, 3], [6, 4], [6, 5], [7, 5]];
lvl28p1 = [[9, 14], [9, 13], [9, 12], [10, 12], [10, 11], [10, 10], [11, 10], [11, 9], [11, 8], [12, 8], [12, 7], [13, 7], [13, 6], [13, 5], [12, 5], [12, 4], [11, 4], [11, 3], [10, 3], [9, 3], [9, 4], [9, 5], [8, 5]];
lvl29p0 = [[3, 14], [3, 13], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [9, 12], [9, 11], [9, 10], [9, 9], [9, 8], [9, 7], [9, 6], [9, 5], [9, 4], [8, 4], [7, 4], [7, 3]];
lvl29p1 = [[7, 14], [7, 13], [7, 12], [7, 11], [7, 10], [7, 9], [7, 8], [6, 8], [5, 8], [4, 8], [3, 8], [3, 7], [3, 6], [3, 5], [3, 4], [4, 4], [5, 4], [5, 3], [5, 2], [6, 2], [7, 2]];
lvl29p2 = [[11, 14], [11, 13], [11, 12], [11, 11], [11, 10], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [5, 9], [5, 8], [5, 7], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [11, 5], [11, 4], [11, 3], [11, 2], [10, 2], [9, 2], [8, 2]];
lvl30p0 = [[1, 3], [2, 3], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [4, 9], [5, 9], [5, 8], [5, 7], [5, 6], [5, 5], [5, 4], [5, 3], [6, 3], [7, 3], [8, 3], [9, 3], [10, 3], [11, 3], [12, 3], [12, 4], [12, 5], [12, 6]];
lvl30p1 = [[1, 7], [2, 7], [3, 7], [4, 7], [5, 7], [6, 7], [7, 7], [8, 7], [9, 7], [10, 7], [11, 7], [12, 7], [13, 7]];
lvl30p2 = [[1, 11], [2, 11], [3, 11], [4, 11], [5, 11], [6, 11], [7, 11], [7, 10], [7, 9], [7, 8], [7, 7], [7, 6], [7, 5], [8, 5], [9, 5], [9, 6], [9, 7], [9, 8], [9, 9], [9, 10], [9, 11], [10, 11], [11, 11], [12, 11], [12, 10], [12, 9], [12, 8], [12, 7]];
lvl31p0 = [[1, 4], [2, 4], [3, 4], [4, 4], [5, 4], [6, 4], [7, 4], [8, 4], [9, 4], [9, 5], [9, 6], [9, 7], [9, 8], [9, 9], [9, 10], [10, 10], [11, 10], [12, 10], [13, 10], [13, 9], [13, 8]];
lvl31p1 = [[1, 6], [2, 6], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [9, 12], [10, 12], [11, 12], [11, 11], [11, 10], [11, 9], [11, 8], [12, 8], [13, 8]];
lvl31p2 = [[1, 8], [2, 8], [3, 8], [4, 8], [5, 8], [5, 7], [5, 6], [5, 5], [5, 4], [5, 3], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [11, 2], [11, 3], [11, 4], [12, 4], [13, 4], [13, 5], [13, 6], [13, 7]];
lvl31p3 = [[1, 10], [2, 10], [3, 10], [4, 10], [5, 10], [6, 10], [7, 10], [7, 9], [7, 8], [7, 7], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [12, 6], [13, 6], [13, 7]];
lvl32p0 = [[1, 9], [2, 9], [3, 9], [3, 10], [3, 11], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [7, 11], [7, 10], [7, 9], [7, 8]];
lvl32p1 = [[10, 14], [10, 13], [10, 12], [10, 11], [11, 11], [12, 11], [12, 10], [12, 9], [12, 8], [12, 7], [11, 7], [10, 7], [9, 7], [8, 7]];
lvl32p2 = [[14, 5], [13, 5], [12, 5], [12, 4], [12, 3], [12, 2], [11, 2], [10, 2], [9, 2], [8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7]];
lvl32p3 = [[5, 0], [5, 1], [5, 2], [5, 3], [4, 3], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [4, 7], [5, 7], [6, 7], [7, 7]];
stop();
Symbol 6 MovieClip [mcDragon] Frame 1
Symbol 6 MovieClip [mcDragon] Frame 80
_root.fireFire();
Symbol 6 MovieClip [mcDragon] Frame 119
stop();
Symbol 49 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 50 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 241 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);
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 (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 342 MovieClip Frame 1
stop();
Symbol 525 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);
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 (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 701 MovieClip [weap] Frame 1
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
w1 = -25;
w2 = 25;
h1 = -25;
h2 = 25;
if (info == 0) {
limit = limit + 10;
}
wait = 15;
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 794 MovieClip Frame 1
if (_parent.blue == true) {
gotoAndStop (1);
} else {
gotoAndStop(1 + random(4));
}
img.gotoAndPlay(1 + random(30));
timer = 20;
onEnterFrame = function () {
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_parent._x - 15) + random(30), (_parent._y - 15) + random(30), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 20;
}
}
};
Symbol 794 MovieClip Frame 2
img.gotoAndPlay(1 + random(30));
Symbol 794 MovieClip Frame 3
img.gotoAndPlay(1 + random(30));
Symbol 794 MovieClip Frame 4
img.gotoAndPlay(1 + random(30));
Symbol 795 MovieClip [prize] Frame 1
kill = false;
timer = 250 + random(50);
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
speed = vspeed / 2;
w1 = -32 * _root.bonusMagnet;
w2 = 32 * _root.bonusMagnet;
h1 = -32 * _root.bonusMagnet;
h2 = 32 * _root.bonusMagnet;
if (info == 0) {
limit = limit + 10;
speed = speed + 2;
}
if ((((_x < 128) or (_x > 640)) or (_y < 112)) or (_y > 464)) {
dir = (point_direction(_x, _y, 384, 288) + 45) - random(90);
} else {
dir = random(360);
}
switch (_currentframe) {
case 1 :
img.gotoAndPlay(1 + random(12));
x = 94;
y = 78;
info = undefined;
break;
case 2 :
x = 94;
y = 78;
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 :
x = 94;
y = 78;
if (info == 0) {
blue = true;
}
info = undefined;
}
onEnterFrame = function () {
if ((_root.paused == false) or (_root.win == true)) {
if (kill == false) {
if (timer == 0) {
if (_xscale == 0) {
if (info.count == 0) {
food = info;
dieFood(this);
}
this.removeMovieClip();
} else {
_yscale = (_yscale - 5);
_xscale = (_yscale - 5);
}
} else {
timer--;
}
if (act > 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) {
break;
}
kill = true;
if (_currentframe < 7) {
playSound("coin1", "coin2", "coin3", "coin4");
} else {
playSound("almaz1", "almaz2");
}
}
}
} else if (_root.magnit == true) {
kill = true;
_yscale = 100;
_xscale = 100;
if (_currentframe < 7) {
playSound("coin1", "coin2", "coin3", "coin4");
} else {
playSound("almaz1", "almaz2");
}
}
} 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);
if (_root.effect == true) {
createInterPart(10 + random(25), 10 + random(25), "star1");
}
this.removeMovieClip();
break;
case 2 :
_root.curr_money = _root.curr_money + (30 * _root.bonusDeposit);
_root.achi[7]++;
addStat(2, 30 * _root.bonusDeposit);
if (_root.effect == true) {
createInterPart(10 + random(25), 10 + random(25), "star1");
}
this.removeMovieClip();
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);
this.removeMovieClip();
break;
case 7 :
_root.key++;
this.removeMovieClip();
break;
case 8 :
_root.curr_money = _root.curr_money + (150 * _root.bonusDeposit);
_root.achi[8]++;
addStat(2, 150 * _root.bonusDeposit);
this.removeMovieClip();
}
}
}
}
};
Symbol 795 MovieClip [prize] Frame 2
img.gotoAndPlay(1 + random(12));
Symbol 818 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 838 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 1
stop();
Symbol 875 MovieClip Frame 1
stop();
timer = 30;
key1._visible = false;
keys = 1;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 879 MovieClip Frame 1
stop();
timer = 30;
key1._visible = false;
key2._visible = false;
key3._visible = false;
keys = 3;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 880 MovieClip [chest] Frame 1
hp = 100;
w1 = -12;
w2 = 58;
h1 = -35;
h2 = 40;
Symbol 952 MovieClip [enemy4] Frame 1
gotoAndStop (8);
speed = 2;
w1 = 0;
w2 = 50;
h1 = -15;
h2 = 35;
if (_root.minigame != 1) {
xstart = (xtile = _x / 48);
} else {
xstart = 0;
}
ystart = (ytile = _y / 36);
moving = 1;
act = 0;
die = false;
path = new Array();
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 {
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 952 MovieClip [enemy4] Frame 20
if ((_root.minigame == 0) or (_root.minigame == 6)) {
_root.rain.gotoAndPlay(2);
}
Symbol 952 MovieClip [enemy4] Frame 36
stop();
onEnterFrame = function () {
_alpha = (_alpha - 2);
if (_alpha < 2) {
this.removeMovieClip();
}
};
Symbol 977 MovieClip [kap] Frame 23
stop();
Symbol 1000 MovieClip [dirt] Frame 1
gotoAndPlay(1 + random(3));
Symbol 1000 MovieClip [dirt] Frame 28
this.removeMovieClip();
Symbol 1021 MovieClip [explo2] Frame 19
this.removeMovieClip();
Symbol 1022 MovieClip [explo1] Frame 19
this.removeMovieClip();
Symbol 1244 MovieClip Frame 39
gotoAndPlay (15);
Symbol 1255 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;
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 ((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--;
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 1255 MovieClip [enemy2] Frame 13
onEnterFrame = function () {
_alpha = (_alpha - 2);
if (_alpha < 2) {
this.removeMovieClip();
}
};
Symbol 1255 MovieClip [enemy2] Frame 21
stop();
Symbol 1258 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 1260 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 1262 MovieClip Frame 35
_parent.removeMovieClip();
Symbol 1268 MovieClip Frame 26
_parent.removeMovieClip();
Symbol 1285 MovieClip Frame 14
gotoAndPlay (1);
Symbol 1286 MovieClip [enemy6] Frame 1
stop();
hp = 100;
if (_root.minigame != 1) {
_y = -30;
} else {
_y = 560;
}
shad._alpha = 25;
shad._xscale = (shad._yscale = 75);
w1 = -30;
w2 = 30;
h1 = bird._y - 40;
h2 = bird._y + 30;
moving = 1;
if (random(10) < 5) {
bird._xscale = bird._xscale * -1;
shad._xscale = shad._xscale * -1;
}
if ((_root.minigame == 0) or (_root.minigame == 6)) {
huntSova(this);
}
cargo = false;
bird.weap._visible = false;
shad.weap._visible = false;
bird.grib._visible = false;
shad.grib._visible = false;
if ((_root.minigame == 0) or (_root.minigame == 6)) {
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) {
if (moving == 1) {
if ((_root.minigame == 0) or (_root.minigame == 6)) {
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 (cargo == false) {
speed = speed * -1;
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;
}
}
} else {
moving++;
}
if ((_root.minigame == 0) or (_root.minigame == 6)) {
if (_y < -30) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else if (_root.minigame == 1) {
_y = (_y - speed);
if (_y < 0) {
delEnemy(this);
}
}
}
};
Symbol 1294 MovieClip Frame 1
stop();
Symbol 1312 MovieClip Frame 14
gotoAndPlay (1);
Symbol 1313 MovieClip [enemy3] Frame 1
stop();
hp = 100;
shad._alpha = 25;
shad._xscale = (shad._yscale = 75);
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 = 748;
path = 1;
}
if (info == 0) {
bird.weap._visible = false;
shad.weap._visible = false;
if ((_root.minigame == 0) or (_root.minigame == 6)) {
huntVor(this);
}
} else {
bird.weap.gotoAndStop(info);
shad.weap.gotoAndStop(info);
_y = (200 + random(260));
}
cargo = false;
bird.grib._visible = false;
shad.grib._visible = false;
if ((_root.minigame == 0) or (_root.minigame == 6)) {
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) {
if (moving == 1) {
if ((_root.minigame == 0) or (_root.minigame == 6)) {
_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);
}
}
}
}
}
}
} else {
moving++;
}
if ((_root.minigame == 0) or (_root.minigame == 6)) {
if (_x < 24) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
if (_x > 748) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else if (_root.minigame == 2) {
_x = (_x + speed);
if (_x > 768) {
dieBird(this);
}
} else {
_x = (_x - speed);
if (_x < 0) {
delEnemy(this);
}
}
}
};
Symbol 1316 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 1319 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 1320 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 1327 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 1334 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 1341 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 1348 MovieClip Frame 1
gotoAndStop(1 + random(3));
Symbol 1349 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 1352 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 1355 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 1367 MovieClip [tree] Frame 1
if (img._currentframe == 1) {
hp = 50;
} else {
hp = 10;
}
w1 = -75;
w2 = 75;
h1 = -160;
h2 = -30;
act = 0;
scale = 20;
onEnterFrame = function () {
if (img._currentframe < 6) {
if (act > 0) {
if (_yscale < 100) {
_yscale = (_yscale + scale);
} else {
_yscale = (_yscale - scale);
}
if (scale < 1) {
act = 0;
_yscale = 100;
}
scale--;
}
}
};
Symbol 1370 MovieClip [tree_s] Frame 1
stop();
Symbol 1374 MovieClip [crack] Frame 1
if (random(2) == 0) {
_xscale = -100;
}
if (random(2) == 0) {
_yscale = -100;
}
Symbol 1374 MovieClip [crack] Frame 21
this.removeMovieClip();
Symbol 1558 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;
}
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 = 30 + random(30);
}
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--;
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 1676 MovieClip Frame 193
stop();
Symbol 1719 MovieClip Frame 189
stop();
Symbol 1724 MovieClip Frame 40
stop();
Symbol 1725 MovieClip [mcKingActionIntro] Frame 279
stop();
btnPlay.onRelease = _parent.launchGame;
btnOtherGames.onRelease = _parent.openOtherGamesLink;
brandingMc.onRelease = _parent.openSignLink;
Symbol 2567 MovieClip [__Packages.md5] Frame 0
class md5
{
function md5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 2568 MovieClip [__Packages.Particle] Frame 0
class Particle
{
var _stageWidth, _stageHeight, clip, _xVel, _yVel;
function Particle (libParticle, xpos, ypos, stageWidth, stageHeight) {
_stageWidth = stageWidth;
_stageHeight = stageHeight;
clip = libParticle;
clip._x = xpos;
clip._y = ypos;
}
function setVel(xvel, yvel) {
_xVel = xvel;
_yVel = yvel;
}
function setSize(size) {
clip._width = size;
clip._height = size;
}
function setAlphaDecr(val) {
_alphaDecr = val;
}
function update() {
clip._x = clip._x + _xVel;
clip._y = clip._y + _yVel;
clip._alpha = clip._alpha - _alphaDecr;
}
function destroy() {
removeMovieClip(clip);
}
var _alphaDecr = 0;
}
Symbol 1884 MovieClip Frame 1
stop();
Symbol 1884 MovieClip Frame 2
gotoAndStop (1);
Symbol 1884 MovieClip Frame 7
gotoAndStop (1);
Symbol 1884 MovieClip Frame 13
gotoAndStop (1);
Symbol 1884 MovieClip Frame 19
gotoAndStop (1);
Symbol 1884 MovieClip Frame 25
gotoAndStop (1);
Symbol 1884 MovieClip Frame 31
gotoAndStop (1);
Symbol 1884 MovieClip Frame 37
gotoAndStop (1);
Symbol 1884 MovieClip Frame 43
gotoAndStop (1);
Symbol 1884 MovieClip Frame 49
gotoAndStop (1);
Symbol 1884 MovieClip Frame 55
gotoAndStop (1);
Symbol 1884 MovieClip Frame 61
gotoAndStop (1);
Symbol 1884 MovieClip Frame 67
gotoAndStop (1);
Symbol 1884 MovieClip Frame 73
gotoAndStop (1);
Symbol 1884 MovieClip Frame 79
gotoAndStop (1);
Symbol 1884 MovieClip Frame 85
gotoAndStop (1);
Symbol 1884 MovieClip Frame 91
gotoAndStop (1);
Symbol 1884 MovieClip Frame 97
gotoAndStop (1);
Symbol 1884 MovieClip Frame 103
gotoAndStop (1);
Symbol 1884 MovieClip Frame 109
gotoAndStop (1);
Symbol 1884 MovieClip Frame 115
gotoAndStop (1);
Symbol 1884 MovieClip Frame 121
gotoAndStop (1);
Symbol 1884 MovieClip Frame 127
gotoAndStop (1);
Symbol 1884 MovieClip Frame 133
gotoAndStop (1);
Symbol 1884 MovieClip Frame 139
gotoAndStop (1);
Symbol 1884 MovieClip Frame 145
gotoAndStop (1);
Symbol 1884 MovieClip Frame 151
gotoAndStop (1);
Symbol 1884 MovieClip Frame 157
gotoAndStop (1);
Symbol 1884 MovieClip Frame 163
gotoAndStop (1);
Symbol 1884 MovieClip Frame 169
gotoAndStop (1);
Symbol 1884 MovieClip Frame 175
gotoAndStop (1);
Symbol 1884 MovieClip Frame 181
gotoAndStop (1);
Symbol 1884 MovieClip Frame 187
gotoAndStop (1);
Symbol 1884 MovieClip Frame 193
gotoAndStop (1);
Symbol 1884 MovieClip Frame 199
gotoAndStop (1);
Symbol 1884 MovieClip Frame 205
gotoAndStop (1);
Symbol 1884 MovieClip Frame 211
gotoAndStop (1);
Symbol 1884 MovieClip Frame 217
gotoAndStop (1);
Symbol 1884 MovieClip Frame 223
gotoAndStop (1);
Symbol 1884 MovieClip Frame 229
gotoAndStop (1);
Symbol 1884 MovieClip Frame 235
gotoAndStop (1);
Symbol 1884 MovieClip Frame 241
gotoAndStop (1);
Symbol 1884 MovieClip Frame 247
gotoAndStop (1);
Symbol 1884 MovieClip Frame 253
gotoAndStop (1);
Symbol 1884 MovieClip Frame 259
gotoAndStop (1);
Symbol 1884 MovieClip Frame 265
gotoAndStop (1);
Symbol 1884 MovieClip Frame 271
gotoAndStop (1);
Symbol 1884 MovieClip Frame 277
gotoAndStop (1);
Symbol 1884 MovieClip Frame 283
gotoAndStop (1);
Symbol 1884 MovieClip Frame 289
gotoAndStop (1);
Symbol 1884 MovieClip Frame 295
gotoAndStop (1);
Symbol 1884 MovieClip Frame 301
gotoAndStop (1);
Symbol 1884 MovieClip Frame 307
gotoAndStop (1);
Symbol 1884 MovieClip Frame 313
gotoAndStop (1);
Symbol 1884 MovieClip Frame 319
gotoAndStop (1);
Symbol 1884 MovieClip Frame 325
gotoAndStop (1);
Symbol 1884 MovieClip Frame 331
gotoAndStop (1);
Symbol 1884 MovieClip Frame 337
gotoAndStop (1);
Symbol 1884 MovieClip Frame 343
gotoAndStop (1);
Symbol 1884 MovieClip Frame 349
gotoAndStop (1);
Symbol 1884 MovieClip Frame 355
gotoAndStop (1);
Symbol 1884 MovieClip Frame 361
gotoAndStop (1);
Symbol 1884 MovieClip Frame 367
gotoAndStop (1);
Symbol 1884 MovieClip Frame 373
gotoAndStop (1);
Symbol 1884 MovieClip Frame 379
gotoAndStop (1);
Symbol 1884 MovieClip Frame 385
gotoAndStop (1);
Symbol 1884 MovieClip Frame 391
gotoAndStop (1);
Symbol 1884 MovieClip Frame 397
gotoAndStop (1);
Symbol 1884 MovieClip Frame 403
gotoAndStop (1);
Symbol 1884 MovieClip Frame 409
gotoAndStop (1);
Symbol 1884 MovieClip Frame 415
gotoAndStop (1);
Symbol 1884 MovieClip Frame 421
gotoAndStop (1);
Symbol 1884 MovieClip Frame 427
gotoAndStop (1);
Symbol 1884 MovieClip Frame 433
gotoAndStop (1);
Symbol 1894 MovieClip Frame 1
stop();
Symbol 1917 MovieClip Frame 1
_visible = false;
stop();
Symbol 1917 MovieClip Frame 2
_visible = true;
y = 0;
i = 0;
while (i < bankFood.length) {
z = bankFood[i];
if (z.count < 5) {
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 1917 MovieClip Frame 103
gotoAndStop (1);
Symbol 1940 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 1947 Button
on (press) {
if (_root.paused == false) {
showLogo(5);
openMenu("game");
_root.musicVol.setVolume(30);
}
}
Symbol 1953 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
_root.openSignLink();
}
Symbol 2001 MovieClip Frame 1
stop();
Symbol 2048 MovieClip Frame 1
stop();
Symbol 2095 MovieClip Frame 1
stop();
Symbol 2142 MovieClip Frame 1
stop();
Symbol 2189 MovieClip Frame 1
stop();
Symbol 2190 MovieClip Frame 1
gotoAndStop(_root.handnum);
Symbol 2195 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 2199 MovieClip Frame 1
stop();
Symbol 2206 MovieClip Frame 1
stop();
Symbol 2223 MovieClip Frame 1
ammo = 0;
speed = 0;
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 2223 MovieClip Frame 2
ammo = 1;
rad._xscale = Math.round((rad._yscale = (_root.radBomb * _root.bonusBomb) * 2));
Symbol 2223 MovieClip Frame 3
ammo = 1;
Symbol 2223 MovieClip Frame 4
if (_root.minigame == 1) {
ammo = 999999 /* 0x0F423F */;
} else {
ammo = Math.round(_root.clipGun + ((_root.clipGun / 2) * _root.bonusGun));
}
Symbol 2223 MovieClip Frame 5
if (_root.minigame == 1) {
ammo = 999999 /* 0x0F423F */;
} else {
ammo = Math.round(_root.clipShot + ((_root.clipShot / 2) * _root.bonusShot));
}
Symbol 2223 MovieClip Frame 6
ammo = 1;
rad._xscale = (rad._yscale = (_root.radBomb * _root.bonusMine) * 2);
Symbol 2223 MovieClip Frame 7
if (_root.minigame == 1) {
ammo = 999999 /* 0x0F423F */;
} else {
ammo = Math.round(_root.clipGauss * _root.bonusGauss);
}
Symbol 2223 MovieClip Frame 8
if (_root.minigame == 1) {
ammo = 999999 /* 0x0F423F */;
} else {
ammo = Math.round(_root.clipRocket * (_root.bonusRocket * 2));
}
rad._xscale = (rad._yscale = (_root.radRocket * _root.bonusRocket) * 2);
Symbol 2234 Button
on (rollOver) {
_parent.mess.show = true;
_parent.mess.txt.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.show = false;
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.desc.show = false;
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
x = (_parent._x + _x) - 60;
y = _parent._y + _y;
z = 9;
while (z--) {
createInterPart(x + (20 * z), y + random(60), "star2");
}
playSound("holy");
}
}
}
Symbol 2270 MovieClip Frame 1
show = false;
visible = false;
_alpha = 0;
Symbol 2274 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndStop (1);
}
Symbol 2278 MovieClip Frame 1
stop();
Symbol 2278 MovieClip Frame 7
stop();
Symbol 2286 Button
on (rollOver) {
_parent.mess.show = true;
_parent.mess.txt.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.show = false;
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.desc.show = false;
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
x = (_parent._x + _x) - 100;
y = (_parent._y + _y) - 10;
z = 10;
while (z--) {
createInterPart(x + (24 * z), y + random(30), "star2");
}
playSound("holy");
}
}
}
Symbol 2300 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 2301 MovieClip Frame 4
if (_root.handnum == (id - 9)) {
selback._visible = true;
} else {
selback._visible = false;
}
Symbol 2307 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndPlay ("on");
}
Symbol 2311 MovieClip Frame 1
stop();
Symbol 2311 MovieClip Frame 7
stop();
Symbol 2318 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
playSound("click");
_root.openMM1Link();
}
}
}
Symbol 2323 MovieClip Frame 1
stop();
Symbol 2341 MovieClip Frame 1
gotoAndStop(_parent._parent.info);
Symbol 2345 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.minigame = minigame;
openScreen("game");
}
}
}
Symbol 2358 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.minigame = 3;
_root.money = _root.money - need;
openScreen("game");
}
}
}
Symbol 2366 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.minigame = 6;
openScreen("game");
}
}
}
Symbol 2389 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
playSound("click");
_root.openSurvLink();
}
}
}
Symbol 2400 MovieClip Frame 1
stop();
Symbol 2400 MovieClip Frame 13
stop();
Symbol 2406 MovieClip Frame 1
award._visible = false;
x = 0;
achi = _root.achi[type];
plus = achi / 30;
onEnterFrame = function () {
if (_xscale == 100) {
if (achi > 0) {
achi = achi - plus;
x = x + plus;
have = Math.floor(x);
if (back._currentframe == 1) {
if (info <= have) {
back.gotoAndPlay(2);
playSound("holy");
if (_root.sav[_root.lvl][id] == 0) {
_root.sav[_root.lvl][id] = 1;
switch (_root.minigame) {
case 0 :
y = _root.lvl * 100;
break;
case 1 :
y = ((_root.lvl - 16) * ((id / 2) + 1)) * 100;
break;
case 2 :
y = ((_root.lvl - 24) * ((id / 2) + 1)) * 100;
}
_root.curr_money = _root.curr_money + y;
addStat(2, y);
award.text = ("+" + y) + "$";
award._visible = true;
icon.gotoAndStop(2);
}
}
}
} else {
counter = false;
}
}
};
Symbol 2413 MovieClip Frame 1
stop();
Symbol 2447 MovieClip Frame 7
bird2.gotoAndPlay(5);
bird3.gotoAndPlay(9);
bird1.weap._visible = false;
bird2.grib._visible = false;
bird3.grib._visible = false;
bird1.grib.gotoAndStop(4);
bird1.grib.grib.stop();
bird2.grib.grib.stop();
bird3.weap.gotoAndStop(5);
setStat(11, 1);
Symbol 2450 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.hintnum < 7) {
_root.hintnum++;
} else {
_root.hintnum = 1;
}
reHint(this);
}
}
}
Symbol 2451 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.hintnum > 1) {
_root.hintnum--;
} else {
_root.hintnum = 7;
}
reHint(this);
}
}
}
Symbol 2498 MovieClip Frame 1
stop();
Symbol 2504 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
playSound("click");
_root.openMM2Link();
}
}
}
Symbol 2505 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 2505 MovieClip Frame 2
initUpgr(this);
reUpgr(this);
getUpgrDone();
xbut1.title = "CONTINUE";
xbut1.but.onPress = function () {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openScreen("stage");
}
}
};
Symbol 2505 MovieClip Frame 11
but1.title = "RESUME GAME";
but2.title = "Options";
but3.title = "Help";
but4.title = "Restart Level";
but5.title = "Save & Quit";
if (_root.minigame == 3) {
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("option");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
showLogo(0);
openMenu("hint");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.minigame == 6) {
if (_root.mini_diff > 4) {
_root.lvl = 41 + Math.floor(_root.mini_diff / 5);
}
}
openScreen("game");
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
_root.lvl = 0;
_root.bonus = 0;
_root.minigame = 0;
openScreen("stage");
}
}
};
Symbol 2505 MovieClip Frame 21
but1.title = "START GAME";
but2.title = "Achievements";
but3.title = "Help";
but4.title = "Options";
but5.title = "More Games";
but6.title = "Host This Game";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.maxlvl > 1) {
openMenu("cont");
} else {
openScreen("stage");
}
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("achi");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
showLogo(0);
openMenu("hint");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("option");
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.openOtherGamesLink();
}
}
};
but6.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.openAddToWebsiteLink();
}
}
};
Symbol 2505 MovieClip Frame 31
but5.title = "Back";
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";
if (((_root.lvl == 0) or (_root.bonus > 0)) or (_root.minigame > 0)) {
playMusic("muz_1");
} else {
playMusic("muz");
}
}
}
}
};
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 2505 MovieClip Frame 41
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 2505 MovieClip Frame 51
but1.title = "CONTINUE";
but2.title = "New Game";
but3.title = "Back";
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) {
resetGame();
saveGame();
openScreen("stage");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
};
Symbol 2505 MovieClip Frame 61
_root.reloadLevels();
loadtxt._visible = true;
stars = 0;
i = 1;
while (i < 33) {
if (_root.sav[i][0] != -1) {
stars = stars + ((_root.sav[i][0] + _root.sav[i][1]) + _root.sav[i][2]);
}
i++;
}
setStat(7, stars);
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]);
i = 1;
while (i < 17) {
z = this["but" + i];
z.id = i;
z.info = ((2 + _root.sav[i][0]) + _root.sav[i][1]) + _root.sav[i][2];
z.title = i;
z.minigame = 0;
if (_root.maxlvl < i) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
i++;
}
i = 17;
while (i < 25) {
z = this["but" + i];
z.id = i;
z.info = ((2 + _root.sav[i][0]) + _root.sav[i][1]) + _root.sav[i][2];
z.title = i - 16;
z.need = (z.title * z.title) + 2;
z.minigame = 1;
if (stars < z.need) {
z.gotoAndStop(3);
} else {
z.gotoAndStop(1);
}
i++;
}
i = 25;
while (i < 33) {
z = this["but" + i];
z.id = i;
z.info = ((2 + _root.sav[i][0]) + _root.sav[i][1]) + _root.sav[i][2];
z.title = i - 24;
z.need = ((z.title + 1) * (z.title + 1)) + z.title;
z.minigame = 2;
if (stars < z.need) {
z.gotoAndStop(3);
} else {
z.gotoAndStop(1);
}
i++;
}
i = 33;
while (i < 41) {
z = this["but" + i];
z.id = i;
z.title = i - 32;
z.need = (z.title * 75) + ((25 * z.title) * z.title);
if (_root.money < z.need) {
z.gotoAndStop(4);
} else {
z.gotoAndStop(5);
}
i++;
}
i = 41;
while (i < 49) {
z = this["but" + i];
if (_root.surv_allow == true) {
z._visible = true;
z.id = i;
if (i == 41) {
z.title = 1;
} else {
z.title = (i - 41) * 5;
}
if (_root.surlvl < z.title) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(6);
}
} else {
z._visible = false;
}
i++;
}
if (_root.surv_allow == true) {
survtxt._visible = false;
} else {
survtxt._visible = true;
}
help1.title = "Defend the mushrooms from hungry animals";
help2.title = "Repel the invasion with unlimited ammo";
help3.title = "Don't let the animal get into the vault";
help4.title = "Try to unlock as many safes as possible. Paid game!";
help5.title = "Defend the glades as long as possible. High score table!";
xbut1.title = "Armored Shop";
xbut2.title = "Achievements";
xbut3.title = "Save & Quit";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("upgr");
}
}
};
xbut2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("achi");
}
}
};
xbut3.but.onPress = function () {
trace(_root.trans_delay);
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("main");
}
}
};
Symbol 2505 MovieClip Frame 71
switch (_root.minigame) {
case 0 :
title = ("LEVEL " + _root.lvl) + " QUEST";
break;
case 1 :
title = ("RUSH " + (_root.lvl - 16)) + " QUEST";
break;
case 2 :
title = ("DEFENCE " + (_root.lvl - 24)) + " QUEST";
}
awardcount = 0;
i = 0;
while (i < 3) {
z = this["but" + i];
z.type = _root["lvlachi" + _root.lvl][i][0];
z.info = _root["lvlachi" + _root.lvl][i][1];
z.title = _root["str_achi_" + z.type];
z.icon.gotoAndPlay(_root.sav[_root.lvl][i] + 1);
z.icon.gotoAndPlay((_root.sav[_root.lvl][i] * 12) + 1);
trace("==" + _root.sav[_root.lvl][i]);
z.have = 0;
z.id = i;
z.counter = true;
i++;
}
setStat(13, 1);
if (_root.sav[_root.lvl][0] == -1) {
_root.sav[_root.lvl][0] = 0;
}
x = 0;
i = 1;
while (i < 17) {
if (((_root.sav[i][0] + _root.sav[i][1]) + _root.sav[i][2]) >= 0) {
x++;
}
i++;
}
setStat(14, x);
x = 0;
i = 17;
while (i < 25) {
if (((_root.sav[i][0] + _root.sav[i][1]) + _root.sav[i][2]) >= 0) {
x++;
}
i++;
}
setStat(15, x);
x = 0;
i = 25;
while (i < 33) {
if (((_root.sav[i][0] + _root.sav[i][1]) + _root.sav[i][2]) >= 0) {
x++;
}
i++;
}
setStat(16, x);
if (_root.minigame == 0) {
if (_root.maxlvl < (_root.lvl + 1)) {
if (_root.isHome == true) {
_root.submitLevel(Math.min(16, _root.maxlvl));
}
_root.maxlvl = _root.lvl + 1;
}
}
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 = "Save & Quit";
xbut4.title = "More Games";
xbut5.title = "Share on Facebook";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (((but0.counter == false) and (but1.counter == false)) and (but2.counter == false)) {
_root.money = _root.money + _root.curr_money;
saveGame();
if (_root.lvl == 16) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
};
xbut2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (((but0.counter == false) and (but1.counter == false)) and (but2.counter == false)) {
_root.money = _root.money + _root.curr_money;
saveGame();
openScreen("game");
}
}
}
};
xbut3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (((but0.counter == false) and (but1.counter == false)) and (but2.counter == false)) {
_root.lvl = 0;
_root.money = _root.money + _root.curr_money;
saveGame();
openScreen("main");
}
}
}
};
xbut4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.openOtherGamesLink();
}
}
};
xbut5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.openShareLink();
}
}
};
Symbol 2505 MovieClip Frame 81
switch (_root.minigame) {
case 0 :
title = ("LEVEL " + _root.lvl) + " QUEST";
break;
case 1 :
title = ("RUSH " + (_root.lvl - 16)) + " QUEST";
break;
case 2 :
title = ("DEFENCE " + (_root.lvl - 24)) + " QUEST";
}
i = 0;
while (i < 3) {
z = this["but" + i];
z.type = _root["lvlachi" + _root.lvl][i][0];
z.info = _root["lvlachi" + _root.lvl][i][1];
z.title = _root["str_achi_" + z.type];
z.icon.gotoAndStop(_root.sav[_root.lvl][i] + 1);
z.back.gotoAndStop(_root.sav[_root.lvl][i] + 1);
i++;
}
xbut1.title = "CONTINUE";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
showLogo(0);
z = "exit";
if (_root.hint == true) {
i = 1;
while (i < 8) {
if (_root.lvl == _root.hintin[i]) {
z = "hint";
_root.hintnum = i;
break;
}
i++;
}
}
if (z == "exit") {
playMusic("muz");
_root.menubut._visible = true;
playVocal();
}
openMenu(z);
}
}
};
Symbol 2505 MovieClip Frame 91
sendobj.gotoAndStop(1);
sub_but._visible = true;
if (_root.surscore < _root.curr_money) {
_root.surscore = _root.curr_money;
beat_txt._visible = true;
} else {
beat_txt._visible = false;
}
kongsend("survival_score", _root.surscore);
if (_root.maxlvl > 16) {
but1._visible = true;
pass_txt._visible = false;
} else {
but1._visible = false;
pass_txt._visible = true;
}
if (_root.surlvl < _root.mini_diff) {
_root.surlvl = _root.mini_diff;
}
kongsend("survival_level", _root.surlvl);
record = _root.surscore;
playSound("gameover");
saveGame();
but1.title = "SUBMIT SCORE";
but2.title = "CONTINUE";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.submitScore(_root.curr_money);
_root.money = _root.money + _root.curr_money;
saveGame();
openScreen("upgr");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.money = _root.money + _root.curr_money;
saveGame();
openScreen("upgr");
}
}
};
Symbol 2505 MovieClip Frame 101
reHint(this);
but1.title = "CONTINUE";
if (_root.hint == true) {
but2.title = "Hints: ON";
} else {
but2.title = "Hints: OFF";
}
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (backmenu == "ready") {
playMusic("muz");
_root.menubut._visible = true;
playVocal();
openMenu("exit");
} else {
if (backmenu == "main") {
showLogo(1);
} else {
showLogo(5);
}
openMenu("back");
}
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.hint == true) {
_root.hint = false;
but2.title = "Hint: OFF";
} else {
_root.hint = true;
but2.title = "Hint: ON";
}
}
}
};
Symbol 2505 MovieClip Frame 111
but1.title = "TRY AGAIN";
but2.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) {
openScreen("stage");
}
}
};
Symbol 2505 MovieClip Frame 121
title = ("Play " + _root["str_but_mini" + _root.minigame]) + "?";
playSound("unlock");
but1.title = "CONTINUE";
but2.title = "Back";
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) {
_root.minigame = 0;
if (_root.lvl == 0) {
openScreen("main");
} else {
openScreen("upgr");
}
}
}
};
Symbol 2505 MovieClip Frame 131
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 2505 MovieClip Frame 141
if (_root.minigame == 3) {
survstat._visible = false;
title = "SAFE BREAKER";
if (_root.key == 1) {
desc = ("Try to unlock as many safes as possible.\nYou have " + _root.key) + " key.";
} else {
desc = ("Try to unlock as many safes as possible.\nYou have " + _root.key) + " keys.";
}
} else {
survstat._visible = true;
title = "SURVIVAL";
desc = "Defend the glades as long as possible. You may save your score in the high score table.";
}
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_1");
}
}
};
Symbol 2505 MovieClip Frame 151
but1.title = "Back";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("main");
}
}
};
Instance of Symbol 2470 MovieClip in Symbol 2505 MovieClip Frame 151
on (release) {
getURL ("http://www.silengames.com", "_blank");
}
Symbol 2505 MovieClip Frame 161
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) {
_root.openOtherGamesLink();
}
}
};
Symbol 2505 MovieClip Frame 171
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"];
if (z.cost > 0) {
bonusall = bonusall + z.cost;
}
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);
}
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 2509 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
openMenu("cred");
}
}
Symbol 2522 MovieClip Frame 1
stop();
Symbol 2523 MovieClip Frame 1
stop();
Symbol 2523 MovieClip Frame 15
stop();
switch (img._currentframe) {
case 1 :
openMenu("main");
break;
case 2 :
if (_root.minigame < 3) {
openMenu("ready");
} else {
openMenu("minirdy");
}
break;
case 3 :
openMenu("score");
playSound("win");
break;
case 4 :
openMenu("over");
playSound("gameover");
break;
case 6 :
openMenu("vict");
playSound("win");
}
Symbol 2554 MovieClip Frame 1
stop();
Symbol 2554 MovieClip Frame 8
_root.musicVol.setVolume(90);
Symbol 2554 MovieClip Frame 9
_root.musicVol.setVolume(80);
Symbol 2554 MovieClip Frame 10
_root.musicVol.setVolume(70);
Symbol 2554 MovieClip Frame 11
_root.musicVol.setVolume(60);
Symbol 2554 MovieClip Frame 12
_root.musicVol.setVolume(50);
Symbol 2554 MovieClip Frame 13
_root.musicVol.setVolume(40);
Symbol 2554 MovieClip Frame 14
_root.musicVol.setVolume(30);
Symbol 2554 MovieClip Frame 15
_root.musicVol.setVolume(20);
Symbol 2554 MovieClip Frame 16
_root.musicVol.setVolume(10);
Symbol 2554 MovieClip Frame 17
_root.musicVol.setVolume(0);
Symbol 2554 MovieClip Frame 18
clearLevel();
switch (tar) {
case "achi" :
_root.back.gotoAndStop(8);
_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(7);
openMenu("exit", true);
playMusic("muz_0");
_root.silenlogo._visible = true;
_root.lvl = 0;
_root.kinglogo._visible = true;
break;
case "vict" :
_root.back.gotoAndStop(8);
openMenu("exit", true);
playMusic("muz_0");
break;
case "game" :
loadLevel();
addStat(18, 1);
_root.back.gotoAndStop(_root.weather);
if (_root.minigame == 1) {
_root.back.img.lin._visible = true;
} else {
_root.back.img.lin._visible = false;
}
openMenu("exit", true);
playMusic("amb_day");
_root.silenlogo._visible = false;
_root.kinglogo._visible = true;
break;
case "upgr" :
_root.back.gotoAndStop(8);
_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(8);
_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 2554 MovieClip Frame 21
_root.musicVol.setVolume(0);
Symbol 2554 MovieClip Frame 22
_root.musicVol.setVolume(10);
Symbol 2554 MovieClip Frame 23
_root.musicVol.setVolume(20);
Symbol 2554 MovieClip Frame 24
_root.musicVol.setVolume(30);
Symbol 2554 MovieClip Frame 25
_root.musicVol.setVolume(40);
Symbol 2554 MovieClip Frame 26
_root.musicVol.setVolume(50);
Symbol 2554 MovieClip Frame 27
_root.musicVol.setVolume(60);
Symbol 2554 MovieClip Frame 28
_root.musicVol.setVolume(70);
Symbol 2554 MovieClip Frame 29
_root.musicVol.setVolume(80);
Symbol 2554 MovieClip Frame 30
_root.musicVol.setVolume(90);
Symbol 2554 MovieClip Frame 31
_root.musicVol.setVolume(100);
Symbol 2554 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 2558 MovieClip Frame 1
stop();
Symbol 2559 MovieClip Frame 1
stop();
Symbol 2559 MovieClip Frame 11
x = _x - 70;
y = _y - 20;
z = 11;
while (z--) {
createInterPart(x + (20 * z), y + random(40), "star2");
}
playSound("holy");
Symbol 2566 MovieClip Frame 1
stop();