Frame 1
function myMenu1() {
visitSite("spon");
}
function myMenu2() {
visitSite("walk");
}
function myMenu3() {
visitSite("add");
}
function myMenu4() {
visitSite("dev");
}
function myMenu5() {
visitSite("MM1");
}
function myMenu6() {
visitSite("MM2");
}
var tongdiem = 0;
Playtomic.Log.View(4863, "293fa53f631242b5", _root._url);
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == "kongregate.com") {
kongapi = true;
var kongregate = _global.kongregate;
kongregate.services.connect();
}
_global.kongsend = function (kng1, kng2) {
trace((kng1 + "=") + kng2);
if (kongapi == true) {
kongregate.stats.submit(kng1, kng2);
}
};
surv_allow = true;
levelpack = false;
lowprice = false;
unlockall = false;
_global.visitSite = function (lnk) {
switch (lnk) {
case "spon" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "PlayMoreGames", "Sponsor");
setStat(10, 1);
break;
case "walk" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "Walkthrough", "Sponsor");
break;
case "add" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "HostThisGame", "Sponsor");
setStat(10, 1);
break;
case "dev" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "DeveloperLogo", "Developer");
break;
case "MM1" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "Mushroom1", "Banners");
setStat(10, 1);
break;
case "MM2" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "Mushroom2", "Banners");
setStat(10, 1);
break;
case "PPC" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "PrizmaPuzzle", "Banners");
setStat(10, 1);
break;
case "GSB" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "Granny", "Banners");
setStat(10, 1);
break;
case "FC" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "FlyingCandy", "Banners");
setStat(10, 1);
break;
case "IG" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "IcyGifts", "Banners");
setStat(10, 1);
break;
case "TBW" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "TheBeeWay", "Banners");
setStat(10, 1);
break;
case "NP" :
Playtomic.Link.Open("http://www.game.24h.com.vn", "NinjaPainter", "Banners");
setStat(10, 1);
}
};
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(new ContextMenuItem("Play More Games", myMenu1));
myMenu.customItems.push(new ContextMenuItem("Video Walkthrough", myMenu2));
myMenu.customItems.push(new ContextMenuItem("Host This Game", myMenu3));
myMenu.customItems.push(new ContextMenuItem("Developer Site", myMenu4, true));
myMenu.customItems.push(new ContextMenuItem("Mushroom Madness 1", myMenu5, true));
myMenu.customItems.push(new ContextMenuItem("Mushroom Madness 2", myMenu6));
_root.menu = myMenu;
Frame 2
stop();
back.gotoAndStop(11);
percentDone = 0;
loadingbut.title = "B\u1EAFt \u0111\u1EA7u";
loadingbut._visible = false;
loadingbut.but.onRelease = function () {
Playtomic.Log.Play();
onEnterFrame = null;
gotoAndStop (3);
};
onEnterFrame = function () {
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
sizeTxt.text = ((loadedBytes + "kb/") + totalBytes) + "kb";
if (percentDone < Math.round((loadedBytes / totalBytes) * 100)) {
percentDone++;
percentTxt.text = percentDone + "%";
}
preloaderBar.img._xscale = 10 + (percentDone * 3);
if (percentDone >= 100) {
loadingbut._visible = true;
sizeTxt._visible = false;
percentTxt._visible = false;
loadingTxt._visible = false;
preloaderBar._visible = false;
}
};
Frame 3
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
__com_mochibot__("0e11e751", this, 10301, true);
Instance of Symbol 2461 MovieClip in Frame 3
on (release) {
getURL ("http://game.24h.com.vn/", "_blank");
}
Frame 4
stop();
Instance of Symbol 2471 MovieClip in Frame 4
on (release) {
visitSite("dev");
}
Frame 5
str_but_menu = "MENU";
str_menu_game = "Game Menu";
str_but_resume = "Ch\u01A1i ti\u1EBFp";
str_but_quit = "L\u01B0u v\u00E0 Tho\u00E1t";
str_but_restart = "Ch\u01A1i l\u1EA1i";
str_but_lvlsel = "Ch\u1ECDn c\u1EEDa";
str_menu_diff = "Ch\u1ECDn \u0111\u1ED9 kh\u00F3";
str_but_easy = "D\u1EC5";
str_but_normal = "Trung b\u00ECnh";
str_but_hard = "Kh\u00F3";
str_menu_cont = "L\u01B0u v\u00E0 ti\u1EBFp t\u1EE5c?";
str_but_cont = "Ti\u1EBFp t\u1EE5c";
str_but_new = "Game m\u1EDBi";
str_menu_stage = "Ch\u1ECDn c\u1EEDa";
str_but_unlim = "N\u00E2ng c\u1EA5p";
str_menu_mini = "T\u00E1c gi\u1EA3";
str_menu_score = "L\u01B0u \u0111i\u1EC3m";
str_menu_option = "T\u00F9y ch\u1ECDn";
str_but_sound_off = "Ti\u1EBFng: T\u1EAFt";
str_but_sound_on = "Ti\u1EBFng: B\u1EADt";
str_but_music_off = "Nh\u1EA1c: T\u1EAFt";
str_but_music_on = "Nh\u1EA1c: B\u1EADt";
str_but_effect_off = "VFX: T\u1EAFt";
str_but_effect_on = "VFX: B\u1EADt";
str_but_hint_off = "G\u1EE3i \u00FD: B\u1EADt";
str_but_hint_on = "G\u1EE3i \u00FD: T\u1EAFt";
str_but_back = "H\u1EE7y b\u1ECF";
str_menu_main = "Menu ch\u00EDnh";
str_but_start = "Ph\u01B0u l\u01B0u";
str_but_mini = "Game ph\u1EE5";
str_but_score = "\u0110i\u1EC3m";
str_but_help = "H\u01B0\u1EDBng d\u1EABn";
str_but_option = "T\u00F9y ch\u1ECDn";
str_but_credit = "CT\u00E1c gi\u1EA3";
str_but_more = "Game kh\u00E1c";
str_but_host = "Website game";
str_menu_upgr = "Menu n\u00E2ng c\u1EA5p";
str_menu_achi = "Th\u00E0nh t\u00EDch";
str_but_next = "C\u1EEDa ti\u1EBFp";
str_menu_comp = "Qua c\u1EEDa!";
str_menu_victory = "Xin ch\u00FAc m\u01B0ng! B\u1EA1n \u0111\u00E3 chi\u1EBFn th\u1EAFng!";
str_score_1 = "K\u1EBB th\u00F9";
str_score_2 = "Ti\u1EC1n xu";
str_score_3 = "C\u00E2y n\u1EA5m";
str_menu_over = "Thua cu\u1ED9c";
str_but_try = "Th\u1EED l\u1EA1i";
str_menu_hint = "H\u01B0\u1EDBng d\u1EABn";
str_menu_cong = "Ch\u00FAc m\u1EEBng!";
str_menu_bonus = "\u0110i\u1EC3m th\u01B0\u1EDFng";
str_menu_bonusd = "Th\u1EED t\u00ECm kim c\u01B0\u01A1ng trong nh\u1EEFng chi\u1EBFc h\u1ED9p.";
str_menu_unlock = "Game ph\u1EE5 kh\u00F4ng kh\u00F3a!";
str_menu_mini = "Game ph\u1EE5";
str_upgr_1 = "S\u1EE9c m\u1EA1nh v\u0169 kh\u00ED";
str_upgr_2 = "S\u1EE9c m\u1EA1nh thu\u1ED1c n\u1ED5";
str_upgr_3 = "N\u0103ng l\u01B0\u1EE3ng \u0111i\u1EC7n";
str_upgr_4 = "B\u1EABy \u0111i\u1EC7n";
str_upgr_5 = "T\u1ED1c \u0111\u1ED9 b\u1EAFn";
str_upgr_6 = "N\u0103ng l\u01B0\u1EE3ng \u0111\u1EA1n";
str_upgr_7 = "Th\u1EDDi gian cho\u00E1ng";
str_upgr_8 = "Nam ch\u00E2m";
str_upgr_9 = "Gi\u00E1 ti\u1EC1n";
str_upgr_101 = "Gi\u00E0y";
str_upgr_102 = "V\u1EE3t";
str_upgr_103 = "Ch\u1EA3o";
str_upgr_104 = "G\u1EADy \u0111\u00E1nh g\u00F4n";
str_upgr_105 = "G\u1EADy";
str_upgr_106 = "X\u1EBBng";
str_upgr_107 = "B\u00FAa g\u1ED7";
str_upgr_108 = "Ch\u00F9y";
str_upgr_109 = "G\u00E2y s\u1ED1c";
str_upgr_1010 = "B\u00FAa s\u1EAFt";
str_upgr_11 = "T\u1EF1 \u0111\u1ED9ng click";
str_upgr_12 = "T\u1EF1 \u0111\u1ED9ng h\u00FAt";
str_upgr_13 = "S\u00FAng ng\u1EABu nhi\u00EAn";
str_upgr_14 = "\u0110\u1EA1n v\u00F4 h\u1EA1n";
str_desc_1 = "T\u0103ng s\u1EE9c m\u1EA1nh s\u00FAng";
str_desc_2 = "T\u0103ng b\u00E1n k\u00EDnh n\u1ED5 c\u1EE7a bom v\u00E0 t\u00EAn l\u1EEDa";
str_desc_3 = "T\u0103ng ph\u1EA1m vi t\u1EA5n c\u00F4ng c\u1EE7a tia ch\u1EDBp v\u00E0 l\u1EF1c \u0111\u00E1nh";
str_desc_4 = "B\u1EABy v\u00E0 b\u1EABy \u0111i\u1EC7n \u0111\u1EC3 b\u1EAFt b\u1ECDn th\u00FA";
str_desc_5 = "T\u0103ng t\u1ED1c \u0111\u1ED9 b\u1EAFn";
str_desc_6 = "T\u0103ng uy l\u1EF1c \u0111\u1EA1n";
str_desc_7 = "T\u0103ng th\u1EDDi gian cho\u00E1ng trong m\u1ED9t l\u1EA7n t\u1EA5n c\u00F4ng";
str_desc_8 = "T\u0103ng ph\u1EA1m vi h\u1ED3i ph\u1EE5c";
str_desc_9 = "T\u0103ng gi\u00E1 tri ti\u1EC1n v\u00E0 kim c\u01B0\u01A1ng";
str_desc_10 = "Thay \u0111\u1ED5i v\u0169 kh\u00ED ch\u00EDnh";
str_desc_11 = "V\u0169 kh\u00ED nh\u1ECF t\u1EA5n c\u00F4ng t\u1EF1 \u0111\u1ED9ng!";
str_desc_12 = "H\u1ED3i ph\u1EE5c t\u1EF1 \u0111\u1ED9ng!";
str_desc_13 = "B\u1EAFt \u0111\u1EA7u v\u1EDBi m\u1ED9t v\u0169 kh\u00ED ng\u1EABu nhi\u00EAn \u1EDF m\u1ECDi c\u1EEDa!";
str_desc_14 = "\u0110\u1EA1n v\u00F4 h\u1EA1n. Kh\u00F4ng c\u00F3 trong ch\u1EBF \u0111\u1ED9 t\u1ED3n t\u1EA1i.";
str_achi_0 = "Con nh\u00EDm";
str_achi_1 = "Con chim";
str_achi_2 = "Con nh\u1EC7n";
str_achi_3 = "Con th\u1ECF";
str_achi_4 = "Con c\u00FA m\u00E8o";
str_achi_5 = "Chu\u1ED9t ch\u0169i";
str_achi_6 = "Ti\u1EC1n b\u1EA1c";
str_achi_7 = "Ti\u1EC1n v\u00E0ng";
str_achi_8 = "Kim c\u01B0\u01A1ng l\u1EDBn";
str_achi_9 = "Ph\u00E1 h\u1EE7y c\u00E2y";
str_achi_10 = "Gi\u1EDBi h\u1EA1n li\u00EAn ho\u00E0n";
str_achi_11 = "M\u01A1 h\u1ED9p caton";
str_achi_12 = "M\u1EDF th\u00F9ng";
str_achi_13 = "K\u00E9t b\u1EA1c";
str_achi_14 = "K\u00E9t v\u00E0ng";
str_achi_15 = "Ph\u00F3ng v\u0169 kh\u00ED h\u1EA1t nh\u00E2n";
str_achi_16 = "Con th\u00FA b\u1ECB m\u1EAFc k\u1EB9t";
str_achi_17 = "Khu r\u1EEBng";
str_achi_18 = "C\u00E2y n\u1EA5m";
str_achi_19 = "G\u00E0i bom/ b\u1EABy";
str_achi_20 = "Tr\u00E1i tim tr\u00E1i";
str_achi_21 = "Nh\u1EEFng con v\u1EADt";
str_achi_22 = "Con r\u1EAFn h\u1ED5 mang";
str_achi_23 = "Con d\u01A1i";
str_achi_24 = "Vua nh\u00EDm";
str_achi_25 = "Vi\u00EAn pha l\u00EA";
str_achi_26 = "K\u00E9t s\u1EAFt";
str_hint_11 = ["T\u1EA5n c\u00F4ng c\u01A1 b\u1EA3n", "S\u1EED d\u1EE5ng chu\u1ED9t tr\u00E1i \u0111\u1EC3 t\u1EA5n c\u00F4ng. Gi\u1EEF chu\u1ED9t tr\u00E1i \u0111\u1EC3 \u0111\u00F2n \u0111\u00E1nh m\u1EA1nh h\u01A1n."];
str_hint_12 = ["B\u1ECF v\u0169 kh\u00ED", "Nh\u1EA5n ph\u00EDm 'C\u00E1ch' ho\u1EB7c click v\u00E0o bi\u1EC3u t\u01B0\u1EE3ng b\u00EAn d\u01B0\u1EDBi m\u00E0n h\u00ECnh c\u1EE7a b\u1EA1n \u0111\u1EC3 lo\u1EA1i b\u1ECF v\u0169 kh\u00ED."];
str_hint_13 = ["Bom v\u00E0 b\u1EABy", "\u0110\u1EC3 s\u1EED d\u1EE5ng bom v\u00E0 b\u1EABy click v\u00E0o bi\u1EC3u t\u01B0\u1EE3ng b\u00EAn d\u01B0\u1EDBi m\u00E0n h\u00ECnh v\u00E0 \u0111\u1EB7t n\u00F3 \u1EDF v\u1ECB tr\u00ED mong mu\u1ED1n."];
str_hint_14 = ["Ph\u00EDm n\u00F3ng", "1,2,3,4,5,6 \u2013 ch\u1ECDn bom v\u00E0 m\u00ECn; ESC or P \u2013 T\u1EA1m d\u1EEBng ho\u1EB7c \u0111\u1EBFn menu; M \u2013 t\u1EAFt \u00E2m thanh v\u00E0 nh\u1EA1c"];
str_hint_21 = ["Nh\u1EEFng c\u00E2y n\u1EA5m", "B\u1EA3o v\u1EC7 nh\u1EEFng c\u00E2y n\u1EA5m trong r\u1EEBng kh\u1ECFi b\u1ECDn th\u00FA \u0111ang \u0111\u00F3i."];
str_hint_22 = ["Ti\u1EC1n xu", "Thu th\u1EADp t\u1EA5t c\u1EA3 ti\u1EC1n xu! B\u1EA1n c\u1EA7n ch\u00FAng \u0111\u1EC3 mua b\u00E1n. Xu b\u1EA1c l\u00E0 $10. Xu v\u00E0ng l\u00E0 $20. X\u1EED d\u1EE5ng chu\u1ED9t \u0111\u1EC3 nh\u1EB7t ti\u1EC1n xu."];
str_hint_23 = ["Kim c\u01B0\u01A1ng", "Kim c\u01B0\u01A1ng c\u00F3 gi\u00E1 tr\u1ECB h\u01A1n ti\u1EC1n xu r\u1EA5t nhi\u1EC1u. Kim c\u01B0\u01A1ng nh\u1ECF l\u00E0 $50. Kim c\u01B0\u01A1ng l\u1EDBn l\u00E0 $250."];
str_hint_24 = ["Tinh th\u1EC3", "Ph\u00E1 h\u1EE7y nh\u1EEFng tinh th\u1EC3 \u0111\u1EC3 nh\u1EB7t \u0111\u01B0\u1EE3c kim c\u01B0\u01A1ng nh\u1ECF."];
str_hint_25 = ["H\u1ED9p caton", "Ch\u00FAng c\u00F3 th\u1EC3 b\u1ECB ph\u00E1 h\u1EE7y b\u1EDFi b\u1EA5t k\u1EF3 v\u0169 kh\u00ED n\u00E0o. B\u00EAn trong ch\u00FAng c\u00F3 gi\u1EA5u s\u00FAng."];
str_hint_26 = ["H\u1ED9p g\u1ED7", "Ch\u00FAng ch\u1EC9 b\u1ECB ph\u00E1 h\u1EE7y khi cso s\u00FAng. B\u00EAn trong ch\u00FAng c\u00F3 ch\u01B0a bom ho\u1EB7c b\u1EABy."];
str_hint_27 = ["K\u00E9t s\u1EAFt", "K\u00E9t s\u1EAFt c\u1EA7n c\u00F3 1 ch\u00ECa kh\u00F3a \u0111\u1EC3 m\u1EDF. B\u00EAn trong ch\u00FAng ch\u1EE9a s\u00FAng, bom ho\u1EB7c b\u1EABy."];
str_hint_28 = ["K\u00E9t b\u1EA1c", "K\u00E9t b\u1EA1c c\u1EA7n c\u00F3 1 ch\u00ECa kh\u00F3a \u0111\u1EC3 m\u1EDF. B\u00EAn trong ch\u00FAng ch\u1EE9a ti\u1EC1n xu ho\u1EB7c kim c\u01B0\u01A1ng nh\u1ECF."];
str_hint_29 = ["K\u00E9t v\u00E0ng", "K\u00E9t v\u00E0ng c\u1EA7n t\u1EDBi 3 ch\u00ECa kh\u00F3a m\u1EDBi c\u00F3 th\u1EC3 m\u1EDF. B\u00EAn trong ch\u00FAng ch\u1EE9a r\u1EA5t nhi\u1EC1u b\u00ED m\u1EADt!"];
str_hint_31 = ["L\u0169 nh\u00EDm", "B\u1ECDn nh\u00EDm \u0103n c\u1EAFp n\u1EA5m v\u00E0 mang v\u1EC1 hang c\u1EE7a ch\u00FAng. Ch\u1EB7n ch\u00FAng l\u1EA1i tr\u01B0\u1EDBc khi ch\u00FAng \u0111i qu\u00E1 xa!"];
str_hint_32 = ["L\u0169 g\u1EA5u", "B\u1ECDn g\u1EA5u \u0103n r\u1EA5t nhi\u1EC1u. N\u1EBFu b\u1EA1n kh\u00F4ng nhanh ch\u00F3ng ng\u1EB7n ch\u1EB7n th\u00EC ch\u00FAng s\u1EBD \u0103n h\u1EBFt n\u1EA5m c\u1EE7a b\u1EA1n"];
str_hint_33 = ["L\u0169 chim", "B\u1ECDn chim l\u00E0 m\u1ED1i \u0111e d\u1ECDa l\u1EDBn b\u1EDFi v\u00EC ch\u00FAng bay r\u1EA5t nhanh. Nh\u01B0ng \u0111\u00F4i kh\u00ED ch\u00FAng l\u1EA1i mang theo nh\u1EEFng v\u0169 kh\u00ED h\u1EEFu \u00EDch."];
str_hint_34 = ["L\u0169 nh\u1EC7n", "B\u1ECDn nh\u1EC7n ch\u1EA1y r\u1EA5t nhanh. N\u1EBFu b\u1EA1n gi\u1EBFt m\u1ED9t con nh\u1EC7n. Tr\u1EDDi s\u1EBD b\u1EAFt \u0111\u1EA7u m\u01B0a v\u00E0 c\u00E2y n\u1EA5m con s\u1EBD \u0111\u01B0\u1EE3c m\u1ECDc l\u00EAn."];
str_hint_35 = ["L\u0169 th\u1ECF", "B\u1ECDn th\u1ECF th\u00EC kh\u00F4ng th\u00EDch \u0103n n\u1EA5m. Nh\u01B0ng ch\u00FAng lu\u00F4n \u0111\u00E0o n\u1EA5m l\u00EAn. H\u00E3y mau ch\u00F3ng tr\u1ED3ng l\u1EA1i n\u1EBFu kh\u00F4ng n\u1EA5m s\u1EBD ch\u1EBFt!"];
str_hint_36 = ["L\u0169 chim c\u00FA m\u00E8o", "B\u1ECDn c\u00FA m\u00E8o c\u0169ng r\u1EA5t th\u00EDch n\u1EA5m... B\u1EA1n kh\u00F4ng tin sao. V\u1EADy h\u00E3y t\u1EF1 ki\u1EC3m ch\u1EE9ng \u0111i."];
str_hint_37 = ["L\u0169 chu\u1ED9t ch\u0169i", "H\u00E3y c\u1EADn th\u1EADn, chu\u1ED9t ch\u0169i c\u00F3 th\u1EC3 \u0111\u00E0o hang kh\u1EAFp khu r\u1EEBng v\u00E0 l\u00E2y \u0111i nh\u1EEFng c\u00E2y n\u1EA5m d\u1EC5 d\u00E0ng."];
str_hint_38 = ["L\u0169 r\u1EAFn", "Khi m\u1ED9t con r\u1EAFn \u0103n n\u1EA5m, n\u00F3 s\u1EBD ch\u1EA1y r\u1EA5t nhanh. \u0110\u1EEBng h\u1ECFi t\u1EA1i sao, ch\u1EC9 c\u1EA7n nhanh ch\u00F3ng ng\u0103n n\u00F3 l\u1EA1i!"];
str_hint_39 = ["L\u0169 d\u01A1i", "B\u1ECDn d\u01A1i mang theo ch\u00ECa kh\u00F3a, bom v\u00E0 c\u00E1c lo\u1EA1i v\u0169 kh\u00ED. Tuy nhi\u00EAn ch\u00FAng c\u0169ng \u0111\u00E1nh c\u1EAFp n\u1EA5m!"];
str_hint_310 = ["L\u0169 t\u00EA t\u00EA", "T\u00EA t\u00EA c\u00F3 th\u1EC3 cu\u1ED9n ng\u01B0\u1EDDi th\u00E0nh m\u1ED9t qu\u1EA3 b\u00F3ng. V\u00E0 khi \u0111\u00F3 ch\u00FAng r\u1EA5t c\u1EE9ng v\u00E0 kh\u00F3 c\u00F3 th\u1EC3 t\u1EA5n c\u00F4ng \u0111\u01B0\u1EE3c!"];
str_hint_311 = ["Vua nh\u00EDm", "N\u00F3 c\u00F3 th\u1EC3 \u0103n c\u1EA5p t\u1EA5t c\u1EA3 n\u1EA5m m\u1ED9t l\u00FAc. V\u0169 kh\u00ED th\u01B0\u1EDDng kh\u00F3 c\u00F3 th\u1EC3 ti\u00EAu di\u1EC7t ch\u00FAng, h\u00E3y s\u1EF1 d\u1EE5ng bom v\u00E0 b\u1EABy!"];
str_hint_41 = ["S\u00FAng l\u1EE5c", "B\u1EAFn 1 qu\u1EA3 b\u00F3ng cao su v\u00E0o m\u1EE5c ti\u00EAu v\u00E0 n\u1EA3y l\u1EA1i sau kh\u00ED b\u1EAFn. Gi\u1EEF chu\u1ED9t \u0111\u1EC3 t\u1EF1 \u0111\u1ED9ng b\u1EAFn."];
str_hint_42 = ["S\u00FAng tr\u01B0\u1EDDng", "B\u1EAFn \u0111\u1EA1n b\u00ECnh th\u01B0\u1EDDng, T\u1ED1c \u0111\u1ED9 b\u1EAFn t\u01B0\u01A1ng \u0111\u1ED1i."];
str_hint_43 = ["S\u00FAng ng\u1EAFn", "B\u1EAFn nhi\u1EC1u vi\u00EAn \u0111\u1EA1n m\u1ED9t l\u00FAc. Th\u1EADt tuy\u1EC7t v\u1EDBi khi ch\u1ED1ng l\u1EA1i b\u1ECDn th\u00FA \u0111\u00F4ng \u0111\u00FAc."];
str_hint_44 = ["S\u00FAng m\u00E1y", "M\u1ED9t v\u0169 kh\u00ED nguy hi\u1EC3m. Gi\u1EEF chu\u1ED9t s\u1EBD t\u0103ng t\u1ED1c \u0111\u1ED9 b\u1EAFn."];
str_hint_45 = ["S\u00FAng \u0111i\u1EC7n", "B\u1EAFn m\u1ED9t l\u01B0\u1EDBi \u0111i\u1EC7n d\u1EABn qua nhi\u1EC1u con th\u00FA l\u00E0m t\u00EA li\u1EC7t ch\u00FAng."];
str_hint_46 = ["S\u00FAng rocket", "M\u1ED9t lo\u1EA1i v\u0169 kh\u00ED ch\u1EBFt ng\u01B0\u1EDDi. Ph\u00E1 h\u1EE7y m\u1ECDi th\u1EE9 tr\u00EAn \u0111\u1EEBng \u0111i c\u1EE7a n\u00F3. Tuy nhi\u00EAn \u0111\u1EA1n l\u1EA1i v\u00F4 c\u00F9ng khan hi\u1EBFm!"];
str_hint_47 = ["L\u01B0u \u0111\u1EA1n s\u00E1ng", "L\u00E0m b\u1ECDn th\u00FA b\u1ECB cho\u00E1ng. Ti\u00EAu di\u1EC7t nh\u1EC7n, chu\u1ED9t ch\u0169i, d\u01A1i."];
str_hint_48 = ["Bom", "G\u00E2y s\u00E1t th\u01B0\u01A1ng l\u1EDBn trong b\u00E1n k\u00EDnh n\u1ED5."];
str_hint_49 = ["Bom h\u1EA1t nh\u00E2n", "Kh\u00F4ng \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng v\u0169 kh\u00ED n\u00E0y trong b\u1EA5t c\u00FA tr\u01B0\u1EDDng h\u1EE3p n\u00E0o. H\u00E3y nh\u1EDB \u0111i\u1EC1u \u0111\u00F3."];
str_hint_410 = ["B\u1EABy", "\u0110\u1EB7t ch\u00FAng tr\u00EAn \u0111\u01B0\u1EDDng \u0111i c\u1EE7a b\u1ECDn th\u00FA. M\u1ED9t chi\u1EBFc b\u1EABy c\u00F3 th\u1EC3 b\u1EAFt \u0111\u01B0\u1EE3c nhi\u1EC1u con th\u00FA."];
str_hint_411 = ["M\u00ECn", "\u0110\u1EB7t m\u00ECn tr\u00EAn \u0111\u01B0\u1EDDng \u0111i. S\u1EBD ph\u00E1t n\u1ED5 khi b\u1ECDn th\u00FA d\u1EABm l\u00EAn n\u00F3."];
str_hint_412 = ["M\u00ECn \u0111i\u1EC7n", "Gi\u1EADt \u0111i\u1EC7n t\u1EA5t c\u1EA3 nh\u1EEFng con th\u00FA xung quan n\u00F3 trong v\u00E0i gi\u00E2y."];
gotoAndStop ("Functions");
Frame 15
modes = new Array();
modes[1] = ["\u0110u\u1ED5i b\u1ECDn th\u00FA", 1, 10, 5, 15, "\u0110u\u1ED5i b\u1ECDn th\u00FA v\u1EDBi s\u00FAng v\u00E0 \u0111\u1EA1n kh\u00F4ng gi\u1EDBi h\u1EA1n"];
modes[2] = ["Ph\u01B0u l\u01B0u", 0, 15, 0, 14, "B\u1EA3o v\u1EC7 nh\u1EEFng c\u00E2y n\u1EA5m kh\u1ECFi b\u1ECDn th\u00FA \u0111ang \u0111\u00F3i."];
modes[3] = ["Ph\u00F2ng th\u1EE7", 6, 15, 0, 0, "B\u1EA3o v\u1EC7 khu r\u1EEBng c\u00E0ng l\u00E2u c\u00E0ng t\u1ED1t!"];
modes[4] = ["Chuy\u1EBFn ph\u01B0u l\u01B0u m\u1EDBi", 0, 15, 30, 26, "B\u1EA3o v\u1EC7 nh\u1EEFng c\u00E2y n\u1EA5m kh\u1ECFi b\u1ECDn th\u00FA \u0111ang \u0111\u00F3i. R\u1EA5t nhi\u1EC1u \u0111i\u1EC1u th\u00FA v\u1ECB!"];
modes[5] = ["Hang chu\u1ED9t ch\u0169i", 4, 10, 15, 27, "Ch\u00FAng chui ra kh\u00F4ng ng\u1EEBng t\u1EEB c\u00E1c hang. B\u1EA1n ph\u1EA3i ph\u00E1 h\u1EE7y t\u1EA5t c\u1EA3 c\u00E1c c\u00E1i hang \u0111\u00F3."];
modes[6] = ["B\u1EA3o v\u1EC7 nh\u00E0 kho", 2, 10, 50, 16, "\u0110\u1EEBng \u0111\u1EC3 b\u1EA5t k\u1EF3 con th\u00FA n\u00E0o v\u00E0o \u0111\u01B0\u1EE3c trong kho."];
modes[7] = ["T\u1ED5ng c\u00F4ng k\u00EDch", 5, 10, 100, 17, "B\u1EA3o v\u1EC7 nh\u1EEFng c\u00E2y n\u1EA5m kh\u1ECFi l\u0169 \u0111\u1ED9ng v\u1EADt v\u1EE5ng v\u1EC1"];
modes[8] = ["\u0110\u1EADp h\u1ED9p", 3, 5, 10, 0, "H\u00E3y m\u1EDF th\u1EADt nhi\u1EC1u k\u00E9t c\u00E0ng t\u1ED1t. M\u1ED9t tr\u00F2 ch\u01A1i may r\u1EE7i..."];
modes[9] = ["B\u1EAFt d\u01A1i", 7, 5, 40, 0, "B\u1EAFt nh\u1EEFng con d\u01A1i \u0111ang tha kim c\u01B0\u01A1ng!"];
tgachi = new Array();
tgachi[0] = [1, 100, 1000, 5000];
tgachi[1] = [10, 100];
tgachi[2] = [10000, 100000];
tgachi[3] = [30, 100];
tgachi[4] = [50];
tgachi[5] = [10];
tgachi[6] = [15, 90];
tgachi[7] = [30, 100, 210];
tgachi[8] = [10, 40];
tgachi[9] = [10, 60];
tgachi[10] = [1];
tgachi[11] = [1];
tgachi[12] = [1];
tgachi[13] = [1];
tgachi[14] = [15];
tgachi[15] = [10];
tgachi[16] = [10];
tgachi[17] = [10];
tgachi[18] = [100];
tgachi[19] = [100];
tgachi[20] = [100];
tgachi[21] = [50];
tgachi[22] = [30];
tgachi[23] = [1000];
tgachi[24] = [30];
tgachi[25] = [30];
tgachi[26] = [15];
tgachi[27] = [10];
tgachi[28] = [50];
but00cost = 100;
but01cost = 1000;
but02cost = 5000;
but03cost = 10000;
but10cost = 500;
but11cost = 2000;
but20cost = 1000;
but21cost = 10000;
but30cost = 750;
but31cost = 3000;
but40cost = 1000;
but50cost = 10000;
but60cost = 1000;
but61cost = 5000;
but70cost = 2000;
but71cost = 10000;
but72cost = 20000;
but80cost = 5000;
but81cost = 20000;
but90cost = 500;
but91cost = 3000;
but100cost = 1000;
but110cost = 1000;
but120cost = 1000;
but130cost = 150;
but140cost = 10000;
but150cost = 10000;
but160cost = 10000;
but170cost = 10000;
but180cost = 9000;
but190cost = 1000;
but200cost = 5000;
but210cost = 1000;
but220cost = 3000;
but230cost = 1000;
but240cost = 3000;
but250cost = 1000;
but260cost = 10000;
but270cost = 10000;
but280cost = 2000;
but00title = "B\u01B0\u1EDBc \u0111\u1EA7u ti\u00EAn";
but00desc = "Ti\u00EAu di\u1EC7t \u0111\u01B0\u1EE3c con th\u00FA \u0111\u1EA7u ti\u00EAn.";
but01title = "Ng\u01B0\u1EDDi m\u1EDBi";
but01desc = ("Ti\u00EAu di\u1EC7t " + tgachi[0][1]) + " con th\u00FA";
but02title = "Th\u1EE3 s\u0103n";
but02desc = ("Ti\u00EAu di\u1EC7t " + tgachi[0][2]) + " con th\u00FA";
but03title = "Kh\u1EAFc tinh c\u1EE7a b\u1ECDn th\u00FA";
but03desc = ("Ti\u00EAu di\u1EC7t " + tgachi[0][3]) + " con th\u00FA";
but10title = "Ng\u01B0\u1EDDi tr\u1ED3ng n\u1EA5m";
but10desc = ("B\u1EA3o v\u1EC7 \u0111\u1EE7 " + tgachi[1][0]) + " c\u00E2y n\u1EA5m";
but11title = "Ng\u01B0\u1EDDi b\u1EA3o v\u1EC7 n\u1EA5m";
but11desc = ("B\u1EA3o v\u1EC7 \u0111\u1EE7 " + tgachi[1][1]) + " c\u00E2y n\u1EA5m";
but20title = "Ng\u01B0\u1EDDi gi\u00E0u c\u00F3";
but20desc = ("Ki\u1EBFm " + tgachi[2][0]) + "$";
but21title = "T\u00E0i phi\u1EC7t";
but21desc = ("Ki\u1EBFm " + tgachi[2][1]) + "$!";
but30title = "\u0110\u1EADp h\u1ED9p nghi\u00EAp d\u01B0";
but30desc = ("M\u1EDF " + tgachi[3][0]) + " h\u1ED9p";
but31title = "\u0110\u1EADp h\u1ED9p chuy\u00EAn nghi\u1EC7p";
but31desc = ("M\u1EDF " + tgachi[3][1]) + " h\u1ED9p";
but40title = "S\u1EF1 d\u1EE5ng s\u00FAng chuy\u00EAn nghi\u1EC7p";
but40desc = ("S\u1EED d\u1EE5ng " + tgachi[4][0]) + " s\u00FAng";
but50title = "Kh\u00E1ch h\u00E0ng VIP";
but50desc = "N\u00E2ng c\u1EA5p v\u0169 kh\u00ED ch\u00EDnh";
but60title = "Nh\u00E0 s\u00E1ng ch\u1EBF";
but60desc = ("N\u00E2ng c\u1EA5p " + tgachi[6][0]) + " l\u1EA7n";
but61title = "S\u00E1ng ch\u1EBF \u0111\u1EA1i t\u00E0i";
but61desc = "N\u00E2ng c\u1EA5p to\u00E0n b\u1ED9!";
but70title = "C\u1EF1u chi\u1EBFn binh";
but70desc = ("Ho\u00E0n th\u00E0nh " + tgachi[7][0]) + " nhi\u1EC7m v\u1EE5";
but71title = "Anh h\u00F9ng";
but71desc = ("Ho\u00E0n th\u00E0nh " + tgachi[7][1]) + " nhi\u1EC7m v\u1EE5";
but72title = "Si\u00EAu anh h\u00F9ng";
but72desc = "Ho\u00E0n th\u00E0nh to\u00E0n b\u1ED9 nhi\u1EC7u v\u1EE5!";
but80title = "Quy\u1EBFt t\u1EED";
but80desc = ("Qua \u0111\u01B0\u1EE3c c\u1EEDa " + tgachi[8][0]) + " trong ch\u1EBF \u0111\u1ED9 ph\u00F2ng th\u1EE7";
but81title = "B\u1EA5t t\u1EED";
but81desc = ("Qua \u0111\u01B0\u1EE3c c\u1EEDa " + tgachi[8][1]) + " trong ch\u1EBF \u0111\u1ED9 ph\u00F2ng th\u1EE7";
but90title = "Ng\u01B0\u1EDDi m\u1EDBi";
but90desc = "Ch\u01A1i trong 10 ph\u00FAt";
but91title = "Kinh nghi\u1EC7m";
but91desc = "Ch\u01A1i trong 1 gi\u1EDD";
but100title = "C\u1EA3m \u01A1n!";
but100desc = "Click n\u00FAt game kh\u00E1c";
but110title = "T\u00F4i l\u00E0 ng\u01B0\u1EDDi t\u00E0i gi\u1ECFi!";
but110desc = "\u0110\u1ECDc h\u01B0\u1EDBng d\u1EABn";
but120title = "Quay tr\u1EDF l\u1EA1i";
but120desc = "Ch\u1EA1y tr\u00F2 ch\u01A1i l\u1EA7n 2";
but130title = "L\u00EDnh l\u1EE5c qu\u00E2n";
but130desc = "Ho\u00E0n th\u00E0nh c\u1EA5p \u0111\u1ED9 \u0111\u1EA7u ti\u00EAn";
but140title = "Lu\u1EADt l\u1EC7 khu r\u1EEBng";
but140desc = "Ho\u00E0n th\u00E0nh chuy\u1EBFn ph\u01B0u l\u01B0u";
but150title = "Khu v\u1EF1c b\u1EA3o v\u1EC7";
but150desc = "Ho\u00E0n th\u00E0nh vi\u1EC7c \u0111u\u1ED5i b\u1ECDn th\u00FA \u0111\u00F3i";
but160title = "B\u1EA3o v\u1EC7 kho";
but160desc = "Ho\u00E0n th\u00E0nh ch\u1EBF \u0111\u1ED9 ph\u00F2ng th\u1EE7";
but170title = "T\u1ED5ng c\u00F4ng k\u00EDch";
but170desc = "Ho\u00E0n th\u00E0nh ch\u1EBF \u0111\u1ED9 t\u1ED5ng c\u00F4ng k\u00EDch";
but180title = "L\u1EA1i v\u00E0 l\u1EA1i";
but180desc = "B\u1EAFt \u0111\u1EA7u v\u1EDBi c\u1EEDa " + tgachi[18][0];
but190title = "Ti\u1EC1u phu";
but190desc = ("Ch\u1EB7t " + tgachi[19][0]) + " c\u00E2y";
but200title = "Ng\u01B0\u1EDDi \u0111\u1EB7t m\u00ECn";
but200desc = ("Ph\u00E1 h\u1EE7y " + tgachi[20][0]) + " tinh th\u1EC3";
but210title = "Ng\u01B0\u1EDDi \u0111\u1EB7t b\u1EABy";
but210desc = ("\u0110\u1EB7t " + tgachi[21][0]) + " m\u00ECn v\u00E0 b\u1EABy";
but220title = "Li\u00EAn ho\u00E0n";
but220desc = ("Th\u1EF1c hi\u1EC7n " + tgachi[22][0]) + " li\u00EAn ho\u00E0n";
but230title = "Ng\u01B0\u1EDDi \u0111i s\u0103n";
but230desc = ("\u0110\u00E1nh v\u00E0 b\u1EAFn trong th\u1EDDi gian" + tgachi[23][0]) + "s";
but240title = "H\u1EE7y di\u1EC7t";
but240desc = ("S\u1EED d\u1EE5ng " + tgachi[24][0]) + " bom h\u1EA1t nh\u00E2n";
but250title = "B\u1EAFt chu\u1ED9t";
but250desc = ("Ph\u00E1 h\u1EE7y " + tgachi[25][0]) + " hang chu\u1ED9t ch\u0169i";
but260title = "Lu\u1EADt l\u1EC7 cu\u1ED1i c\u00F9ng";
but260desc = "Ho\u00E0n th\u00E0nh ch\u1EBF \u0111\u1ED9 ph\u01B0u l\u01B0u m\u1EDBi";
but270title = "M\u1ED9t \u0111\u00F2n ch\u1EBFt 7";
but270desc = "Ho\u00E0n th\u00E0nh ch\u1EBF \u0111\u1ED9 ti\u00EAu di\u1EC7t b\u1ECDn th\u00FA";
but280title = "Ng\u01B0\u1EDDi gi\u1EEF kh\u00F3a";
but280desc = ("M\u1EDF " + tgachi[28][0]) + " h\u1ED9p";
selectMine = function (x) {
if (mines[x + 7] > 0) {
if (_root.curr_mine == x) {
_root["mine" + x].img.select._visible = false;
_root.curr_mine = 0;
_root.cursor.gotoAndStop(_root.pre_weap);
} else {
_root["mine" + x].img.select._visible = true;
_root["mine" + _root.curr_mine].img.select._visible = false;
if (_root.curr_mine == 0) {
_root.pre_weap = _root.cursor._currentframe;
_root.pre_ammo = _root.cursor.ammo;
}
_root.curr_mine = x;
_root.cursor.gotoAndStop(_root.curr_mine + 7);
}
_root.cursor._xscale = (_root.cursor._yscale = 140);
}
};
_global.saveGame = function () {
my_so.data.savedone = true;
my_so.data.surscore = surscore;
my_so.data.money = money;
my_so.data.sound = sound;
my_so.data.music = music;
my_so.data.hint = hint;
my_so.data.modeselect = modeselect;
i = 1;
while (i < 10) {
j = 1;
while (j <= modes[i][2]) {
my_so.data[("sav" + i) + j] = sav[i][j];
j++;
}
i++;
}
i = 1;
while (i < 15) {
my_so.data["upgr" + i] = upgr[i];
i++;
}
trace("SAVE STAT...");
i = 0;
while (i < tgachi.length) {
j = 0;
while (j < tgachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
i++;
}
trace("SAVE END...");
my_so.flush();
};
_global.loadGame = function () {
if (my_so.data.savedone == undefined) {
savedone = true;
sound = true;
music = true;
hint = true;
upgr = new Array();
gachi = new Array();
stat = new Array();
sav = new Array();
i = 1;
while (i < 10) {
sav[i] = new Array();
i++;
}
resetGame();
} else {
savedone = my_so.data.savedone;
surscore = my_so.data.surscore;
money = my_so.data.money;
tongtien = money;
trace\u0323\u0323\u0323\u0323\u0323\u0323\u0323\u0323("tong diem: " + tongtien);
sound = my_so.data.sound;
music = my_so.data.music;
hint = my_so.data.hint;
modeselect = my_so.data.modeselect;
upgr = new Array();
gachi = new Array();
stat = new Array();
sav = new Array();
i = 1;
while (i < 10) {
sav[i] = new Array();
j = 1;
while (j <= modes[i][2]) {
sav[i][j] = my_so.data[("sav" + i) + j];
j++;
}
i++;
}
i = 1;
while (i < 15) {
upgr[i] = my_so.data["upgr" + i];
i++;
}
handnum = upgr[10];
trace("LOAD STAT...");
i = 0;
while (i < tgachi.length) {
gachi[i] = new Array();
j = 0;
while (j < tgachi[i].length) {
if (my_so.data[("gachi" + i) + j] != undefined) {
gachi[i][j] = my_so.data[("gachi" + i) + j];
} else {
break;
}
j++;
}
stat[i] = my_so.data["stat" + i];
i++;
}
setStat(12, 1);
}
vipChange();
setUpgr();
};
_global.resetGame = function () {
surscore = 0;
money = 0;
tongtien = 0;
handnum = 1;
modeselect = 2;
i = 1;
while (i < 10) {
j = 1;
while (j <= modes[i][2]) {
if (j == 1) {
sav[i][j] = [-1, 0, 0];
} else {
sav[i][j] = [-2, 0, 0];
}
j++;
}
i++;
}
i = 1;
while (i < 15) {
upgr[i] = 1;
i++;
}
i = 0;
while (i < tgachi.length) {
stat[i] = 0;
gachi[i] = new Array();
j = 0;
while (j < tgachi[i].length) {
gachi[i][j] = tgachi[i][j];
j++;
}
i++;
}
vipChange();
};
_global.getStarDone = function (z) {
xx = 0;
if (z == 0) {
x = 1;
y = 9;
} else {
x = z;
y = z;
}
i = x;
while (i <= y) {
j = 1;
while (j <= modes[i][2]) {
if (_root.sav[i][j][0] > -1) {
xx = xx + ((_root.sav[i][j][0] + _root.sav[i][j][1]) + _root.sav[i][j][2]);
}
j++;
}
i++;
}
return(xx);
};
_global.getLevelDone = function (z) {
xx = 0;
if (z == 0) {
x = 1;
y = 9;
} else {
x = z;
y = z;
}
i = x;
while (i <= y) {
j = 1;
while (j <= modes[i][2]) {
if (_root.sav[i][j][0] > -1) {
xx++;
}
j++;
}
i++;
}
return(xx);
};
_global.setUpgr = function () {
shellShot = 6;
damGun = 1 + (0.15 * (upgr[1] - 1));
radRocket = 100 + (5 * (upgr[2] - 1));
radBomb = 140 + (7 * (upgr[2] - 1));
damTesla = 1 + (0.1 * (upgr[3] - 1));
hitTesla = 3 + Math.round(0.4 * (upgr[3] - 1));
radTesla = 140 + (7 * (upgr[3] - 1));
bonusKap = 4 + (1 * (upgr[4] - 1));
bonusTesla = 15 + (3 * (upgr[4] - 1));
bonusReload = 1 + (0.05 * (upgr[5] - 1));
clipPistol = 16 + (2 * (upgr[6] - 1));
clipGun = 26 + (3 * (upgr[6] - 1));
clipShot = 12 + (1 * (upgr[6] - 1));
clipTesla = 16 + (2 * (upgr[6] - 1));
clipGauss = 50 + (4 * (upgr[6] - 1));
clipRocket = 5 + Math.round(0.5 * (upgr[6] - 1));
stupor = 90 + (10 * (upgr[7] - 1));
bonusMagnet = 1 + (0.2 * (upgr[8] - 1));
bonusDeposit = 1 + (0.1 * (upgr[9] - 1));
handnum = upgr[10];
};
_global.addStat = function (type, amount) {
stat[type] = stat[type] + amount;
testGachi(type);
};
_global.setStat = function (type, amount) {
if (amount > stat[type]) {
stat[type] = amount;
}
testGachi(type);
};
_global.testGachi = function (type) {
j = 0;
while (j < gachi[type].length) {
if (gachi[type][j] != -1) {
if (stat[type] >= gachi[type][j]) {
gachi[type][j] = -1;
gachilogo.play();
gachilogo.title = _root[(("but" + type) + j) + "title"];
gachilogo.desc = _root[(("but" + type) + j) + "desc"];
gachilogo.cost = _root[(("but" + type) + j) + "cost"];
money = money + gachilogo.cost;
addStat(2, gachilogo.cost);
warachi.gotoAndPlay(2);
}
}
j++;
}
};
_global.mineHere = function (ob) {
if (colmap[ob.ytile][ob.xtile] == 4) {
jm = 0;
while (jm < bankMine.length) {
if ((bankMine[jm].xtile == ob.xtile) && (bankMine[jm].ytile == ob.ytile)) {
achi[16]++;
x1 = bankMine[jm]._x + 24;
y1 = bankMine[jm]._y + 16;
colmap[ob.ytile][ob.xtile] = 1;
bankMine[jm].removeMovieClip();
bankMine.splice(jm, 1);
playSound("explo");
quake = 6;
if (ob.cargo > 0) {
if (ob.cargonum > 0) {
ii = 1;
while (ii <= ob.cargonum) {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
ii++;
}
} else {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
}
}
dieEnemy(ob);
castExplo(x1, y1, radBomb);
break;
}
jm++;
}
}
};
_global.castTesla = function (xx, yy) {
pre_att = _root.cursor;
k = 0;
while (k < hitTesla) {
att_num = 0;
att_dist = radTesla;
jt = 0;
while (jt < bankEnemy.length) {
zz = bankEnemy[jt];
if (zz != pre_att) {
tx = bankEnemy[jt]._x;
ty = bankEnemy[jt]._y;
if (zz.type == 3) {
ty = ty + zz.bird._y;
} else if (((zz.type != 6) && (zz.type != 7)) && (zz.type != 9)) {
tx = tx + 24;
}
dist = point_distance(xx, yy, tx, ty);
if (dist > 10) {
if (dist < att_dist) {
att_num = jt;
att_dist = dist;
xxx = tx;
yyy = ty;
}
}
}
jt++;
}
if (att_dist < radTesla) {
obj = levelmap.attachMovie("teslahit", "part", levelmap.getNextHighestDepth());
obj._x = xx;
obj._y = yy;
obj._xscale = att_dist;
obj._rotation = point_direction(xx, yy, xxx, yyy);
pre_att = bankEnemy[att_num];
xx = xxx;
yy = yyy;
switch (pre_att.type) {
case 0 :
case 1 :
case 5 :
case 8 :
attackEnemy(pre_att, 10 * damTesla, 1);
break;
case 2 :
attackEnemy(pre_att, 5 * damTesla, 4);
break;
case 3 :
case 6 :
attackEnemy(pre_att, 15 * damTesla, 5);
break;
case 4 :
case 9 :
attackSpider(pre_att);
break;
case 7 :
attackEnemy(pre_att, 15 * damTesla, 7);
break;
case 10 :
attackEnemy(pre_att, 3 * damTesla, 9);
}
} else {
break;
}
k++;
}
};
_global.castStun = function () {
js = 0;
while (js < bankEnemy.length) {
switch (bankEnemy[js].type) {
case 0 :
case 1 :
case 5 :
attackEnemy(bankEnemy[js], 0, 1);
break;
case 2 :
attackEnemy(bankEnemy[js], 0, 4);
break;
case 3 :
case 6 :
attackEnemy(bankEnemy[js], 0, 5);
break;
case 4 :
case 9 :
attackSpider(bankEnemy[js]);
js--;
break;
case 7 :
attackEnemy(bankEnemy[js], 100, 0);
js--;
break;
case 8 :
if (bankEnemy[js].flying == false) {
attackEnemy(bankEnemy[js], 0, 1);
} else {
attackEnemy(bankEnemy[js], 500, 0);
js--;
}
break;
case 10 :
attackEnemy(bankEnemy[js], 0, 8);
}
js++;
}
flashobj.gotoAndPlay(2);
};
_global.castExplo = function (xx, yy, type) {
if (type < 150) {
num = 1;
} else {
num = 2;
}
i = 0;
while (i < bankTree.length) {
zz = bankTree[i];
if (point_distance(xx, yy, zz._x, zz._y) < type) {
attackTree(zz, 40, 1);
if (zz.img._currentframe < 5) {
if (effect == true) {
dam = 15;
while (dam--) {
createPart((zz._x - 75) + random(150), (zz._y - 30) - random(130), "list", levelmap.getNextHighestDepth(), 1, zz._currentframe);
}
}
}
}
i++;
}
i = 0;
while (i < bankChest.length) {
zz = bankChest[i];
if (point_distance(xx - 24, yy, zz._x, zz._y) < type) {
if (zz._currentframe < 4) {
attackChest(zz, 200);
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
zz = bankEnemy[i];
if (zz.type == 3) {
if (point_distance(xx, yy - zz.bird._y, zz._x, zz._y) < type) {
attackEnemy(zz, 100, 0);
}
} else if (zz.type == 6) {
if (point_distance(xx, yy, zz._x, zz._y) < type) {
attackEnemy(zz, 100, 0);
}
} else if (point_distance(xx - 24, yy, zz._x, zz._y) < type) {
switch (zz.type) {
case 0 :
case 1 :
case 5 :
case 7 :
case 8 :
attackEnemy(zz, 100, 1);
break;
case 2 :
attackEnemy(zz, 70, 4);
break;
case 4 :
case 9 :
attackSpider(zz);
break;
case 10 :
attackEnemy(zz, 50, 8);
}
}
i++;
}
createGroundPart(xx, yy, "crack");
createPart(xx, yy, "explo" + num, levelmap.getNextHighestDepth(), 1);
};
_global.castHitEnemy = function (zz) {
switch (zz.z.type) {
case 0 :
case 1 :
if (random(10) > 3) {
attackEnemy(zz.z, 20 * zz.damx, 2);
} else {
attackEnemy(zz.z, 20 * zz.damx, 1);
}
break;
case 5 :
case 8 :
if (random(10) > 3) {
attackEnemy(zz.z, 30 * zz.damx, 2);
} else {
attackEnemy(zz.z, 30 * zz.damx, 1);
}
break;
case 2 :
if (_root.cursor._currentframe == 4) {
attackEnemy(zz.z, 10 * zz.damx, 4);
} else {
attackEnemy(zz.z, 10 * zz.damx, 3);
}
break;
case 3 :
attackEnemy(zz.z, 30 * zz.damx, 6);
break;
case 4 :
case 9 :
attackSpider(zz.z);
break;
case 6 :
attackEnemy(zz.z, 20 * zz.damx, 6);
break;
case 7 :
attackEnemy(zz.z, 30 * zz.damx, 7);
break;
case 10 :
attackEnemy(zz.z, 5 * zz.damx, 9);
}
};
_global.castHitChest = function (zz) {
switch (zz.z._currentframe) {
case 2 :
attackChest(zz.z, 35 * zz.damx);
playSoundLim("box1d1", "box1d2");
break;
case 3 :
attackChest(zz.z, 25 * zz.damx);
playSoundLim("box2d1", "box2d2");
}
};
sound_delay = 0;
_global.playSoundLim = function () {
if (sound_delay == 0) {
if (sound == true) {
soundmap.gotoAndStop(arguments[random(arguments.length)]);
sound_delay = 2;
}
}
};
_global.playSound = function () {
if (sound == true) {
soundmap.gotoAndStop(arguments[random(arguments.length)]);
}
};
_global.playVocal = function () {
if (sound == true) {
do {
x = 1 + random(12);
} while (vocal_pre == x);
vocal_pre = x;
soundmap.gotoAndStop("vocal_" + x);
}
};
_global.playMusic = function (z) {
if (muzcur != z) {
musicmap.gotoAndStop("stop");
}
if (z != "stop") {
if (z != "pre") {
muzcur = z;
}
if (music == true) {
if (muzcur == "muz") {
muznum = (lvl % 4) + 1;
musicmap.gotoAndStop("muz_" + muznum);
} else {
musicmap.gotoAndStop(muzcur);
}
}
}
};
_global.hitPoint = function (x, y, ob) {
if (x > (ob._x + ob.w1)) {
if (x < (ob._x + ob.w2)) {
if (y > (ob._y + ob.h1)) {
if (y < (ob._y + ob.h2)) {
return(true);
}
}
}
}
};
_global.openScreen = function (ob, type) {
trans_delay = true;
trans.tar = ob;
if (type == true) {
trans.gotoAndPlay(17);
} else {
trans.gotoAndPlay(2);
}
if (_root.sound) {
menubut2.ib1.gotoAndStop(1);
} else {
menubut2.ib1.gotoAndStop(2);
}
if (_root.music) {
menubut2.ib2.gotoAndStop(1);
} else {
menubut2.ib2.gotoAndStop(2);
}
};
_global.openMenu = function (ob, type) {
reload = 4;
if (ob == "exit") {
_root.paused = false;
Mouse.hide();
_root.cursor._visible = true;
} else {
if (ob == "back") {
ob = gamemenu.backmenu;
}
_root.paused = true;
Mouse.show();
_root.cursor._visible = false;
_root.menubut._visible = false;
}
gamemenu.backmenu = gamemenu.tar;
gamemenu.tar = ob;
if (type == true) {
gamemenu.gotoAndStop(ob);
_root.paused = true;
Mouse.show();
_root.cursor._visible = false;
} else {
gamemenu.close = true;
gamemenu._xscale = (gamemenu._yscale = 120);
}
if (_root.sound) {
menubut2.ib1.gotoAndStop(1);
} else {
menubut2.ib1.gotoAndStop(2);
}
if (_root.music) {
menubut2.ib2.gotoAndStop(1);
} else {
menubut2.ib2.gotoAndStop(2);
}
};
_global.showLogo = function (ob) {
if (ob == 0) {
logo.gotoAndPlay(16);
} else {
paused = true;
logo.gotoAndPlay(2);
logo.img.gotoAndPlay(ob);
}
};
_global.huntKrot = function (ob) {
buftemp.length = 0;
i = 0;
while (i < bankFood.length) {
z = bankFood[i];
if (z.count > 0) {
j = 0;
while (j < 8) {
if (z.krot[j] == false) {
buftemp.push(z);
break;
}
j++;
}
}
i++;
}
if (buftemp.length == 0) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
} else {
z = buftemp[random(buftemp.length)];
ob.food = z;
do {
ob.place = random(8);
} while (z.krot[ob.place] == true);
ob._x = z._x + krotxy[ob.place][0];
ob._y = z._y + krotxy[ob.place][1];
ob.gotoAndStop(ob.place + 2);
}
};
_global.huntEnemy = function (ob) {
if (ob.cargo == false) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food != undefined) {
tarx = ob.food.xtile;
tary = ob.food.ytile;
} else {
do {
tarx = 1 + random(14);
tary = 1 + random(14);
} while (colmap[tarx][tary] == 0);
}
} else {
tarx = ob.xstart;
tary = ob.ystart;
}
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
};
_global.huntVor = function (ob) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food == undefined) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
} else {
ob._y = ob.food._y + 18;
}
};
_global.huntSova = function (ob) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food == undefined) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
} else {
ob._x = ob.food._x + 24;
}
};
_global.huntSpider = function (ob) {
if (ob.act < 2) {
do {
tarx = 2 + random(12);
tary = 2 + random(12);
} while (colmap[tarx][tary] == 0);
} else {
tarx = ob.xstart;
tary = ob.ystart;
}
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
};
_global.huntBat = function (ob) {
if (ob.step > 0) {
ob.flyx = 120 + random(580);
ob.flyy = 90 + random(400);
} else if ((ob.info > 0) || (minigame == 1)) {
ob.flyx = ob.xstart * tileW;
ob.flyy = ob.ystart * tileH;
ob.step--;
} else if (ob.cargo == false) {
z = bankFood.length;
i = 0;
while (i < z) {
if (bankFood[i].count > 0) {
if (ob.food == undefined) {
ob.food = bankFood[i];
} else if (Math.random() < (1.2 / z)) {
ob.food = bankFood[i];
}
}
i++;
}
if (ob.food != undefined) {
ob.flyx = ob.food._x + 24;
ob.flyy = ob.food._y;
} else {
ob.step++;
}
} else {
ob.flyx = ob.xstart * tileW;
ob.flyy = ob.ystart * tileH;
}
ob.dir = -1 * point_direction(ob._x, ob._y, ob.flyx, ob.flyy);
};
_global.huntKrolik = function (ob) {
if (ob.step > 0) {
do {
tarx = 2 + random(12);
tary = 2 + random(12);
} while (colmap[tarx][tary] == 0);
ob.path = findPath(colmap, ob.xtile, ob.ytile, tarx, tary);
} else {
huntEnemy(ob);
}
};
_global.moveSet = function (ob) {
targetx = ob.path[z][1];
targety = ob.path[z][0];
ob.path.length = z;
ob.dirx = 0;
ob.diry = 0;
imin = ob.imin._currentframe;
if (targetx > ob.xtile) {
ob.dirx = 4;
ob.gotoAndStop(2);
}
if (targetx < ob.xtile) {
ob.dirx = -4;
ob.gotoAndStop(6);
}
if (targety > ob.ytile) {
ob.diry = 3;
if (ob.dirx == 0) {
ob.gotoAndStop(8);
} else if (ob.dirx > 0) {
ob.gotoAndStop(9);
} else {
ob.gotoAndStop(7);
}
}
if (targety < ob.ytile) {
ob.diry = -3;
if (ob.dirx == 0) {
ob.gotoAndStop(4);
} else if (ob.dirx > 0) {
ob.gotoAndStop(3);
} else {
ob.gotoAndStop(5);
}
}
if (ob.armor == true) {
ob.gotoAndStop(ob._currentframe + 24);
}
if (ob.type == 100) {
ob.imin._yscale = 100;
}
ob.imin.gotoAndPlay(imin);
};
_global.moveEnemy = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) && (((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) && (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 2) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life--;
}
if (ob.cargo > 0) {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
}
dieEnemy(ob);
break;
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.cargo == false) {
if (ob.food.count > 0) {
ob.cargo = (ob.grib._visible = true);
ob.grib.gotoAndStop(ob.food.type);
ob.grib._xscale = (ob.grib._yscale = 10);
ob.grib.grib.gotoAndStop(1);
ob.food["grib" + ob.food.count]._visible = false;
ob.food.count--;
if (ob.armor == true) {
ob.armor = false;
ob.speed = 0.5;
}
if (ob.type == 8) {
ob.flying = true;
ob.act = 3;
ob.moving = -999;
ob.gotoAndStop("eat");
playSound("beareat");
} else {
huntEnemy(ob);
}
} else {
ob.food = undefined;
huntEnemy(ob);
}
} else {
if ((ob.xtile == ob.xstart) || (ob.ytile == ob.ystart)) {
dieFood(ob);
}
huntEnemy(ob);
}
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.moveBig = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) && (((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) && (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 6) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life = bankKap[j].life - 5;
}
if (ob.cargo > 0) {
if (ob.cargonum > 0) {
ii = 1;
while (ii <= ob.cargonum) {
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
ii++;
}
}
}
dieEnemy(ob);
break;
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.cargo == false) {
if (ob.food.count > 0) {
ob.cargo = true;
ob.cargonum = ob.food.count;
ii = 1;
while (ii <= ob.food.count) {
ob["grib" + ii]._visible = true;
ob["grib" + ii].gotoAndStop(ob.food.type);
ob["grib" + ii]._xscale = (ob["grib" + ii]._yscale = 10);
ob["grib" + ii].grib.gotoAndStop(1);
ii++;
}
ob.food.grib1._visible = false;
ob.food.grib2._visible = false;
ob.food.grib3._visible = false;
ob.food.grib4._visible = false;
ob.food.grib5._visible = false;
ob.food.count = 0;
huntEnemy(ob);
} else {
ob.food = undefined;
huntEnemy(ob);
}
} else {
if ((ob.xtile == ob.xstart) || (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) && (((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) && (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 4) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life = bankKap[j].life - 3;
}
dieEnemy(ob);
return(undefined);
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
ob.eating = 43;
ob.gotoAndStop(10);
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.moveSpider = function (ob) {
if ((((ob._x - tileW) % tileW) == 0) && (((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) && (((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) && (bankKap[j].ytile == ob.ytile)) {
achi[16]++;
bankKap[j].play();
playSound("trap1", "trap2");
if (bankKap[j].life < 2) {
colmap[ob.ytile][ob.xtile] = 1;
bankKap[j].removeMovieClip();
bankKap.splice(j, 1);
} else {
bankKap[j].life--;
}
dieEnemy(ob);
break;
}
}
j++;
}
}
if (z > -1) {
moveSet(ob);
} else {
if (minigame == 2) {
delEnemy(ob);
}
if (ob.step < 1) {
ob.moving = -30;
ob.gotoAndStop("att");
ob.img.play();
if (ob.food.count > 0) {
playSound("dig1", "dig2");
ob.food["grib" + ob.food.count]._visible = false;
ob.food.count--;
createPrize(ob._x + 24, ob._y + 18, 2 + ob.food.type, 1, ob.food);
}
ob.food = undefined;
ob.step = random(3);
} else {
ob.moving = -25 - random(25);
ob.step--;
ob.img.gotoAndStop(1);
}
huntKrolik(ob);
return(undefined);
}
}
ob._x = ob._x + (ob.speed * ob.dirx);
ob._y = ob._y + (ob.speed * ob.diry);
};
_global.diePrize = function (ob) {
i = 0;
while (i < bankPrize.length) {
if (bankPrize[i] == ob) {
bankPrize.splice(i, 1);
break;
}
i++;
}
ob.removeMovieClip();
};
_global.dieFood = function (ob) {
if (ob.cargonum == undefined) {
achi[18]--;
} else {
achi[18] = achi[18] - ob.cargonum;
}
if (ob.food.count == 0) {
die = 0;
i = 0;
while (i < bankEnemy.length) {
if (bankEnemy[i] != ob) {
if (bankEnemy[i].cargo == true) {
if (bankEnemy[i].food == ob.food) {
die = 1;
break;
}
}
}
i++;
}
if (die == 0) {
i = 0;
while (i < bankPrize.length) {
if (bankPrize[i].info == ob.info) {
if (bankPrize[i] != ob) {
die = 1;
break;
}
}
i++;
}
}
if (die == 0) {
ob.food.kill = true;
createScore(ob.food._x, ob.food._y, 3);
playSound("vocal_13");
i = 0;
while (i < bankFood.length) {
if (bankFood[i] == ob.food) {
achi[17]--;
bankFood.splice(i, 1);
break;
}
i++;
}
if (bankFood.length == 0) {
playMusic("stop");
if (minigame != 6) {
showLogo(4);
} else {
openMenu("send");
}
}
}
} else {
createScore(ob.food._x, ob.food._y, 2);
}
if (ob.isEnemy == true) {
if (ob.type != 2) {
if (ob.lair != undefined) {
ob.lair.count--;
}
i = 0;
while (i < bankEnemy.length) {
if (bankEnemy[i] == ob) {
bankEnemy.splice(i, 1);
break;
}
i++;
}
ob.removeMovieClip();
}
}
};
_global.dieBird = function (ob) {
i = 0;
while (i < bankEnemy.length) {
if (bankEnemy[i] == ob) {
bankEnemy.splice(i, 1);
break;
}
i++;
}
ob.removeMovieClip();
};
_global.delEnemy = function (ob) {
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
if ((minigame == 1) || ((minigame == 2) && (ob.type != 9))) {
life--;
achi[20]--;
quake = 3;
if (minigame == 2) {
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
if (lostlifesnd == false) {
playSound("vocal_13");
lostlifesnd = true;
}
} else {
playSound("vocal_13");
}
}
ob.removeMovieClip();
};
_global.dieEnemy = function (ob) {
i--;
combo++;
if (ob.lair != undefined) {
ob.lair.count--;
}
addStat(0, 1);
j = 0;
while (j < bankEnemy.length) {
if (bankEnemy[j] == ob) {
bankEnemy.splice(j, 1);
break;
}
j++;
}
switch (ob.type) {
case 0 :
playSound("snkdie1", "snkdie2");
achi[21]++;
createPrize(ob._x + 24, ob._y + 18, 9, 1);
createPart(ob._x + 24, ob._y + 10, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 18, "hulk6", levelmap.getNextHighestDepth(), 6);
}
ob.removeMovieClip();
break;
case 1 :
playSound("heddie1", "heddie2");
achi[0]++;
createPrize(ob._x + 24, ob._y + 18, 2, 1);
createPart(ob._x + 24, ob._y + 10, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 18, "hulk3", levelmap.getNextHighestDepth(), 6);
}
ob.removeMovieClip();
break;
case 2 :
playSound("beard1", "beard2");
ob.moving = -500;
ob.eating = 0;
ob.gotoAndPlay(13);
createPrize(ob._x + 24, ob._y + 18, 2, 2);
break;
case 4 :
playSound("spiddie");
achi[2]++;
ob.moving = -500;
ob.gotoAndPlay(10);
createPart(ob._x + 24, ob._y, "damage1", levelmap.getNextHighestDepth(), 1);
if ((minigame == 1) || (minigame == 2)) {
createPrize(ob._x + 24, ob._y + 18, 1, 1);
}
break;
case 3 :
playSound("bird1", "bird2");
achi[1]++;
createPrize(ob._x, ob._y + ob.bird._y, 2, 1, 0);
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
if (ob.info > 0) {
if (ob.info < 7) {
createWeap(ob._x, ob._y + ob.bird._y, 1 + ob.info, 0);
} else {
createPrize(ob._x, ob._y + ob.bird._y, ob.info, 1, 0);
}
}
if (effect == true) {
createPart(ob._x, ob._y + ob.bird._y, "pero", levelmap.getNextHighestDepth(), 8);
}
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 6 :
playSound("owl1", "owl2");
achi[4]++;
createPrize(ob._x, ob._y + ob.bird._y, 2, 1, 0);
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
if (ob.info > 0) {
createPrize(ob._x, ob._y + ob.bird._y, 2 + ob.info, 1, 0);
}
if (effect == true) {
createPart(ob._x, ob._y + ob.bird._y, "pero2", levelmap.getNextHighestDepth(), 8);
}
createPart(ob._x, ob._y + ob.bird._y, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 5 :
playSound("krold1", "krold2");
achi[3]++;
createPrize(ob._x + 24, ob._y + 18, 1, 1);
createPart(ob._x + 24, ob._y + 10, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 7 :
ob.food.krot[ob.place] = false;
playSound("heddie1", "heddie2");
achi[5]++;
createPrize(ob._x, ob._y, 2, 2);
createPart(ob._x, ob._y, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 8 :
playSound("snkdie1", "snkdie2");
achi[22]++;
createPrize(ob._x + 24, ob._y + 18, 2, 1);
createPart(ob._x + 24, ob._y + 14, "boom", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 9 :
playSound("batdie1", "batdie2");
achi[23]++;
if ((minigame != 2) && (minigame != 7)) {
createPrize(ob._x, ob._y, 2, 1, 0);
}
if (ob.info > 0) {
createPrize(ob._x, ob._y, ob.info + 6, 1, 0);
}
createPart(ob._x, ob._y, "batdie", levelmap.getNextHighestDepth(), 1);
createPart(ob._x, ob._y, "damage1", levelmap.getNextHighestDepth(), 1);
ob.removeMovieClip();
break;
case 10 :
playSound("hegbigdie");
achi[24]++;
createPrize(ob._x + 24, ob._y + 18, 8, 1);
createPart(ob._x + 4, ob._y, "boom", levelmap.getNextHighestDepth(), 1);
createPart(ob._x + 54, ob._y, "boom", levelmap.getNextHighestDepth(), 1);
createPart(ob._x + 24, ob._y + 20, "boom", levelmap.getNextHighestDepth(), 1);
createPart(ob._x + 24, ob._y - 20, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 18, "hulk5", levelmap.getNextHighestDepth(), 12);
}
ob.removeMovieClip();
}
};
_global.dieChest = function (ob) {
i--;
j = 0;
while (j < bankChest.length) {
if (bankChest[j] == ob) {
bankChest.splice(j, 1);
break;
}
j++;
}
switch (ob._currentframe) {
case 2 :
addStat(3, 1);
achi[11]++;
playSound("box1");
createPrize(ob._x + 24, ob._y + 10, 1, 3);
createPrize(ob._x + 24, ob._y + 10, 2, 2);
createWeap(ob._x + 24, ob._y + 10, 0);
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 10, "hulk1", levelmap.getNextHighestDepth(), 8);
}
break;
case 3 :
addStat(3, 1);
achi[12]++;
playSound("box2");
createPrize(ob._x + 24, ob._y + 10, 1, 2);
createPrize(ob._x + 24, ob._y + 10, 2, 4);
createMineWeap(ob._x + 24, ob._y + 10, 0);
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
if (effect == true) {
createPart(ob._x + 24, ob._y + 10, "hulk2", levelmap.getNextHighestDepth(), 8);
}
break;
case 4 :
addStat(28, 1);
achi[13]++;
if (minigame != 3) {
createPrize(ob._x + 24, ob._y + 10, 1, 8);
createPrize(ob._x + 24, ob._y + 10, 9, 4);
} else {
switch (ob.info) {
case 0 :
createPrize(ob._x + 24, ob._y + 10, 7, 3);
break;
case 1 :
createEnemy(ob.xtile, ob.ytile, 4);
break;
case 2 :
createPrize(ob._x + 24, ob._y + 10, 1, 10);
break;
case 3 :
createPrize(ob._x + 24, ob._y + 10, 2, 10);
}
}
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
break;
case 5 :
addStat(28, 1);
achi[26]++;
createMineWeap(ob._x + 24, ob._y + 10, 0);
createMineWeap(ob._x + 24, ob._y + 10, 0);
createMineWeap(ob._x + 24, ob._y + 10, 0);
createWeap(ob._x + 24, ob._y + 10, 0);
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
break;
case 6 :
addStat(28, 1);
achi[14]++;
if (minigame != 3) {
createPrize(ob._x + 24, ob._y + 10, 2, 8);
createPrize(ob._x + 24, ob._y + 10, 9, 5);
createPrize(ob._x + 24, ob._y + 10, 8, 3);
} else {
switch (ob.info) {
case 0 :
case 1 :
createPrize(ob._x + 24, ob._y + 10, 9, 10);
break;
case 2 :
case 3 :
createPrize(ob._x + 24, ob._y + 10, 8, 6);
}
}
createPart(ob._x + 24, ob._y + 18, "boom", levelmap.getNextHighestDepth(), 1);
}
colmap[ob.ytile][ob.xtile] = 1;
ob.removeMovieClip();
};
_global.objCount = 0;
_global.createEnemy = function (x, y, type, info, lair) {
objCount++;
obj = levelmap.attachMovie("enemy" + type, "enemy" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = x * tileW;
obj._y = y * tileH;
obj.type = type;
obj.info = info;
obj.lair = lair;
lair = undefined;
obj.id = objCount;
obj.isEnemy = true;
bankEnemy.push(obj);
};
_global.createLair = function (x, y, type, info) {
objCount++;
obj = levelmap.attachMovie("lairobj", "lair" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
obj.xtile = x;
obj.ytile = y;
if (type > 1) {
if (random(10) < 5) {
obj._xscale = -100;
}
}
obj.cry = 2;
obj.info = info;
obj.gotoAndStop(type);
obj.img.gotoAndStop(1);
bankTree.push(obj);
bankLair++;
};
_global.createChest = function (x, y, type, info) {
objCount++;
obj = levelmap.attachMovie("chest", "chest" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
obj.info = info;
obj.gotoAndStop(type);
bankChest.push(obj);
};
_global.createWall = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("wall", "wall" + objCount, ((y * tileH) * 10000) + objCount);
obj._x = x * tileW;
obj._y = y * tileH;
obj.gotoAndStop(type);
bankWall.push(obj);
};
_global.createLake = function (x, y) {
objCount++;
obj = back.img.attachMovie("lakeobj", "lake" + objCount, objCount);
obj._x = (x * tileW) - 390;
obj._y = (y * tileH) - 282;
bankFlow.push(obj);
};
_global.createTree = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("tree", "tree" + objCount, (((y * tileH) + 1) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
if (weather < 6) {
obj.gotoAndStop(weather + random(6));
} else {
obj.gotoAndStop(weather + 5);
}
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
obj.cry = 0;
obj.normtree = true;
bankTree.push(obj);
createShad(x, y);
obj.info = z;
};
_global.createBush = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("bushobj", "bush" + objCount, (((y * tileH) + 1) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
if (weather < 6) {
obj.gotoAndStop(weather + random(6));
} else {
obj.gotoAndStop(weather + 5);
}
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
obj.cry = 0;
bankTree.push(obj);
createShad(x, y);
obj.info = z;
};
_global.createCrystal = function (x, y, type) {
objCount++;
obj = levelmap.attachMovie("crystal", "crystal" + objCount, (((y * tileH) + 1) * 10000) + objCount);
obj._x = (x * tileW) + 24;
obj._y = (y * tileH) + 18;
obj.gotoAndStop(random(4) + 1);
obj.img.gotoAndStop(type);
if (random(10) < 5) {
obj._xscale = -100;
}
obj.cry = 1;
bankTree.push(obj);
obj.info = z;
};
_global.prizeCount = 0;
_global.createPrize = function (x, y, type, count, info) {
jj = 1;
while (jj <= count) {
prizeCount++;
obj = levelmap.attachMovie("prize", "prize" + prizeCount, 10000000 + prizeCount);
obj._x = x;
obj._y = y;
obj.type = type;
obj.gotoAndStop(type);
obj.info = info;
bankPrize.push(obj);
jj++;
}
};
_global.createMineWeap = function (x, y, type, info) {
prizeCount++;
obj = levelmap.attachMovie("prize", "prize" + prizeCount, 10000000 + prizeCount);
obj._x = x;
obj._y = y;
if (type == 0) {
do {
type = 8 + random(6);
} while ((lvl < weapin[type]) & (lvlmode == 2));
}
obj.gotoAndStop(type + 2);
obj.info = info;
bankPrize.push(obj);
};
_global.createWeap = function (x, y, type, info) {
prizeCount++;
obj = levelmap.attachMovie("weap", "weap" + prizeCount, 10000000 + prizeCount);
obj._x = x;
obj._y = y;
if (type == 0) {
do {
type = 2 + random(6);
} while ((lvl < weapin[type]) & (lvlmode == 2));
}
obj.gotoAndStop(type);
obj.info = info;
bankWeap.push(obj);
};
_global.createFlow = function (x, y) {
objCount++;
obj = back.img.attachMovie("flow", "flow" + objCount, objCount);
obj._x = ((x * tileW) + random(28)) - 404;
obj._y = ((y * tileH) + random(16)) - 290;
obj.gotoAndStop(1 + random(5));
bankFlow.push(obj);
};
_global.createRoad = function (x, y, type) {
objCount++;
obj = back.img.attachMovie("road", "road" + objCount, objCount);
obj._x = (x * tileW) - 390;
obj._y = (y * tileH) - 272;
obj.gotoAndStop(type);
bankFlow.push(obj);
};
_global.createShad = function (x, y) {
objCount++;
z = back.img.attachMovie("tree_s", "tree_s" + objCount, objCount);
z._x = (x * tileW) - 390;
z._y = (y * tileH) - 282;
if (random(10) < 5) {
z._xscale = -100;
}
bankFlow.push(z);
};
_global.createFood = function (x, y, count) {
objCount++;
obj = levelmap.attachMovie("food", "food" + objCount, objCount);
colmap[y][x] = 2;
obj._x = x * tileW;
obj._y = y * tileH;
obj.type = 1 + random(4);
obj.count = count;
bankFood.push(obj);
};
_global.createKap = function (x, y) {
objCount++;
obj = levelmap.attachMovie("kap", "kap" + objCount, objCount);
colmap[y][x] = 3;
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
obj.life = bonusKap;
bankKap.push(obj);
};
_global.createMine = function (x, y) {
objCount++;
obj = levelmap.attachMovie("mineobj", "mineobj" + objCount, objCount);
colmap[y][x] = 4;
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
bankMine.push(obj);
};
_global.createTesla = function (x, y) {
objCount++;
obj = levelmap.attachMovie("teslaobj", "teslaobj" + objCount, objCount);
colmap[y][x] = 4;
obj._x = x * tileW;
obj._y = y * tileH;
obj.xtile = x;
obj.ytile = y;
bankTesla.push(obj);
};
_global.createPart = function (x, y, type, depth, count, info) {
j = 1;
while (j <= count) {
obj = levelmap.attachMovie(type, "part", depth + j);
obj._x = x;
obj._y = y;
if ((type == "list") || (type == "bushflow")) {
obj.gotoAndStop(info);
}
j++;
}
};
_global.createGroundPart = function (x, y, type) {
obj = partmap.attachMovie(type, "part", partmap.getNextHighestDepth());
obj._x = x;
obj._y = y;
};
_global.createInterPart = function (x, y, type) {
obj = _root.attachMovie(type, "part", _root.getNextHighestDepth());
obj._x = x;
obj._y = y;
};
_global.createScore = function (x, y, type) {
obj = levelmap.attachMovie("scoreobj", "score", levelmap.getNextHighestDepth());
obj._x = x + 24;
obj._y = y + 18;
obj.gotoAndStop(type);
};
_global.showMines = function (type) {
j = 1;
while (j < 7) {
z = _root["mine" + j];
if (_root.mines[7 + j] > 0) {
z.title = "x" + _root.mines[7 + j];
z._alpha = 100;
z.but._visible = true;
} else {
z.title = "x0";
z._alpha = 30;
z.but._visible = false;
}
z.gotoAndStop(1);
z.img.gotoAndStop(j);
if (type == true) {
z._visible = true;
} else {
z._visible = false;
}
j++;
}
};
_global.addMine = function (type) {
achi[19]++;
mines[type]++;
z = _root["mine" + (type - 7)];
z.title = "x" + mines[type];
z._alpha = 100;
z.but._visible = true;
};
_global.useMine = function () {
achi[19]--;
curr_mine = 0;
mines[cursor._currentframe]--;
z = _root["mine" + (cursor._currentframe - 7)];
z.title = "x" + mines[cursor._currentframe];
z.img.select._visible = false;
if (_root.mines[cursor._currentframe] == 0) {
z.gotoAndStop(1);
z._alpha = 30;
z.but._visible = false;
}
cursor.gotoAndStop(pre_weap);
cursor.ammopip.gotoAndStop(3);
cursor.ammo = pre_ammo;
reload = 3;
};
_global.clearLevel = function () {
curr_money = 0;
power = 0;
magnit = (win = false);
alarmEnemy = 0;
key = 0;
pre_weap = 1;
pre_ammo = 0;
cursor.gotoAndStop(1);
logo.gotoAndStop(1);
ammopip.gotoAndStop(1);
butdrop._visible = false;
inter._visible = false;
menubut._visible = false;
prog._visible = false;
inter_level._visible = false;
inter_lvlmode._visible = false;
prog.img._xscale = 0;
mini_inter._visible = false;
back.img.lin._visible = false;
colmap = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
showMines(false);
curr_mine = 0;
j = 1;
while (j < 7) {
z = _root["mine" + j].img.select;
z._visible = false;
j++;
}
j = 8;
while (j < 14) {
_root.mines[j] = 0;
j++;
}
j = 0;
while (j < 27) {
achi[j] = 0;
j++;
}
j = 0;
while (j < bankEnemy.length) {
bankEnemy[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankChest.length) {
bankChest[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankWall.length) {
bankWall[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankTree.length) {
bankTree[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankPrize.length) {
bankPrize[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankWeap.length) {
bankWeap[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankFlow.length) {
bankFlow[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankFood.length) {
bankFood[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankKap.length) {
bankKap[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankMine.length) {
bankMine[j].removeMovieClip();
j++;
}
j = 0;
while (j < bankTesla.length) {
bankTesla[j].removeMovieClip();
j++;
}
objCount = 0;
wallCount = 0;
prizeCount = 0;
bankEnemy.length = 0;
bankPrize.length = 0;
bankWeap.length = 0;
bankWall.length = 0;
bankTree.length = 0;
bankFood.length = 0;
bankKap.length = 0;
bankMine.length = 0;
bankChest.length = 0;
bankFlow.length = 0;
wavexy.length = 0;
while (levelmap.prize != undefined) {
levelmap.prize.removeMovieClip();
}
while (levelmap.part != undefined) {
levelmap.part.removeMovieClip();
}
};
_global.lengthdir_x = function (len, dir) {
return(Math.cos((dir * 3.141593) / 180) * len);
};
_global.lengthdir_y = function (len, dir) {
return((-Math.sin((dir * 3.141593) / 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) / 3.141593) * 180);
};
_global.choose = function () {
return(arguments[random(arguments.length)]);
};
_global.findPath = function (map, startX, startY, endX, endY) {
var _local13 = 10;
var _local12 = 14;
var _local15 = true;
var _local16 = 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 _local3;
var _local2;
var _local1 = openList.length;
while ((_local1--) > 0) {
_local2 = mapStatus[openList[_local1][0]][openList[_local1][1]];
_local3 = _local2.heuristic + _local2.movementCost;
if (_local3 <= _local4) {
_local4 = _local3;
_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 _local11 = map.length;
var _local14 = map[0].length;
var mapStatus = new Array();
var _local7 = 0;
while (_local7 < _local11) {
mapStatus[_local7] = new Array();
_local7++;
}
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))) {
_local7 = nearerSquare();
var _local3 = openList[_local7][0];
var _local8 = openList[_local7][1];
closeSquare(_local3, _local8);
var _local2 = _local3 - 1;
while (_local2 < (_local3 + 2)) {
var _local1 = _local8 - 1;
while (_local1 < (_local8 + 2)) {
if (((((((_local2 >= 0) && (_local2 < _local11)) && (_local1 >= 0)) && (_local1 < _local14)) && (!((_local2 == _local3) && (_local1 == _local8)))) && ((_local15 || (_local2 == _local3)) || (_local1 == _local8))) && (((_local16 || (_local2 == _local3)) || (_local1 == _local8)) || ((map[_local2][_local8] != 0) && (map[_local3][_local1])))) {
if (map[_local2][_local1] != 0) {
if (!isClosed(_local2, _local1)) {
var _local4 = mapStatus[_local3][_local8].movementCost + (((_local2 == _local3) || (_local1 == _local8)) ? (_local13) : (_local12));
if (isOpen(_local2, _local1)) {
if (_local4 < mapStatus[_local2][_local1].movementCost) {
openSquare(_local2, _local1, [_local3, _local8], _local4, undefined, true);
}
} else {
var _local6 = (Math.abs(_local2 - endY) + Math.abs(_local1 - endX)) * 10;
openSquare(_local2, _local1, [_local3, _local8], _local4, _local6, false);
}
}
}
}
_local1++;
}
_local2++;
}
}
var _local22 = isClosed(endY, endX);
delete isOpen;
delete isClosed;
delete nearerSquare;
delete closeSquare;
delete openSquare;
if (_local22) {
var _local19 = new Array();
var _local3 = endY;
var _local8 = endX;
while ((_local3 != startY) || (_local8 != startX)) {
_local19.push([_local3, _local8]);
var _local17 = mapStatus[_local3][_local8].parent[0];
var _loc20 = mapStatus[_local3][_local8].parent[1];
_local3 = _local17;
_local8 = _loc20;
}
_local19.push([startY, startX]);
return(_local19);
}
return(null);
};
ASSetPropFlags(_global, "findPath", 1, 0);
gotoAndStop ("Controller");
Frame 25
var musicVol = new Sound(musicmap);
musicVol.setVolume(0);
var my_so = SharedObject.getLocal("mushroom-madness-3za", "/");
var keyListener = new Object();
Key.addListener(keyListener);
paused = true;
cursor._visible = false;
cursor.ammopip.stop();
mousePressed = false;
magnit = false;
hintnum = 1;
quake = 0;
total_ms = 0;
total_sec = 0;
alarmEnemy = 0;
spawnTimer = 0;
power = 0;
reload = 0;
combo = 0;
key = 0;
minigame = 0;
lvl = 0;
lvl_temp = 1;
mini_diff = 0;
muznum = 1;
muzcur = "muz_0";
effect = true;
achi = new Array();
_global.bankEnemy = new Array();
_global.bankFood = new Array();
_global.bankWall = new Array();
_global.bankTree = new Array();
_global.bankKap = new Array();
_global.bankMine = new Array();
_global.bankTesla = new Array();
_global.bankChest = new Array();
_global.bankPrize = new Array();
_global.bankWeap = new Array();
_global.bankFlow = new Array();
_global.tileW = 48;
_global.tileH = 36;
buftemp = new Array();
krotxy = new Array();
krotxy[0] = [75, 17];
krotxy[1] = [59, -10];
krotxy[2] = [24, -20];
krotxy[3] = [-10, -10];
krotxy[4] = [-24, 17];
krotxy[5] = [-10, 45];
krotxy[6] = [24, 56];
krotxy[7] = [59, 45];
mines = new Array();
mines[8] = 0;
mines[9] = 0;
mines[10] = 0;
mines[11] = 0;
mines[12] = 0;
mines[13] = 0;
weapin = new Array();
weapin[2] = 1;
weapin[3] = 4;
weapin[4] = 8;
weapin[5] = 6;
weapin[6] = 10;
weapin[7] = 12;
weapin[8] = 1;
weapin[9] = 7;
weapin[10] = 14;
weapin[11] = 5;
weapin[12] = 9;
weapin[13] = 11;
hintin = new Array();
hintin[1] = [[3, 5], [2, 1], [1, 1], [2, 2]];
hintin[2] = [[3, 1], [4, 1], [2, 5], [1, 2]];
hintin[3] = [[3, 8], [4, 7], [2, 6], [1, 3]];
hintin[4] = [[3, 4], [2, 4], [4, 2], [2, 3]];
hintin[5] = [[3, 2], [2, 7], [4, 10], [1, 4]];
hintin[6] = [[3, 9], [2, 8], [4, 5]];
hintin[7] = [[3, 6], [4, 8]];
hintin[8] = [[3, 7], [2, 9], [4, 3]];
hintin[9] = [[3, 10], [4, 11]];
hintin[10] = [[4, 4]];
hintin[11] = [[3, 3], [4, 12]];
hintin[12] = [[4, 6]];
hintin[13] = [[3, 11]];
hintin[14] = [[4, 9]];
wavew = new Array();
wavew[0] = 20;
wavew[1] = 20;
wavew[2] = 30;
wavew[4] = 10;
wavew[5] = 12;
wavew[8] = 30;
wavew[10] = 40;
wavel = new Array();
wavel[0] = 80;
wavel[1] = 0;
wavel[2] = 20;
wavel[4] = 100;
wavel[5] = 50;
wavel[8] = 0;
wavel[10] = 80;
wavexy = new Array();
wavexy[0] = [0, 0];
wavexy[1] = [0, 0];
wavexy[2] = [0, 0];
wavexy[3] = [0, 0];
wavep = new Array();
handpow = 1;
handtype = new Array();
handatt = new Array();
handtype[1] = [0, 1];
handtype[2] = [0, 1];
handtype[3] = [0, 1];
handtype[4] = [0, 1];
handtype[5] = [0, 1];
handtype[6] = [0, 1];
handtype[7] = [0, 3];
handtype[8] = [0, 5];
handtype[9] = [0, 2];
handtype[10] = [0, 4];
handatt[1] = 0.7;
handatt[2] = 0.9;
handatt[3] = 1.1;
handatt[4] = 1.3;
handatt[5] = 1.5;
handatt[6] = 1.7;
handatt[7] = 1.9;
handatt[8] = 2.2;
handatt[9] = 2.3;
handatt[10] = 2.6;
_global.loadLevel = function () {
if (_root.sound) {
menubut.ib1.gotoAndStop(1);
} else {
menubut.ib1.gotoAndStop(2);
}
if (_root.music) {
menubut.ib2.gotoAndStop(1);
} else {
menubut.ib2.gotoAndStop(2);
}
maxlvl = getLevelDone(2);
setUpgr();
cursor.ammopip._visible = true;
cursor.ammopip.gotoAndStop(1);
handnum = upgr[10];
cursor.lopata.gotoAndStop(handnum);
cursor.lopata.rad._visible = false;
if (randweap == true) {
cursor.gotoAndStop(2 + random(6));
}
bankLair = 0;
diff = 1;
key = 0;
inter._visible = true;
lostlifesnd = false;
alarmEnemy = 0;
spawnTimer = 0;
reload = 10;
life = 10;
mini_inter._visible = true;
back.img.lin._visible = false;
inter_lvlmode._visible = true;
inter_lvlmode.text = modes[lvlmode][0];
switch (minigame) {
case 0 :
inter_lvlmode.text = inter_lvlmode.text + (" - C\u1EEDa " + lvl);
mini_inter.gotoAndStop(1);
break;
case 1 :
inter_lvlmode.text = inter_lvlmode.text + (" - C\u1EEDa " + lvl);
mini_inter.gotoAndStop(2);
mini_diff = lvl;
back.img.lin._visible = true;
z = _root[(("mode" + lvlmode) + "spw") + lvl];
i = 0;
while (i < z.length) {
wavexy[i] = [z[i][0], z[i][1]];
i++;
}
switch (mini_diff) {
case 1 :
cursor.gotoAndStop(5);
break;
case 2 :
cursor.gotoAndStop(6);
break;
case 3 :
cursor.gotoAndStop(4);
break;
case 4 :
cursor.gotoAndStop(7);
break;
case 5 :
cursor.gotoAndStop(3);
break;
case 6 :
cursor.gotoAndStop(5);
break;
case 7 :
cursor.gotoAndStop(2);
break;
case 8 :
cursor.gotoAndStop(1);
break;
case 9 :
cursor.gotoAndStop(7);
break;
case 10 :
cursor.gotoAndStop(5);
}
cursor.ammopip._visible = false;
break;
case 2 :
inter_lvlmode.text = inter_lvlmode.text + (" - C\u1EEDa " + lvl);
mini_inter.gotoAndStop(2);
inter_level._visible = true;
inter_level.text = "M\u00E0n 1/5";
alarmEnemy = 0;
mini_diff = -1;
break;
case 3 :
inter_lvlmode.text = inter_lvlmode.text + (" - Th\u01B0\u1EDFng " + lvl);
mini_inter._visible = false;
magnit = true;
key = lvl;
handnum = 1;
cursor.gotoAndStop(1);
cursor.lopata.gotoAndStop(handnum);
break;
case 4 :
inter_lvlmode.text = inter_lvlmode.text + (" - C\u1EEDa " + lvl);
mini_inter.gotoAndStop(1);
break;
case 5 :
inter_lvlmode.text = inter_lvlmode.text + (" - C\u1EEDa " + lvl);
mini_inter.gotoAndStop(1);
mini_diff = lvl;
z = _root[(("mode" + lvlmode) + "spw") + lvl];
i = 0;
while (i < z.length) {
wavexy[i] = [z[i][0], z[i][1]];
i++;
}
break;
case 6 :
unlimammo = false;
mini_inter._visible = false;
mini_diff = lvl;
inter_level.text = "M\u00E0n " + mini_diff;
mini_prize = Math.ceil(1 + (mini_diff / 8));
alarmEnemy = 30;
spawnTimer = 2 + (mini_diff * 3);
inter_level._visible = true;
break;
case 7 :
inter_lvlmode.text = inter_lvlmode.text + (" - Th\u01B0\u1EDFng " + lvl);
mini_bat = 5 * lvl;
mini_inter._visible = false;
magnit = true;
handnum = 1;
cursor.gotoAndStop(1);
cursor.lopata.gotoAndStop(handnum);
}
if (mini_inter._visible == true) {
i = 0;
while (i < 3) {
z = mini_inter["but" + i];
z.gotoAndStop(1);
z.type = _root[(("mode" + lvlmode) + "achi") + lvl][i][0];
z.need = _root[(("mode" + lvlmode) + "achi") + lvl][i][1];
z.quest.gotoAndStop(z.type + 1);
z.txt1.text = 0;
z.txt2.text = "/" + z.need;
i++;
}
}
if ((minigame < 2) || (minigame == 5)) {
if (minigame == 0) {
spawnLength = _root[(("mode" + lvlmode) + "spw") + lvl].length / 2;
} else {
spawnLength = 50;
}
progStep = 3.33 / spawnLength;
}
k = 0;
ww = 0;
if (((lvlmode == 3) || (lvlmode == 7)) || (lvlmode == 9)) {
m = _root[("mode" + lvlmode) + "lvl"];
} else {
m = _root[(("mode" + lvlmode) + "lvl") + lvl];
}
i = 0;
while (i < 17) {
j = 0;
while (j < 17) {
z = Number(m.substr(k, 2));
mode = Math.floor(z / 10);
k = k + 2;
if (minigame == 2) {
colmap[j][i] = 0;
} else {
colmap[j][i] = 1;
}
switch (mode) {
case 0 :
switch (z) {
case 1 :
createFlow(i, j);
break;
case 2 :
createTree(i, j, 1);
colmap[j][i] = 0;
break;
case 3 :
createTree(i, j, 4);
colmap[j][i] = 0;
break;
case 4 :
createBush(i, j, 1);
colmap[j][i] = 0;
break;
case 5 :
createBush(i, j, 4);
colmap[j][i] = 0;
break;
case 6 :
createCrystal(i, j, 1);
colmap[j][i] = 0;
break;
case 7 :
createCrystal(i, j, 3);
colmap[j][i] = 0;
break;
case 8 :
createLake(i, j);
colmap[j][i] = 0;
break;
case 9 :
createPit(i, j);
}
break;
case 1 :
colmap[j][i] = 0;
createWall(i, j, z - 9);
break;
case 2 :
colmap[j][i] = 0;
createChest(i, j, z - 18);
break;
case 3 :
colmap[j][i] = 1;
createFood(i, j, z - 29);
break;
case 4 :
createWeap((i * tileW) + 24, (j * tileH) + 18, z - 38);
break;
case 5 :
createPrize((i * tileW) + 24, (j * tileH) + 18, z - 43, 1, 1);
break;
case 6 :
if (z != 67) {
colmap[j][i] = 1;
}
createRoad(i, j, z - 59);
break;
case 7 :
createLair(i, j, z - 69);
}
j++;
}
i++;
}
if (minigame == 2) {
i = 0;
while (i < 4) {
z = _root[(("lvl" + lvl) + "p") + i];
wavexy[i] = [z[0][0], z[0][1]];
j = 0;
while (j < 2) {
switch (wavexy[i][j]) {
case 1 :
wavexy[i][j] = 0;
break;
case 15 :
wavexy[i][j] = 16;
}
j++;
}
i++;
}
}
if (minigame == 3) {
x = bankChest.length;
while (x > 0) {
i = 0;
while (i < 4) {
if (x > 0) {
do {
y = random(bankChest.length);
} while (bankChest[y].info != undefined);
bankChest[y].info = i;
x--;
}
i++;
}
}
}
achi[17] = bankFood.length;
achi[19] = bankWeap.length;
achi[20] = life;
j = 0;
while (j < bankFood.length) {
achi[18] = achi[18] + bankFood[j].count;
j++;
}
};
onEnterFrame = function () {
if (sound_delay > 0) {
sound_delay--;
}
if (total_ms == 30) {
total_ms = 0;
if (total_sec == 60) {
total_sec = 0;
addStat(9, 1);
trace("GAME MINUTE " + stat[9]);
trace(bankEnemy.toString());
} else {
total_sec++;
}
} else {
total_ms++;
}
if (quake > 0) {
if ((quake % 1) == 0) {
_root._y = quake;
} else {
_root._y = -quake;
}
quake = quake - 0.5;
}
if (paused == false) {
if (cursor.speed > 0.1) {
cursor.speed = cursor.speed - 0.1;
}
switch (minigame) {
case 0 :
prog.img._xscale = prog.img._xscale + progStep;
if (alarmEnemy == 0) {
if (spawnTimer == spawnLength) {
if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
} else {
xx = _root[(("mode" + lvlmode) + "spw") + lvl].substr(spawnTimer * 2, 2);
if (xx) {
x = Number(xx);
y = x % 10;
z = (x - y) / 10;
if (z == 0) {
if (y > 4) {
z = 10;
y = y - 5;
}
}
switch (y) {
case 0 :
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), z, y);
} else {
createEnemy(random(17), choose(0, 16), z, y);
}
break;
case 1 :
createEnemy(16, random(17), z, y);
break;
case 2 :
createEnemy(random(17), 0, z, y);
break;
case 3 :
createEnemy(0, random(17), z, y);
break;
case 4 :
createEnemy(random(17), 16, z, y);
break;
case 5 :
case 6 :
case 7 :
case 8 :
case 9 :
createEnemy(0, 0, z, y);
}
}
spawnTimer++;
}
alarmEnemy = 30;
} else {
alarmEnemy--;
}
break;
case 1 :
prog.img._xscale = prog.img._xscale + progStep;
if (life < 1) {
playMusic("stop");
showLogo(4);
} else if (alarmEnemy < 1500) {
alarmEnemy++;
if ((alarmEnemy % 90) == 0) {
i = 0;
while (i < wavexy.length) {
wavexy[i][1]--;
i++;
}
}
i = 0;
while (i < wavexy.length) {
if ((alarmEnemy % wavexy[i][1]) == 0) {
switch (wavexy[i][0]) {
case 0 :
createEnemy(16, random(12) + 2, 0);
break;
case 1 :
createEnemy(16, random(12) + 2, 1);
break;
case 2 :
createEnemy(16, random(11) + 3, 2);
break;
case 3 :
createEnemy(16, random(10) + 5, 3, 0);
break;
case 4 :
createEnemy(16, random(12) + 2, 4);
break;
case 5 :
createEnemy(16, random(12) + 2, 5);
break;
case 6 :
createEnemy(random(11) + 3, 16, 6);
break;
case 7 :
createEnemy(random(7) + 5, random(7) + 5, 7);
break;
case 8 :
createEnemy(16, random(12) + 2, 8);
break;
case 9 :
createEnemy(16, random(12) + 2, 9);
break;
case 10 :
createEnemy(16, random(11) + 3, 10);
}
}
i++;
}
} else if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
break;
case 2 :
if (life < 1) {
playMusic("stop");
showLogo(4);
} else if (spawnTimer == 0) {
z = _root[(("mode" + lvlmode) + "spw") + lvl];
if (alarmEnemy > 0) {
alarmEnemy--;
i = 0;
while (i < z[mini_diff].length) {
y = z[mini_diff][i];
if ((alarmEnemy % wavew[y]) == 0) {
if (alarmEnemy > (wavel[y] * ((mini_diff / 4) + 1))) {
createEnemy(wavexy[i][0], wavexy[i][1], y, i);
}
}
i++;
}
} else if (mini_diff < 4) {
if (bankEnemy.length == 0) {
lostlifesnd = false;
mini_diff++;
inter_level.text = ("M\u00E0n " + (mini_diff + 1)) + "/5";
alarmEnemy = 200 + (50 * mini_diff);
spawnTimer = 180;
if (mini_diff > 0) {
waveup.gotoAndPlay(2);
playSound("win");
}
createEnemy(0, 0, 9, 7 + Math.min(2, random(lvl)));
if ((mini_diff % 2) == 0) {
createEnemy(0, 0, 9, 4 + Math.min(2, random(lvl)));
}
if (lvl > 5) {
createEnemy(0, 0, 9, 7 + Math.min(2, random(lvl)));
}
}
} else if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
} else {
spawnTimer--;
}
break;
case 3 :
if (key < 1) {
if (alarmEnemy > 50) {
if (bankPrize.length == 0) {
win = true;
}
} else {
alarmEnemy++;
}
} else {
alarmEnemy = 0;
}
break;
case 4 :
if (bankLair == 0) {
if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
}
break;
case 5 :
prog.img._xscale = prog.img._xscale + progStep;
if (alarmEnemy < 1500) {
alarmEnemy++;
if ((alarmEnemy % 90) == 0) {
i = 0;
while (i < wavexy.length) {
wavexy[i][1]--;
i++;
}
}
i = 0;
while (i < wavexy.length) {
if ((alarmEnemy % wavexy[i][1]) == 0) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), wavexy[i][0], 0);
} else {
createEnemy(random(17), choose(0, 16), wavexy[i][0], 0);
}
}
i++;
}
} else if (bankEnemy.length == 0) {
magnit = true;
if (bankPrize.length == 0) {
win = true;
}
}
break;
case 6 :
if (alarmEnemy < 1) {
if (spawnTimer < 1) {
if (bankEnemy.length == 0) {
mini_diff++;
mini_prize = Math.ceil(1 + (mini_diff / 8));
inter_level.text = "M\u00E0n " + mini_diff;
spawnTimer = 2 + (mini_diff * 3);
alarmEnemy = 100;
setStat(8, mini_diff);
kongsend("survival_score", curr_money);
kongsend("survival_level", mini_diff);
playSound("win");
waveup.gotoAndPlay(2);
} else {
alarmEnemy = 10;
}
} else {
alarmEnemy = Math.max(15, 40 - mini_diff);
x = 1 + random(Math.min(10, Math.round(2 + (mini_diff / 3))));
if (random(10) < 2) {
if (mini_prize > 0) {
mini_prize--;
x = 0;
}
}
if (x != 0) {
switch (x) {
case 1 :
xx = 5;
spawnTimer--;
break;
case 2 :
xx = 1;
spawnTimer--;
break;
case 3 :
xx = 8;
spawnTimer = spawnTimer - 2;
break;
case 4 :
xx = 9;
spawnTimer = spawnTimer - 2;
break;
case 5 :
xx = 0;
spawnTimer = spawnTimer - 3;
break;
case 6 :
xx = 2;
spawnTimer = spawnTimer - 3;
break;
case 7 :
xx = 6;
spawnTimer = spawnTimer - 3;
break;
case 8 :
xx = 7;
spawnTimer = spawnTimer - 4;
break;
case 9 :
xx = 3;
spawnTimer = spawnTimer - 4;
break;
case 10 :
xx = 10;
spawnTimer = spawnTimer - 8;
}
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), xx, 0);
} else {
createEnemy(random(17), choose(0, 16), xx, 0);
}
} else {
survbonus = random(10);
if (survbonus < 2) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), 4);
} else {
createEnemy(random(17), choose(0, 16), 4);
}
} else {
if (survbonus < 6) {
createEnemy(16, random(10) + 5, 3, 1 + random(Math.min(5, Math.round(2 + (mini_diff / 3)))));
} else {
createEnemy(choose(0, 16), random(17), 9, 4 + random(Math.min(5, Math.round(2 + (mini_diff / 3)))));
}
spawnTimer = spawnTimer + 10;
}
}
}
} else {
alarmEnemy--;
}
break;
case 7 :
if (mini_bat > 0) {
while (mini_bat--) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), 9, 3);
} else {
createEnemy(random(17), choose(0, 16), 9, 3);
}
if ((mini_bat % 2) == 1) {
if (random(2) > 1) {
createEnemy(choose(0, 16), random(17), 9, 2);
continue;
}
createEnemy(random(17), choose(0, 16), 9, 2);
}
}
}
if (bankEnemy.length != 0) {
break;
}
if (bankPrize.length != 0) {
break;
}
win = true;
}
if (combo != 0) {
if (combo > 1) {
if (combo > achi[10]) {
achi[10] = combo;
setStat(22, combo);
}
createPrize(_xmouse + 64, _ymouse + 30, 2, Math.min(3, Math.ceil(combo / 3)));
obj = levelmap.attachMovie("scoreobj", "score", levelmap.getNextHighestDepth());
obj._x = _xmouse + 64;
obj._y = _ymouse + 30;
obj.gotoAndStop(4);
obj.combo.combo.count.text = combo;
}
combo = 0;
}
if (win == true) {
logo.gotoAndStop(1);
showLogo(3);
paused = true;
}
if (mousePressed == true) {
if (reload < 0) {
addStat(23, 1);
if (cursor._currentframe == 1) {
power = power + 1;
if (power > 12) {
if (handpow != 1) {
if (handpow == 0) {
cursor.lopata.ready.gotoAndPlay(2);
}
handpow = 1;
if (handtype[handnum][1] > 2) {
hitrad = 40 * handatt[handnum];
cursor.lopata.rad._visible = true;
cursor.lopata.rad._xscale = (cursor.lopata.rad._yscale = 20);
}
}
if (cursor.lopata.rad._xscale < (hitrad * 2)) {
cursor.lopata.rad._xscale = (cursor.lopata.rad._yscale = cursor.lopata.rad._yscale + 20);
}
if (power > 15) {
power = 13;
}
} else {
handpow = 0;
}
cursor.lopata.img.gotoAndStop(Math.round(power));
} else {
cursor.fx.play();
if (cursor._currentframe == 7) {
playSound("rocket1", "rocket2");
reload = 24 / bonusReload;
quake = 4;
castExplo(levelmap._xmouse, levelmap._ymouse, radRocket);
createPart(levelmap._xmouse, levelmap._ymouse, "explo", levelmap.getNextHighestDepth(), 1);
} else if (cursor._currentframe < 7) {
switch (cursor._currentframe) {
case 2 :
playSound("gun1", "gun2", "gun3");
reload = 9 / bonusReload;
damx = damGun;
x = 5;
y = 1;
createPart(levelmap._xmouse, levelmap._ymouse, "bullet", levelmap.getNextHighestDepth(), 1);
break;
case 3 :
playSound("gun1", "gun2", "gun3");
reload = 6 / bonusReload;
damx = damGun;
x = 5;
y = 1;
break;
case 4 :
playSound("shot1", "shot2");
reload = 18 / bonusReload;
damx = damGun;
x = 20;
y = shellShot;
break;
case 5 :
playSound("tesla1", "tesla2");
reload = 9 / bonusReload;
damx = damTesla;
x = 1;
y = 1;
castTesla(levelmap._xmouse, levelmap._ymouse);
break;
case 6 :
playSound("gauss1", "gauss2", "gauss3");
if (cursor.speed < 5) {
cursor.speed = cursor.speed + 1;
}
reload = 7 - cursor.speed;
damx = damGun;
x = 5;
y = 1;
}
glob_hit = false;
while (y--) {
hit = false;
k = (-x) + random(x * 2);
n = (-x) + random(x * 2);
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
attackTree(z, 2, 0);
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
castHitChest(this);
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(levelmap._xmouse + k, levelmap._ymouse + n, z)) {
hit = true;
castHitEnemy(this);
}
i++;
}
if (hit == false) {
if (effect == true) {
createPart((_root._xmouse + k) + 64, (_root._ymouse + n) + 30, "dirt", levelmap.getNextHighestDepth(), 1);
}
} else {
glob_hit = true;
}
if (glob_hit == true) {
playSoundLim("hit11", "hit12");
}
}
}
cursor.ammo--;
if (cursor.ammo == 0) {
cursor.gotoAndStop(1);
cursor._xscale = (cursor._yscale = 140);
cursor.ammopip.gotoAndStop(1);
butdrop.visible = false;
} else {
cursor._xscale = (cursor._yscale = 120);
if (cursor.ammo < cursor.ammoend) {
cursor.ammopip.play();
}
}
}
}
}
if (reload >= 0) {
reload--;
} else if (autoclick == true) {
if (cursor._currentframe == 1) {
if (mousePressed == false) {
handpow = 0;
lopataHit();
}
}
}
cursor.key._visible = false;
if (key > 0) {
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (z._currentframe > 3) {
if (z.chest.keys > 0) {
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
cursor.key._visible = true;
cursor.key.info = z;
break;
}
}
}
i++;
}
}
if (cursor.key._xscale < 100) {
if (cursor.key._visible == true) {
cursor.key._xscale = (cursor.key._yscale = cursor.key._yscale + 10);
} else {
cursor.key._xscale = (cursor.key._yscale = 0);
}
}
i = 0;
while (i < bankPrize.length) {
z = bankPrize[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
if (z.speed < 3) {
if (z.kill == false) {
j = 0;
while (j < bankPrize.length) {
if (bankPrize[j] == z) {
bankPrize.splice(j, 1);
break;
}
j++;
}
if (z._currentframe < 7) {
playSoundLim("coin1", "coin2", "coin3", "coin4");
} else if (z._currentframe < 10) {
playSoundLim("almaz1", "almaz2");
} else {
playSoundLim("pickup");
}
z.kill = true;
z._name = "prize";
z._xscale = (z._yscale = 100);
z.dir = -1 * point_direction(z._x, z._y, z.x, z.y);
}
}
}
i++;
}
} else if (lvl == 0) {
}
};
onMouseDown = function () {
mousePressed = true;
if (paused == false) {
if (cursor._currentframe == 1) {
i = 0;
while (i < bankWeap.length) {
z = bankWeap[i];
if (z.wait == 0) {
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
addStat(4, 1);
playSound("pickup");
j = 0;
while (j < bankWeap.length) {
if (bankWeap[j] == z) {
bankWeap.splice(j, 1);
break;
}
j++;
}
if (z._currentframe < 4) {
mousePressed = false;
}
cursor.gotoAndStop(z._currentframe);
cursor._xscale = (cursor._yscale = 140);
reload = 5;
cursor.ammopip.gotoAndStop(3);
butdrop._visible = true;
z.removeMovieClip();
break;
}
}
i++;
}
}
if (cursor.key._visible == true) {
if (key > 0) {
z = cursor.key.info.chest;
if (z.keys > 0) {
playSound("unlock");
key--;
z["key" + z.keys]._visible = true;
z.keys--;
reload = 4;
cursor.key._visible = false;
cursor.key._xscale = (cursor.key._yscale = 0);
}
}
}
}
};
lopataHit = function () {
power = 0;
cursor.lopata.rad._visible = false;
hitrad = 0;
reload = 5;
if (handpow == 1) {
playSound("hit3");
cursor.lopata.img.gotoAndPlay(15);
quake = handtype[handnum][handpow];
switch (handtype[handnum][handpow]) {
case 1 :
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
break;
case 2 :
cursor.lopata.img.fx.gotoAndPlay(2);
playSound("tesla1", "tesla2");
castTesla(levelmap._xmouse, levelmap._ymouse);
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
break;
case 3 :
hitrad = 40 * handatt[handnum];
createGroundPart(partmap._xmouse, partmap._ymouse, "crack");
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
break;
case 4 :
hitrad = 40 * handatt[handnum];
castExplo(levelmap._xmouse, levelmap._ymouse, hitrad);
createPart(levelmap._xmouse, levelmap._ymouse, "explo", levelmap.getNextHighestDepth(), 1);
break;
case 5 :
hitrad = 40 * handatt[handnum];
createGroundPart(partmap._xmouse, partmap._ymouse, "crack");
createPart(levelmap._xmouse, levelmap._ymouse, "dirt", levelmap.getNextHighestDepth(), 1);
createPart(levelmap._xmouse, levelmap._ymouse, "bullet", levelmap.getNextHighestDepth(), 3);
}
} else {
cursor.lopata.img.gotoAndPlay(16);
}
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
attackTree(z, (handpow * 6) + 2, 0);
if (z.cry == 0) {
if (z.img._currentframe < 4) {
playSound("tree1", "tree2");
} else if (z.img._currentframe == 4) {
playSound("treed1", "treed2");
}
}
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (z._currentframe == 2) {
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
if (handpow == 0) {
attackChest(z, 30 * handatt[handnum]);
} else {
attackChest(z, 80 * handatt[handnum]);
}
playSound("box1d1", "box1d2");
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(levelmap._xmouse, levelmap._ymouse, z)) {
switch (z.type) {
case 0 :
case 1 :
if (handpow == 0) {
attackEnemy(z, 20 * handatt[handnum], 2);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 60 * handatt[handnum], 1);
playSound("hit2");
}
break;
case 2 :
if (handpow == 0) {
attackEnemy(z, 10 * handatt[handnum], 3);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 30 * handatt[handnum], 4);
playSound("hit2");
}
break;
case 3 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 6);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 70 * handatt[handnum], 5);
playSound("hit2");
}
break;
case 4 :
case 9 :
attackSpider(z);
break;
case 5 :
case 8 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 2);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 70 * handatt[handnum], 1);
playSound("hit2");
}
break;
case 6 :
if (handpow == 0) {
attackEnemy(z, 20 * handatt[handnum], 6);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 45 * handatt[handnum], 5);
playSound("hit2");
}
break;
case 7 :
if (handpow == 0) {
attackEnemy(z, 30 * handatt[handnum], 7);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 100, 7);
playSound("hit2");
}
break;
case 10 :
if (handpow == 0) {
attackEnemy(z, 5 * handatt[handnum], 9);
playSound("hit11", "hit12");
} else {
attackEnemy(z, 15 * handatt[handnum], 8);
playSound("hit2");
}
}
}
i++;
}
if (hitrad != 0) {
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (point_distance(levelmap._xmouse - 24, levelmap._ymouse - 8, z._x, z._y) < hitrad) {
switch (z.type) {
case 0 :
case 1 :
case 5 :
case 8 :
attackEnemy(z, 20, 1);
break;
case 2 :
if (random(10) > 3) {
attackEnemy(z, 10, 0);
} else {
attackEnemy(z, 10, 3);
}
break;
case 4 :
attackSpider(z);
break;
case 7 :
attackEnemy(z, 20, 7);
break;
case 10 :
attackEnemy(z, 5, 9);
}
}
i++;
}
}
};
onMouseUp = function () {
mousePressed = false;
if (paused == false) {
if (reload < 0) {
if (cursor._currentframe == 1) {
lopataHit();
} else {
switch (cursor._currentframe) {
case 8 :
useMine();
playSound("flash");
castStun();
break;
case 9 :
useMine();
playSound("explo");
quake = 6;
castExplo(levelmap._xmouse, levelmap._ymouse, radBomb);
break;
case 10 :
achi[15]++;
addStat(24, 1);
useMine();
createInterPart(_root._xmouse, _root._ymouse, "nuke1");
playSound("nuke");
break;
case 11 :
case 12 :
case 13 :
x = Math.floor((levelmap._xmouse + 8) / tileW);
y = Math.floor((levelmap._ymouse - 12) / tileH);
if (colmap[y][x] == 1) {
playSound("trapcr");
if (cursor._currentframe == 11) {
createKap(x, y);
} else if (cursor._currentframe == 12) {
createMine(x, y);
} else {
createTesla(x, y);
}
addStat(21, 1);
useMine();
} else {
cursor.ammo++;
}
}
}
}
}
};
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
keyListener.onKeyDown = function () {
if (Key.isDown(80) || (Key.isDown(27))) {
if ((((gamemenu._currentframe == 181) & (win != true)) & (paused == false)) & (logo._currentframe == 1)) {
if (gamemenu._xscale == 100) {
showLogo(5);
openMenu("game");
_root.musicVol.setVolume(0);
}
}
if (gamemenu._currentframe == 11) {
if (gamemenu._xscale == 100) {
_root.musicVol.setVolume(100);
showLogo(0);
_root.menubut._visible = true;
openMenu("exit");
}
}
}
if (Key.isDown(32)) {
if (paused == false) {
_root["mine" + _root.curr_mine].img.select._visible = false;
if (curr_mine == 0) {
cursor.gotoAndStop(1);
} else {
cursor.gotoAndStop(_root.pre_weap);
cursor.ammopip.gotoAndStop(3);
curr_mine = 0;
}
reload = 2;
} else if (gamemenu._currentframe == 71) {
if (gamemenu._xscale == 100) {
if (_root.trans_delay == false) {
if ((_root.lvl % 10) == 0) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
}
}
if (paused == false) {
if (Key.isDown(49)) {
selectMine(1);
}
if (Key.isDown(50)) {
selectMine(2);
}
if (Key.isDown(51)) {
selectMine(3);
}
if (Key.isDown(52)) {
selectMine(4);
}
if (Key.isDown(53)) {
selectMine(5);
}
if (Key.isDown(54)) {
selectMine(6);
}
}
if (Key.isDown(77)) {
if ((_root.sound == true) || (_root.music == true)) {
_root.sound = false;
_root.music = false;
playMusic("stop");
menubut.ib1.gotoAndStop(2);
menubut.ib2.gotoAndStop(2);
menubut2.ib1.gotoAndStop(2);
menubut2.ib2.gotoAndStop(2);
} else {
_root.sound = true;
_root.music = true;
playMusic("pre");
menubut.ib1.gotoAndStop(1);
menubut.ib2.gotoAndStop(1);
menubut2.ib1.gotoAndStop(1);
menubut2.ib2.gotoAndStop(1);
}
}
};
gotoAndStop ("Weapons");
Frame 35
_global.attackChest = function (z, dam) {
z.hp = z.hp - dam;
if (z.hp < 1) {
dieChest(z);
} else {
z.chest.gotoAndStop(1 + Math.floor((100 - z.hp) / 25));
}
};
_global.attackEnemy = function (z, dam, type) {
if (z.nodam != true) {
if (z.armor == true) {
z.hp = z.hp - ((dam / diff) / 5);
} else {
z.hp = z.hp - (dam / diff);
}
if (type > 0) {
switch (type) {
case 1 :
createPart(z._x + 24, z._y, "damage1", levelmap.getNextHighestDepth(), 1);
z.moving = -stupor;
if (z.cargo > 0) {
if (z.type != 8) {
if (z.type == 3) {
createPrize(z._x, z._y + z.bird._y, 2 + z.food.type, 1, z.food);
} else {
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
z.grib._visible = false;
z.cargo = false;
z.food = undefined;
z.path.shift();
}
}
z.vspeed = 6 + random(2);
if (z.act == 0) {
z.y = z._y;
z.act = 1;
if (z.sleep == false) {
if (z.armor == true) {
z.armor = false;
z.speed = 0.5;
z.gotoAndStop(z._currentframe - 8);
} else {
z.gotoAndStop(z._currentframe + 16);
}
z.sleep = true;
}
} else if (z.act == 4) {
z._xscale = (z._yscale = 130);
}
break;
case 2 :
createPart(z._x + 24, z._y, "damage1", levelmap.getNextHighestDepth(), 1);
z.moving = z.moving - 24;
z.vspeed = 4 + random(4);
if (z.act == 0) {
z.y = z._y;
z.act = 1;
if (z.sleep == false) {
if (z.armor != true) {
z.gotoAndStop(z._currentframe + 8);
}
}
} else if (z.act == 4) {
z._xscale = (z._yscale = 130);
}
break;
case 3 :
createPart(z._x + 24, z._y - 10, "damage1", levelmap.getNextHighestDepth(), 1);
if (z.moving > -1) {
if (z.moving == 1) {
if (z._currentframe < 10) {
z.last = z._currentframe;
}
}
z.gotoAndStop(11 + random(2));
z.dam.gotoAndPlay(1);
z.moving = -8;
}
break;
case 4 :
createPart(z._x + 24, z._y - 10, "damage1", levelmap.getNextHighestDepth(), 1);
if (z.moving == 1) {
playSoundLim("bearstay");
if (z._currentframe < 10) {
z.last = z._currentframe;
}
}
z.gotoAndStop(11 + random(2));
z.dam.gotoAndPlay(1);
z.moving = -stupor;
break;
case 5 :
z.moving = -stupor;
if (z.sleep == false) {
z.bird.gotoAndStop(23);
z.shad.gotoAndStop(23);
z.sleep = true;
}
case 6 :
if (z.type == 3) {
playSoundLim("bird1", "bird2");
createPart(z._x, z._y + z.bird._y, "damage1", levelmap.getNextHighestDepth(), 1);
} else {
playSoundLim("owl1", "owl2");
createPart(z._x, z._y, "damage1", levelmap.getNextHighestDepth(), 1);
}
if (effect == true) {
if (z.type == 3) {
createPart(z._x, z._y + z.bird._y, "pero", levelmap.getNextHighestDepth(), 3);
} else {
createPart(z._x, z._y + z.bird._y, "pero2", levelmap.getNextHighestDepth(), 3);
}
}
if (z.cargo > 0) {
createPrize(z._x, z._y + z.bird._y, 2 + z.food.type, 1, z.food);
z.cargo = (z.bird.grib._visible = false);
z.food = undefined;
}
if (z.info > 0) {
trace("info=" + info);
if (z.info < 7) {
createWeap(z._x, z._y + z.bird._y, 1 + z.info, 0);
} else {
createPrize(z._x, z._y + z.bird._y, z.info, 1, 0);
}
z.bird.weap._visible = false;
z.info = undefined;
}
if (z.sleep == false) {
z.moving = -6;
z.bird.gotoAndPlay(15);
z.shad.gotoAndPlay(15);
z.speed = z.speed * 1.2;
}
break;
case 7 :
createPart(z._x, z._y - 5, "damage1", levelmap.getNextHighestDepth(), 1);
z.act = 2;
z.image_index = 18;
if (z.cargo > 0) {
z.cargo = false;
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
break;
case 8 :
createPart(z._x + 24, z._y - 5, "damage1", levelmap.getNextHighestDepth(), 1);
z.moving = -10;
z._yscale = 100;
if (z.act == 0) {
z.act = 1;
}
if (z.cargo > 0) {
if (z.cargonum > 0) {
ii = 1;
while (ii <= z.cargonum) {
trace("grib" + ii);
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
z["grib" + ii]._visible = false;
ii++;
}
}
z.cargo = false;
z.food = undefined;
z.path.shift();
}
break;
case 9 :
createPart(z._x + 24, z._y - 5, "damage1", levelmap.getNextHighestDepth(), 1);
z.scale = 14;
z.scaleon = true;
}
}
if (z.hp < 1) {
if (z.cargo > 0) {
if (z.type == 10) {
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, z.cargonum, z.food);
} else if ((z.type == 3) || (z.type == 6)) {
createPrize(z._x, z._y + z.bird._y, 2 + z.food.type, 1, z.food);
} else {
createPrize(z._x + 24, z._y + 18, 2 + z.food.type, 1, z.food);
}
}
dieEnemy(z);
} else {
z.hpbar._visible = true;
z.hplowbar._visible = true;
z.hpbor._visible = true;
z.hpbar._xscale = z.hp;
}
}
};
_global.attackSpider = function (z) {
if (z.die == false) {
z.die = true;
if (z.cargo > 0) {
createPrize(z._x, z._y, 2 + z.food.type, 1, z.food);
z.cargo = (z.bird.grib._visible = false);
z.food = undefined;
}
dieEnemy(z);
}
};
_global.attackTree = function (z, dam, type) {
if (z.img._currentframe != 5) {
z.hp = z.hp - dam;
z.act = 1;
z.scale = z.scale + (dam * 6);
if (z.scale > 10) {
z.scale = 10;
}
if (z.cry == 1) {
if (z.hp < 1) {
achi[25]++;
addStat(20, 1);
}
playSoundLim("cryd1", "cryd2");
dam = z.img._currentframe;
z.img.gotoAndStop(1 + Math.floor((80 - z.hp) / 20));
if (dam < z.img._currentframe) {
createPrize(z._x, z._y - 30, 9, (z.img._currentframe - dam) * 5, z._currentframe - 1, 0);
playSound("crydie");
}
} else {
if (z.cry == 0) {
if (z.normtree == true) {
parttype = "list";
} else {
parttype = choose("bushflow", "list");
}
} else {
parttype = "hulk4";
playSoundLim("laird1", "laird2");
}
if (z.img._currentframe != 4) {
if (effect == true) {
if (type != 1) {
createPart(levelmap._xmouse, levelmap._ymouse, parttype, levelmap.getNextHighestDepth(), dam, z._currentframe);
} else {
dam = (6 - z.img._currentframe) * 5;
while (dam--) {
createPart((z._x - 75) + random(150), (z._y - 30) - random(130), parttype, levelmap.getNextHighestDepth(), 1, z._currentframe);
}
}
}
}
if (z.hp < 1) {
if (z.cry == 0) {
achi[9]++;
addStat(19, 1);
playSound("box2");
dam = 10;
while (dam--) {
createPart((z._x - 75) + random(150), (z._y - 30) - random(130), "chip", levelmap.getNextHighestDepth(), 1, z._currentframe);
}
createPrize(z._x, z._y - 40, 1, 2 + random(2), 0);
} else {
bankLair--;
addStat(25, 1);
ii = bankEnemy.length;
while (ii >= 0) {
if (z == bankEnemy[ii].lair) {
if (bankEnemy[ii].type == 9) {
attackSpider(bankEnemy[ii]);
} else {
attackEnemy(bankEnemy[ii], 500, 0);
}
}
ii--;
}
playSound("lairdie");
dam = 10;
while (dam--) {
createPart((z._x - 70) + random(140), (z._y + 50) - random(100), "hulk4", levelmap.getNextHighestDepth(), 1, z._currentframe);
}
createPrize(z._x, z._y, 2, 8, 0);
createPart(z._x, z._y, "explo1", levelmap.getNextHighestDepth(), 1);
}
z.img.gotoAndStop(6);
z.info.removeMovieClip();
} else if (z.cry == 2) {
z.img.gotoAndStop(1 + Math.floor((80 - z.hp) / 20));
} else {
z.img.gotoAndStop(1 + Math.floor((40 - z.hp) / 10));
}
}
}
};
gotoAndStop ("Upgrades");
Frame 45
_global.autoUpgr = function (ob) {
x = 0;
i = 1;
while (i < 10) {
x = x + (6 - upgr[i]);
i++;
}
trace("upgrade_left=" + x);
if (x > 0) {
do {
y = 1 + random(9);
} while (((upgr[y] == 6) || (y == 4)) || (y == 5));
doUpgr(y);
trace((("upgr" + y) + "=") + upgr[y]);
inter_upgr.info = y;
inter_upgr.gotoAndPlay(2);
}
};
_global.initUpgr = function (ob) {
trace("FUNCTION CUUUUUUUUUUUT!!!!!!");
};
_global.reUpgr = function (ob) {
ob.but1.title = str_upgr_1;
ob.but2.title = str_upgr_2;
ob.but3.title = str_upgr_3;
ob.but4.title = str_upgr_4;
ob.but5.title = str_upgr_5;
ob.but6.title = str_upgr_6;
ob.but7.title = str_upgr_7;
ob.but8.title = str_upgr_8;
ob.but9.title = str_upgr_9;
ob.curweap.text = _root["str_upgr_10" + upgr[10]];
ob.but10.title = _root["str_upgr_10" + (upgr[10] + 1)];
ob.but11.title = str_upgr_11;
ob.but12.title = str_upgr_12;
ob.but13.title = str_upgr_13;
ob.but14.title = str_upgr_14;
ob.but1.cost = Math.round((400 * upgr[1]) * (upgr[1] / 2));
ob.but2.cost = Math.round((300 * upgr[2]) * (upgr[2] / 2));
ob.but3.cost = Math.round((300 * upgr[3]) * (upgr[3] / 2));
ob.but4.cost = Math.round((250 * upgr[4]) * (upgr[4] / 2));
ob.but5.cost = Math.round((300 * upgr[5]) * (upgr[5] / 2));
ob.but6.cost = Math.round((350 * upgr[6]) * (upgr[6] / 2));
ob.but7.cost = Math.round((150 * upgr[7]) * (upgr[7] / 2));
ob.but8.cost = Math.round((100 * upgr[8]) * (upgr[8] / 2));
ob.but9.cost = Math.round((500 * upgr[9]) * (upgr[9] / 2));
switch (upgr[10]) {
case 1 :
ob.but10.cost = 300;
break;
case 2 :
ob.but10.cost = 1000;
break;
case 3 :
ob.but10.cost = 3000;
break;
case 4 :
ob.but10.cost = 7000;
break;
case 5 :
ob.but10.cost = 12000;
break;
case 6 :
ob.but10.cost = 20000;
break;
case 7 :
ob.but10.cost = 35000;
break;
case 8 :
ob.but10.cost = 60000;
break;
case 9 :
ob.but10.cost = 99000 /* 0x0182B8 */;
}
ob.but11.cost = 1990;
ob.but12.cost = 19990;
ob.but13.cost = 49990;
ob.but14.cost = 99990 /* 0x018696 */;
i = 1;
while (i < 15) {
z = ob["but" + i];
if (lowprice == true) {
z.cost = Math.round(z.cost / 2);
}
if (z._currentframe < 3) {
z.id = i;
if (upgr[i] > 10) {
z.gotoAndStop(4);
} else if (z.cost > _root.money) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
z.lv.gotoAndStop(upgr[i]);
z.cost_txt = z.cost + "$";
}
z.icon.gotoAndStop(i);
i++;
}
ob.warweap.gotoAndStop(upgr[10]);
if (upgr[10] < 10) {
ob.but10._visible = true;
ob.but10.icon.weap.gotoAndStop(upgr[10]);
} else {
ob.but10._visible = false;
}
};
_root.vipChange = function () {
autoclick = false;
automagnet = false;
randweap = false;
unlimammo = false;
if (upgr[11] == 11) {
autoclick = true;
}
if (upgr[12] == 11) {
automagnet = true;
}
if (upgr[13] == 11) {
randweap = true;
}
if (upgr[14] == 11) {
unlimammo = true;
}
};
_global.doUpgr = function (z) {
if (z < 11) {
upgr[z]++;
setUpgr();
} else {
upgr[z] = 11;
gamemenu["but" + z].selback._visible = true;
vipChange();
}
getUpgrDone();
setStat(6, upgr_done);
weap_done = _root.upgr[10];
setStat(5, upgr[10]);
};
_global.getUpgrDone = function () {
upgr_done = 0;
i = 1;
while (i < 10) {
upgr_done = upgr_done + (upgr[i] - 1);
i++;
}
weap_done = upgr[10];
};
_global.reHint = function (ob, x) {
if (x == 0) {
y = 12;
} else if (hintin[x].length == undefined) {
y = 0;
} else {
y = hintin[x].length;
}
i = 1;
while (i <= y) {
z = ob["t" + i];
if (z != undefined) {
if (x == 0) {
z.newimg._visible = false;
x1 = ob._currentframe;
x2 = i;
} else {
z._visible = true;
z.newimg._visible = true;
x1 = hintin[x][i - 1][0];
x2 = hintin[x][i - 1][1];
}
z.img.gotoAndStop(x1);
z.img.img.gotoAndStop(x2);
z.title = _root[(("str_hint_" + x1) + "") + x2][0];
z.desc = _root[(("str_hint_" + x1) + "") + x2][1];
}
i++;
}
};
showHint = function () {
i = 1;
while (i < 13) {
z = ob.hints["t" + i];
if (z != undefined) {
z.newimg._visible = false;
z.img.gotoAndStop(ob.hints._currentframe);
z.img.img.gotoAndStop(i);
z.title = _root[(("str_hint_" + ob.hints._currentframe) + "") + i][0];
z.desc = _root[(("str_hint_" + ob.hints._currentframe) + "") + i][1];
}
i++;
}
};
gotoAndStop ("Game");
Frame 55
mode1lvl1 = "00000000000000000000000000000000000000000500000000000000000000000500000000000000000000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000002000000000000000002000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000400000000000000000000000000000000000000000000000005000000000000000000000005000000000000000000000000000000000000";
mode1lvl2 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000020000000000000000020000000200000000000000000000000000000000000000000000";
mode1lvl3 = "00000000000000000000000000000000000000000000000002000000020000000000000000000200000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000040000000000000004000004000004000000000000000000000000000000000000000000";
mode1lvl4 = "00000000000000000000000000000000000000000000000000020000000000000000000000000200000000000000020000040000000000000004000000000000000000000000000000000000000400000004000000000000000004000000000000000000020000000002000000000200000400000000000000000000000000000000000000000000000000000004000000020000000200040000000002000000000000000400000000000000000000000400000000000000000200000000020000000000020000000000000000000000000004000000000004000000000000000000000000000000000000000400000000020000040000000200000000000000000000000000000000000000000200000000000000000000000000000000000000";
mode1lvl5 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000040000000000000004000004000004000000000000000000000000000000000000000000";
mode1lvl6 = "00000000000000000000000000000000000000000000000400000400000400000000000000040000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000020000000000000000020000000200000000000000000000000000000000000000000000";
mode1lvl7 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000005000000000000000000000000000000000000000000000300000000000000000000030000000000000000030000030000030000000000000000000000000000000000000000";
mode1lvl8 = "00000000000000000000000000000000000000000200000000000400000000000200000000000000040000000000040000000000000000040000000000000000000400000000000000000000000000000000000000000000040000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000040000000000000000000000000000000000000000000004000000000000000000040000000000020000040000000000040000000000000000000000000004000000000002000000000000000000000000000000000000";
mode1lvl9 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000020000000200000002000000000000000000000000000000000000";
mode1lvl10 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000004000000000000000000000000000000000000";
mode1spw1 = [[4, 30], [9, 45]];
mode1spw2 = [[5, 50]];
mode1spw3 = [[2, 40]];
mode1spw4 = [[3, 45], [6, 60]];
mode1spw5 = [[1, 40]];
mode1spw6 = [[0, 30]];
mode1spw7 = [[8, 45]];
mode1spw8 = [[7, 50]];
mode1spw9 = [[10, 40]];
mode1spw10 = [[1, 95], [2, 100], [3, 120], [4, 130], [5, 60], [6, 110], [7, 180], [8, 80], [9, 120], [10, 250], [0, 125]];
mode1achi1 = [[20, 3], [20, 6], [20, 10]];
mode1achi2 = [[20, 3], [20, 6], [20, 10]];
mode1achi3 = [[20, 3], [20, 6], [20, 10]];
mode1achi4 = [[20, 3], [20, 6], [20, 10]];
mode1achi5 = [[20, 3], [20, 6], [20, 10]];
mode1achi6 = [[20, 3], [20, 6], [20, 10]];
mode1achi7 = [[20, 3], [20, 6], [20, 10]];
mode1achi8 = [[20, 3], [20, 6], [20, 10]];
mode1achi9 = [[20, 3], [20, 6], [20, 10]];
mode1achi10 = [[20, 3], [20, 6], [20, 10]];
mode2lvl1 = "00000000000000000000000000000000000000000000000000000000001800000000000000080000000000150010001100000000000000000100000100190000001100000000000001000001000000000000001300000000040000000100000034000000100000000000000000010000000000001000000000000000000001000000000016000000000000000000000001000000010013000000000000040000000001010100000000000000000000000000000000000000000000000000000000000000000000000100000000000000020004000000000001000000000000000000000000000000000000080000000000000000000000040000000000000000000000000002000000000000040000000000000000000000000000000000000000";
mode2lvl2 = "00000000000000000000000000000000000000000000000000000000000002000000000008000001000000000000000000040000000000012000000000000000000000000000000000010000000000000000000200000800000000000000010000000000000000000000000034000140010000000004000000000100000000000100000000000000000001200000000000010101010101010000000001000000000001000000000000000000000000003400014001000000000400000800000000000000010000000000000000000000000100000000000000000002000000000001200000000000000000000000000008000001000000000000000000040000000000000000000000000000020000000000000000000000000000000000000000";
mode2lvl3 = "00000000000000000000000000000000000000080000000000000000000000000800000000010000000000000000000001000000000000200000000101000000210000000000000000001201000001150000000000000000000014000000000000130000000000000000000100530030000001000000000000000001000000000000000001000000000001000100300000005300000100010000000000010000000000000000010000000000000000010053003000000100000000000000000015000000000000120000000000000000000013010000011400000000000000000020000000010100000021000000000000010000000000000000000001000000000800000000000000000000000008000000000000000000000000000000000000";
mode2lvl4 = "00000000000000000000000000000000000000000000000000000000000000000000000000000002000001010000000000020000000020000000010007010000200000000000000000000400000000000004000000000000000000000000000000000000000000000000010000003000000000010000000000000100000000000000000000010000000000014100300000003000004101000000000001000000000000000000000100000000000001000000300000000001000000000000000000000000000000000000000000000000000004000000000020040000000000000000200001000701000000000000000000000002000001010000000000020000000000000000000000000000000000000000000000000000000000000000000000";
mode2lvl5 = "00000000000000000000000000000000000000000000000000000000000012000000000000000003000000002000100000080000000000000000000000011400070000000000000000000000000156010000000000000000030000002100120100000000000000000000000023001000005600330000000000000000000014500000000000000000000000050000010001005600330000000000000000000000155000000000000000000000000000002300110000560033000000000000030000002100130100000000000000000000000000000001560100000000000000000000000000000001150007000000000000000003000000002000110000080000000000000000000000000000130000000000000000000000000000000000000000";
mode2lvl6 = "00000000000000000000000000000000000000000000000005000000030000000000000000000300000000000000000000030000000000000000000000000000000000000000000022000000430000002200000000000000050000000000000000000000050000000000000030000800300000000000000000000000000000000000000000000000000043000300080030000800000043030000000000000000000000000000000000000000000000003000080030000000000000000000050000000000000000000000050000000000220000004300000022000000000000000000000000000000000000000000000000000300000000000000000000030000000000000000000300000500000000000000000000000000000000000000000000";
mode2lvl7 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000020000020000000000060200000000000006000000000000000000000000000400000400000000000000000000040000000000003100000000000002000000010001000000000000000000000000000154015401003100010000000000000004000154010000000000000000000000000001540154010031000100000000000200000001000100000000000000000000000000040000000000003100000000000000000000000004000004000000000000000006020000000000060000000000000000000000000002000000020000020000000000000000000000000000000000000000000000000000000000000000000000";
mode2lvl8 = "00000000000000000000000000000000000000000000000004000000000000000000000000004202000000010001010100010000000000000000000000010000000100000000000000020000000001003200010000000000000000000012000100000000000000000000020000160023000101004208000000000000000000170001000000000000000000000400001600220000320001000000000000000000001700010000000000000000000002000016002400010100420800000000000000000013000100000000000000000000000200000000010032000100000000000000000000000001000000010000000000004202000000010001010100000000000000000000040000000000000000000000000000000000000000000000000000";
mode2lvl9 = "00000000000000000000000000000000000000000000000004000000020000000000000057001500000000000000000000040000000000011121000004000000020000000000150157011100000000000000000000000000110100011121000004000000020000000007110157011100000000000000000000040000110100001121000004000000000000000007110034001100000000000000000000040000110000011121000004000000000000000006110157011100000000000000020000040000110100011121000000000000000000000007110157011100000000000000020000040000110100011300000000000000000000000007110157000000000004000000020000040000130000000000000000000000000000000000000000";
mode2lvl10 = "00000000000000000000000000000000000000000002000000000000000000020000000000000000000008000000000000000000000004000800004400000800000004000000000000000001000100000000000000000000080001000021000001000800000000000000000032000000320000000000000000000001000000210000000100000000000008000020002200230024000008000000000000010000002100000001000000000000000000003200000032000000000000000000080001000021000001000800000000000000000000010001000000000000000000000400080000440000080000000400000000000000000008000000000000000000000000020000000000000000000200000000000000000000000000000000000000";
mode2lvl11 = "00000000000000000000000000000000000000000018000000010000000018000000000000100011000000000000100011000000001600060013000100001400060017000000001100070000580000000700100000000000001300000001000000001400000000000100000030000000300000000100000000000000000000000000000000000000000001003000000030000000300001000000000000000000000000000000000000000000010000003000000030000000010000000000001200000001000000001500000000000010000700005800000007001100000000160006001200010000150006001700000000110010000000000000110010000000000000190000000100000000190000000000000000000000000000000000000000";
mode2lvl12 = "00000000000000000000000000000000000000000000000100000000000000000800000000000004000100000000000000000000000100000000002400000000000000000000000100000004000145003400000000000000000100000000000100000000000000000000002200000004230101010101000000005000000100000000000000000000000000000034000000000002000400040000000050000001000000000000000000000000000000220000000423010101010100000000000100000000000100000000000000000001000000040001450034000000000000010000000000240000000000000000000000000004000100000000000000000000000000000001000000000000000008000000000000000000000000000000000000";
mode2lvl13 = "00000000000000000000000000000000000000000000000200000400000200000000000000000000002100210000000000000000000000000015000600120000000004000000000200000011001000000000000000000000150001000019000001000000020000000400110001000000010000120000000000002000110000000000001000200000000000000600170034000016000600000000000020001000000000000011002000000000040010000100000001000013000000000000140001000018000001000000020000000002000000100011000000000000000000000000001400060013000000000400000000000000002100210000000000000000000000000002000004000002000000000000000000000000000000000000000000";
mode2lvl14 = "00000000000000000000000000000000000000000000010000000001000000000000000000000200000000040000000000020000000000000000000000000000000000000000000000000600000000060000000000000000000200000000040000000000020000000000000100000000000100000000000000000000000100003101000000000000000000000206003155000000060000020000000000000001000031010000000000000000000000010000000000010000000000000000000200000000040000000000020000000000000006000000000600000000000000000000000000000000000000000000000000000200000000040000000000020000000000000100000000010000000000000000000000000000000000000000000000";
mode2lvl15 = "00000000000000000000000000000000000000080000000000000000000000000800000000000000010107010100000000000000000000060100000000000100060000000000000100000000240000000100000000000000010022000000000023000100000000000100000000010101000000000100000000010000000100000001000000010000000100002200010030000100230000010000000100000001000000010000000100000000010000000001010100000000010000000000010022000000000023000100000000000001000000002400000001000000000000000006010000000000010006000000000000000000010107010100000000000000000800000000000000000000000008000000000000000000000000000000000000";
mode2spw1 = " 5251 5152 525152515251";
mode2spw2 = " 1414 131114 13131111 141414";
mode2spw3 = " 8383 818181 84848484 8282828282";
mode2spw4 = "40 50505040 1010101010 40 80808080808080";
mode2spw5 = " 22 2222 222222 13131311111144 2222222222";
mode2spw6 = " 919090 9190909090 91909090909090 9190909090909090";
mode2spw7 = " 6060 92 606060 95 60606060 40 6060606060 92 606060606060";
mode2spw8 = " 2222912222229170 70 912222227222229170707091222272227222722214141414";
mode2spw9 = " 00 00 00 009800 00 0000600000980000 0000400000009800000060000000000000";
mode2spw10 = "905050505091901010101090918080808090916060606091902020202091900000000090917070 7070";
mode2spw11 = " 303030 99 30303030 34 3030303030 99 303030303030 34 3030383030303830303038303030";
mode2spw12 = "508050809110001000916090609091201020109170507050800080009130603060910020002091703070309100000000";
mode2spw13 = " 05 05 05 05 05 2020 202020 0505 0505 0505 2070202070207020 36 050505 050505";
mode2spw14 = "998381838183818381838140351311131113111311131140950301030103010301030140332321232123212321232140960806080608";
mode2spw15 = "913750108020309070600005913750108020309170600005913750108020309070600005913750108020379070600005913750108020309070600005";
mode2achi1 = [[3, 10], [6, 10], [18, 5]];
mode2achi2 = [[0, 12], [11, 3], [17, 2]];
mode2achi3 = [[22, 14], [12, 2], [19, 3]];
mode2achi4 = [[2, 3], [25, 2], [17, 4]];
mode2achi5 = [[16, 10], [26, 2], [18, 15]];
mode2achi6 = [[23, 23], [13, 4], [7, 23]];
mode2achi7 = [[25, 4], [9, 10], [8, 2]];
mode2achi8 = [[5, 9], [14, 1], [18, 9]];
mode2achi9 = [[21, 26], [16, 6], [12, 5]];
mode2achi10 = [[26, 1], [13, 1], [14, 1]];
mode2achi11 = [[1, 30], [25, 4], [17, 7]];
mode2achi12 = [[22, 4], [5, 4], [9, 9]];
mode2achi13 = [[24, 17], [11, 4], [12, 4]];
mode2achi14 = [[15, 2], [23, 3], [25, 6]];
mode2achi15 = [[25, 6], [10, 5], [14, 2]];
mode3lvl = "00000000000000000000000000000000000000000000020004000002000400000000000000000000000000000000000000020000000004000000001800180000000000000000000001000010001900110000000000000100000000100000000000130000000000000001001600003200000100000100000000000000001300000000000000000000000001000100000000010032000100000000000000000012000000000000000000000000000100160000320000010000010000000100000000110000000000120000000000000000010000110018001000000000000000000400000000190019000000000000000000000000000000000000000000020000000000000200040000020004000000000000000000000000000000000000000000";
mode4lvl1 = "00000000000000000000000000000000000000000000000000000000000000000200000000001800120000000004000000000000000010001900000000000000000002000000160020000000080000000004000000000000110001000000000000000000000000000000110001000000000100000004000000000000170001000001000000000000000008001600000001010000000000000000000000001700000101000000080000000000000010000001000001000000000000000000100000010000000001000000120000001600003400001800180001001600000000001100000010001900110006001700000000001100100000000000110010000000000000001900000008000000190000000000000000000000000000000000000000";
mode4lvl2 = "00000000000000000000000000000000000000000018000000000000000000000100000000100011000008000000040000020000001000420011000000000000000001000016004100410017000000000000000100000011004200100000000000000200040000000017001600000000000000000001000000100000001300000000000000000100001600003400000101000000040000020000001100000012000000000000000001000000001700160000000000000000000100000010004400110000000000000200040000160045004500170000000000000001000000110044001000000000000000000100000000110010000008000000040000020000000000190000000000000000000001000000000000000000000000000000000000";
mode4lvl3 = "00000000000000000000000000000000000000000100000001000100000001000000000001000100010001000100010001000000000000060100000000000100060001000000010001000100300001000100010000000000010000000000000000000100000000000100010030000100300001000100000001000000000000000000000000000100000001003000010030000100300001000000010000000000000000000000000001000000010001003000010030000100010000000000010000000000000000000100000000000100010000003000010001000100000000000006010000000000010006000100000001000100010001000100010001000000000001000000010001000000010000000000000000000000000000000000000000";
mode4lvl4 = "00000000000000000000000000000000000000000000000000020000000200000000000000000200000000000000000000020000000000002000000000002000000000000000000020002000000020002000000000000000200032002000200032002000000000000000200001000000010020000000000000000000200001000100200000000000000000020000000001000000000000040000000000002000010001002000000000000000000020000100000001002000000000000000200032002000200032002000000000000000200020000000200020000000000000000000200000000000200000000000000000000200000000000000000000020000000000000000000200000002000000000000000000000000000000000000000000";
mode4lvl5 = "00000000000000000000000000000000000000000000080000000000000800000000000008000000000100060100000000080000000000070100000000000001070000000000000100005600560056000001000000000001000057000000000056000001000000000100570000010101000056000100000000010057000100000001005600010000000000065700010032000100560006000000000100570001000000010056000100000000010057000001010100005600010000000001000057000000000056000001000000000001000057005700570000010000000000000007010000000000000107000000000008000000000100060100000000080000000000000800000000000008000000000000000000000000000000000000000000";
mode4lvl6 = "00000000000000000000000000000000000000000000000002000000000002000000000000000200000000000200000000020000000000000000000000000000000000000000000400000000010000000000000400000000000100010001000100010000000000000001000100010001000100010000000000010000000000000000000000010000000001003100310031003100310001000000000100000000000000000000000100000000000100010001000100010001000000000000000100010001000100010000000000000004000000000100000000000004000000000000000000000000000000000000000000000200000000000200000000020000000000000000020000000000020000000000000000000000000000000000000000";
mode4lvl7 = "00000000000000000000000000000000000000000000000004000004000004000000000000000400000000000000000000040000000000002100000000002100000000000000000021002100000021002100000000000000210032002100210032002100000000000000210001000000010021000000000000000000210001000100210000000000000000040000000001000000000000040000000000002100010001002100000000000000000021000100000001002100000000000000210032002100210032002100000000000000210021000000210021000000000000000000210000000000210000000000000000000400000000000000000000040000000000000000040000040000040000000000000000000000000000000000000000";
mode4lvl8 = "00000000000000000000000000000000000000000000000000000003000000000000000000000003000000000000000003000000000000000000000000000000000000000000000000000000310000000000000000000000030000000000000000000000050000000000003100002400003100000000000000000000000000000000000000000000000000000322000034000022000000030000000000000000000000000000000000000000000000310000240000310000000000000000030000000000000000000000050000000000000000003100000000000000000000000000000000000000000000000000000000000003000000000000000003000000000000000000000000030000000000000000000000000000000000000000000000";
mode4lvl9 = "00000000000000000000000000000000000000000018000000000000000000000000000000100011000008000000050000030000001055550011000000000000000000000016005454000017000000000000000000000011535300100000000000000300050000000017001600000000000000000000000000100000001300000000000000000000001600003200000000000000050000030000001100000012000000000000000000000000001700160000000000000000000000000010565600110000000000000300050000160057570000170000000000000000000000115858001000000000000000000000000000110010000008000000050000030000000000190000000000000000000000000000000000000000000000000000000000";
mode4lvl10 = "00000000000000000000000000000000000000000000000000030000000300000000000000000300000000000000000000030000000000002200000000002200000000000000000023002200000022002300000000000000220032002200220032002200000000000000220001000000010022000000000000000000220001000100220000000000000000050000000001000000000000050000000000002200010001002200000000000000000022000100000001002200000000000000220032002200220032002200000000000000230022000000220023000000000000000000220000000000220000000000000000000300000000000000000000030000000000000000000300000003000000000000000000000000000000000000000000";
mode4lvl11 = "00000000000000000000000000000000000000000000000000020000000000000000000000000200000000000000020000040000000000000004000000000000000000000000000000000000000400000004000000000000000004000000000000000000020000000002000000000234000400000000000000000000000000000000000000000000000000000004340000020000000200040000000002000000000000000400000000000000000000000400003400000000000200000000020000000000020000000000000000000000000004000000000004000000000000000000000000000000000000000400000000020000040000000200000000000000000000000000000000000000000200000000000000000000000000000000000000";
mode4lvl12 = "00000000000000000000000000000000000000000000020001000100000000020000000000000000010101010100000000000000000004000100000000000100000004000000000001000000300000000100000000000000000100300000003000010000000000000001000000000100000000010000000001010100300001000600300001010100000000230000000007000000000023000000010101003000010006003000010101000000000100000000010000000001000000000000000100300000003000010000000000000000010000003000000001000000000000000400010000000000010000000400000000000000010101010100000000000000000000000200010001000000000200000000000000000000000000000000000000";
mode4lvl13 = "00000000000000000000000000000000000000000000000000000000000000000000000000010000000001000000000000000000000000000700010000070000000000000000000100000000000000000000070000000000000100010000320001000001000000000000000000000000000000000000000000000700320001000000010000010000000000000000000000060000000000000000000000000000010000003200000700000000000100010000000100000000000000000001000000003200000000010001000000000000070100000000000000000000000000000000000000070001000007010000000000000000010000000000000100000000000000000000000000000000000000000000000000000000000000000000000000";
mode4lvl14 = "00000000000000000000000000000000000000000000000003000000000003000000000000000300000000000300000000030000000000000000000000000000000000000000000500000000010000000000000500000000000100010001000100010000000000000001000100010001000100010000000000010000000000000000000000010000000001003100310031003100310001000000000100000000000000000000000100000000000100010001000100010001000000000000000100010001000100010000000000000005000000000100000000000005000000000000000000000000000000000000000000000300000000000300000000030000000000000000030000000000030000000000000000000000000000000000000000";
mode4lvl15 = "00000000000000000000000000000000000000000400000000000000000000000400000000000000010000000100000000000000000000010000000800000001000000000000000000000000060000000000000000000000000800000000000000080000000000000100000700010101000700000100000000000000000100000001000000000000000000080700010030000100070800000000000000000001000000010000000000000000010000070001010100070000010000000000000800000000000000080000000000000000000000000600000000000000000000000001000000080000000100000000000000000000010000000100000000000000000004000000000000000000000004000000000000000000000000000000000000";
mode4spw1 = " 08 09 08 09";
mode4spw2 = "242424242424242424242424242424242424242424242424242424242424242424242424";
mode4spw3 = "80948090809480908090809480908090809080948090804080908090809480908090809080908092";
mode4spw4 = "5050505050508080808080801010101010102020202020200000000000000505050560606060603030303030";
mode4spw5 = " 10001000100010009200100010001000100010009900100010001000100010009600100010001000050005000500";
mode4spw6 = "31323334353631323334353606 08 064008 06 0806 0806 0806400806 080608 06080640080608 060806080608";
mode4spw7 = "9898989850505050505050501010101010101010808080808080808020202020202020200000000000000000050505056060606030303030";
mode4spw8 = "997070709170707034707070917070709970707091707070347070709170707099707070917070703470707091707070997070709170707091707070";
mode4spw9 = " 2424242424242424242444242424242424242424242444242424242424242424242444242424242424242424242444242424242424242424242424";
mode4spw10 = "505050505050509180808080808080911010101010101091202020202020209100000000000000910505050505050591606060606060609130303030303030915080102000056030";
mode4spw11 = "808080808080808080808040606060606060606060606040909090909090909090909040707070707070707070707070";
mode4spw12 = "999060309060379060309060349060309060309060309060999060309060309060309060349060309160309060309060999060309060309060309060349060309060309060309060";
mode4spw13 = "808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080";
mode4spw14 = "94959697989994959697989906 08 069408 06 0806 0806 0806950806 080608 06080699080608 06080608 060806089606080608 0608060806920806080608";
mode4spw15 = "903050108020309070600005903050108020309070600005903050108020309070600005903050108020309070600005903050108020309070600005";
mode4achi1 = [[24, 4], [11, 1], [25, 1]];
mode4achi2 = [[9, 10], [10, 5], [18, 5]];
mode4achi3 = [[8, 1], [25, 4], [17, 9]];
mode4achi4 = [[1, 5], [4, 5], [11, 28]];
mode4achi5 = [[16, 30], [25, 8], [15, 1]];
mode4achi6 = [[1, 12], [2, 3], [17, 5]];
mode4achi7 = [[23, 4], [12, 28], [19, 22]];
mode4achi8 = [[5, 45], [13, 2], [14, 2]];
mode4achi9 = [[19, 10], [10, 5], [18, 5]];
mode4achi10 = [[21, 8], [13, 5], [17, 4]];
mode4achi11 = [[22, 11], [4, 11], [23, 11]];
mode4achi12 = [[25, 3], [26, 2], [17, 10]];
mode4achi13 = [[25, 3], [25, 6], [25, 9]];
mode4achi14 = [[15, 3], [16, 3], [10, 3]];
mode4achi15 = [[1, 10], [9, 4], [25, 8]];
mode5lvl1 = "00000000000000000000000000000000000000000000000000000000000000000500000000000000000000030000000000000000000000030000000000000000070000000000000000000500000000000000000000000000000000000000000034000000000000000000030000000000000000000000000000000000004200000000000000000000000000050000000000000000000000050000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000010003000000000076000000000000000000000000000000000000000000000000050000000500000000000000000000000000000000000000000003000000000003000000000300000000000000000000000000000000000000";
mode5lvl2 = "00000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000050000000000000071000073000000000000000000000000000000000000000000000000000000030000000000000000000000030000000000000000002100000000000000000000000000000000000000000000000000000000000300005400540000000000050000000000000000000000000000000000000000000000000000070000000000000000000000030000000000000000000000030000000000000000000000000000000000000000000000000032000032000000000000000000000300000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000";
mode5lvl3 = "00000000000000000000000000000000000000000300000000000000050000000300000000000000000000030000000000000000000000000000000000000000000005000000007200000000000000340000000000000000000000000000000000000000000000000000000000004500000000000003000000030000000000000000000000000000000000000000000006000000000000000000000000030000000000000000000005000000000000000000450000000000000000000003000000000000000000000000000000000000340000000000000072000000000000000000000000000000000000000000000000030000000000050000000000000000000000000005000000000000000005000000000000000000000000000000000000";
mode5lvl4 = "00000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000030000000074000000000000002300000000000000000000000000000000000000000000000000030000000000000050003200000000000000000000030000000000000000000000000000000000000007000000000000000076000000000000000000000032000000000000000000000000070000000000000000000000000003000000000000000000000000030000000000000050003200000000000000000000000000000000000000000000007400000000000000230000000000000000000000000000000000000000030000000000000000000000000300000000000000000000000000000000000000000000";
mode5lvl5 = "00000000000000000000000000000000000000000003000000000003000000000500000000000000000000000000000000000000000032000000005300000000320000000000000000000000000000000000000000000000050053000000000053000000050000000000000000750000000000000000000000000000000000000000000000000000000000530075000006750000005300000000000000000000000000000000000000000000000000000075000000000000000000000000050053000000000053000000050000000000000000000000000000000000000000003200000000530000000032000000000000000000000000000000000000000000000000030000000000030000000005000000000000000000000000000000000000";
mode5lvl6 = "00000000000000000000000000000000000000000500000000000003000000000500000000000000000000000000000000000000007100000000000000000074000000000000000000000000000000000000000000000000000000580000005800000000000000000003000000003200000000000005000000000000000000000000000000000000000000005800320006003200580000000000000000000000000000000000000000000000000300000000320000000000000500000000000000580000005800000000000000000000000000000000000000000000000000730000000000000000007600000000000000000000000000000000000000000000000005000000000000030000000005000000000000000000000000000000000000";
mode5lvl7 = "00000000000000000000000000000000000000000000000000000000000000000000000000030000030000030000030000030000000000000000000000000000000000000000740000005700000057000000330000000000000000000000000000000000000000000006000003000003000003000003000000000000000000000000000000000000000074000000570000005700000032000000000000000000000000000000000000000000000600000300000300000300000300000000000000000000000000000000000000007400000057000000570000003200000000000000000000000000000000000000000000000300000300030000030000030000000000000000000000000000000000000000000000000000000000000000000000";
mode5lvl8 = "00000000000000000000000000000000000000000003000000000000000000000300000000000032003200320032000000000000000006000000000000000000000600000000000000000000000000000000000000000000050056005600560056000000050000000000000000000000000000000000000000000500000000000000000000000500000000000056005600560056000000000000000005000000000000000000000005000000000000000000000000000000000000000000050056005600560056000000050000000000000000000000000000000000000000000500000000000000000000000500000000007601760176007600000000000000000000030000000000000000000003000000000000000000000000000000000000";
mode5lvl9 = "00000000000000000000000000000000000000000300000003000000000000030000000000000000000000000003000000000000000000000000000000000000000005000000007700000000060000000003000000000000000000000000000000000000000000000000000000000000420000000003000000000000000055000000000000000000000003000600000034000000060000050000000000000000000000000000000000000000000003004200000000000000000000000000000000000000000000000000000000000000000003000600007700000000000000000500000000000000000000000000000000000000000003000000000000000000000000030000000000000300000005000000000000000000000000000000000000";
mode5lvl10 = "00000000000000000000000000000000000000000000000000000000000000000000000000000021007000000021000000000000000000000000000000000000000000000000007000000000000000700000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000032003200000000000000000070000000200006002000700000000000000000000000320032000000000000000000000000000000200000000000000000000000000000000000000000000000000000000070000000000000007000000000000000000000000000000000000000000000000000000021007000000021000000000000000000000000000000000000000000000000000000000000000000000000000000";
mode5achi1 = [[25, 1], [17, 1], [18, 5]];
mode5achi2 = [[25, 1], [17, 2], [18, 6]];
mode5achi3 = [[25, 1], [17, 2], [18, 10]];
mode5achi4 = [[25, 2], [17, 3], [18, 9]];
mode5achi5 = [[25, 1], [17, 4], [18, 12]];
mode5achi6 = [[25, 1], [17, 4], [18, 12]];
mode5achi7 = [[25, 2], [17, 3], [18, 10]];
mode5achi8 = [[25, 2], [17, 4], [18, 12]];
mode5achi9 = [[25, 4], [17, 1], [18, 5]];
mode5achi10 = [[25, 1], [17, 3], [18, 12]];
mode6lvl1 = "00000000000000000000000000000000000000000000000000040001000000000400000000000400000000000000000000000000000000000001006361616164000100000000000000040000600000006000000000000000000000010060000100600004000000000004010000006000000060000000000000000000000100600004006000010000006161616400000060000000600000000000000000600001006000010067000000000000010060000000600000000000000000000000006000040060000100000000000000000400600000006000000004000100000000000062616161650000000000000000000000000000000000000000000000000000000004010001000100000400000004000000000000000000000000000000000000";
mode6lvl2 = "00000000000000000000000000000000000000000400600000000000000002000000000000000060000000000000000000040000000001006000010001000100000000000000000000600000000000000000000000006161616166616161640001000100000000000000006000000060000000000000000000000100600001006000010001000000000000000060000000600000000000000000000001006261616166616161640000000000000000000000006000000060000000000000010001000100600001006000000000000000000000000060000067000000000000000000000001006261610000000000000000040000000000000000000000000000000000000002000001000001000100000000000000000000000000000000000000";
mode6lvl3 = "00000000000000000000000000000000000000000000000000000200000000000400000000000002000000000000020000000000000000000000000000000067000000000000000463616161666161610000000000000000006000000060000000600000000000000004600001006000010060000004000000000060000000600000006000000000000000046661616166616161660000000000000000600000006000000060000004000000000460000100600001006000000000000000006000000060000000600000000000616161666161616661616165000004000000000060000000000000000000000000000000046000000000000000020000000000000000600000000002000000000004000000000000000000000000000000000000";
mode6lvl4 = "00000000000000000000000000000000000000000000030060006000000000030000000000000000006000600000000000000000000000050063650062640000000005000000000000636500010062640000000000000000006365000001000062640000000000000063650000000100000062640000000000636500000001000100000062640000000060000101010006000101010060000000006264000000010001000000636500000000006264000000010000006365000000000000006264000001000063650000000000000000006264000100636500000000000000000005006264006365000000000500000000000000006267000000000000000000000000000300000000000000000300000000000000000000000000000000000000";
mode6lvl5 = "00000000000000000000000000000000000000000200000000000200000000000200000000000000020000000000020000000000000000000000000000000000000000000000000200636161616161640063616100000000006365000000000060006000000000000063650000636164006000600000000000006000000060006000600060000000000067006161616661666166616661610000000000000000600060006000600000000000006264000060006000626165000000000000006264006000600000000000000000000002006261650062616161616161000000000000000000000000000000000000000000000000020000000000020000000000000002000000000002000000000002000000000000000000000000000000000000";
mode6lvl6 = "00000000000000000000000000000000000000006000006000000100010001000000000000600000600001000000000000010000000160000060000063616161616400000000006000006000006000000000600000000000600000600000600000010060000000010060000060000060000100006000000000006000006000006000000000600000000000600000600067006164000060000000000160000060000000006000006000000000006000006000000000600000600000000000600000626161616165000060000000010060000100000000000001006000000000006000000001000001000000600000000000626161616161616161616165000000000100000000000000000000000001000000000000000000000000000000000000";
mode6lvl7 = "00000000000000000000000000000000000000000060000000000000000000000000000000046000000007000007000007000000000000600000000000000000000000000061616166616661666166616400000000000000006000600060006000600000050000000200606166616661666166000000000000000060006000600060006000000000000000046061666166616661666700000000000000600060006000600060000000000000020060616661666166616600000000000000006000600060006000600000050000616161666166616661666165000000000000000060000000000000000000000000000000046000000007000007000007000000000000600000000000000000000000000000000000000000000000000000000000";
mode6lvl8 = "00000000000000000000000000000000000000600100000001000000010000000100000060006361640063616400636164000000006000600060006000600060006000000000600060006000600060006000600000000060006000600060006000600060000000006000600060006000600060006000000000600060006000600060006000600000000060006000600067006000600060000000006000600060000000600060006000000000600060006000600060006000600000000060006000600060006000600060000000006000600060006000600060006000000000600060006000600060006000600000000062616500626165006261650060000000010000000100000001000000016000000000000000000000000000000000000000";
mode6lvl9 = "00000000000000000000000000000000000000000004000000020000000200000000000100000000000000000000000000040000010060616161616161616400000000000000006000000000000000600000000100006161666161616400636166616400010000000060000000600060006000600001000061616661640060006000626165000100000000600060006000600000006700000000616165006000626166616161000000000000000000600000006000000060000100006161616166616161650063616500010000000000006000000000006000000001000001000000606161616161650000000100000000000400000000000000000000040000000000000000000200000002000000000000000000000000000000000000000000";
mode6lvl10 = "00000000000000000000000000000000000000000400000000000000006000000400000000006361616161616400600000000000000000600000000000600060000000000061616165006361616165006261640000000000000006600000010006000060000000006361640062616400636164006000000000600060010000600060006000600000000060006000636167006500600060000000006000600060000000000160006000000000600062616500626164006261650000000060000006000100006006000000000000006261640063616161650063616161000000000060006000000000006000000000000000006000626161616161650000000000000004600000000000000000000004000000000000000000000000000000000000";
mode6achi1 = [[20, 3], [20, 5], [20, 10]];
mode6achi2 = [[20, 3], [20, 5], [20, 10]];
mode6achi3 = [[20, 3], [20, 5], [20, 10]];
mode6achi4 = [[20, 3], [20, 5], [20, 10]];
mode6achi5 = [[20, 3], [20, 5], [20, 10]];
mode6achi6 = [[20, 3], [20, 5], [20, 10]];
mode6achi7 = [[20, 3], [20, 5], [20, 10]];
mode6achi8 = [[20, 3], [20, 5], [20, 10]];
mode6achi9 = [[20, 3], [20, 5], [20, 10]];
mode6achi10 = [[20, 3], [20, 5], [20, 10]];
mode6spw1 = [[5], [8], [5], [8], [1]];
mode6spw2 = [[5, 5], [8, 8], [1, 1], [4, 4], [0, 0]];
mode6spw3 = [[5, 8], [1, 2], [8, 5], [2, 1], [0, 4]];
mode6spw4 = [[1, 0], [5, 4], [0, 1], [4, 5], [2, 10]];
mode6spw5 = [[5, 5, 5], [1, 1, 1], [0, 0, 0], [2, 2, 2], [10, 10, 10]];
mode6spw6 = [[10, 1], [10, 1], [10, 1], [10, 1], [10, 1]];
mode6spw7 = [[1, 8, 5, 2], [0, 2, 1, 5], [2, 1, 0, 8], [1, 8, 10, 2], [10, 4, 0, 1]];
mode6spw8 = [[10, 4], [2, 0], [4, 10], [0, 2], [10, 0]];
mode6spw9 = [[8, 8, 8, 8], [4, 4, 4, 4], [2, 2, 2, 2], [0, 0, 0, 0], [10, 10, 10, 10]];
mode6spw10 = [[2, 4, 0, 10], [2, 4, 0, 10], [2, 4, 0, 10], [2, 4, 0, 10], [2, 4, 0, 10]];
lvl1p0 = [[8, 1], [8, 2], [8, 3], [8, 4], [8, 4], [9, 4], [10, 4], [11, 4], [12, 4], [13, 4], [13, 5], [13, 6], [13, 7], [13, 8], [12, 8], [11, 8], [10, 8], [9, 8], [8, 8], [7, 8], [6, 8], [5, 8], [4, 8], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [9, 12]];
lvl2p0 = [[1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [9, 5], [9, 6], [9, 7], [9, 8], [9, 9], [9, 10], [9, 11], [9, 12], [9, 13], [10, 13], [11, 13], [12, 13]];
lvl2p1 = [[5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 9], [6, 9], [7, 9], [8, 9], [9, 9], [10, 9], [11, 9], [12, 9], [13, 9], [13, 10], [13, 11], [13, 12]];
lvl3p0 = [[12, 1], [12, 2], [12, 3], [12, 4], [12, 5], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [8, 11], [8, 10], [8, 9], [8, 8], [8, 7], [8, 6], [8, 5], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12]];
lvl3p1 = [[15, 4], [14, 4], [13, 4], [12, 4], [11, 4], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [4, 4], [4, 5], [4, 6], [4, 7], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8], [9, 8], [10, 8], [11, 8], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [7, 12], [6, 12], [5, 12], [4, 12]];
lvl4p0 = [[1, 7], [2, 7], [3, 7], [3, 7], [3, 6], [4, 6], [4, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [8, 2], [9, 2], [9, 3], [10, 3], [10, 4], [11, 4], [11, 5], [12, 5], [12, 6], [13, 6], [13, 7], [14, 7], [14, 8]];
lvl4p1 = [[1, 9], [2, 9], [3, 9], [3, 9], [3, 10], [4, 10], [4, 11], [5, 11], [5, 12], [6, 12], [6, 13], [7, 13], [7, 14], [8, 14], [9, 14], [9, 13], [10, 13], [10, 12], [11, 12], [11, 11], [12, 11], [12, 10], [13, 10], [13, 9], [14, 9]];
lvl5p0 = [[4, 15], [4, 14], [4, 13], [4, 13], [5, 13], [6, 13], [7, 13], [8, 13], [9, 13], [10, 13], [10, 12], [10, 11], [9, 11], [8, 11], [7, 11], [6, 11], [5, 11], [4, 11], [4, 10], [4, 9], [4, 8], [4, 7], [4, 6], [4, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [8, 3]];
lvl5p1 = [[8, 15], [8, 14], [8, 13], [8, 12], [8, 11], [8, 10], [8, 9], [8, 8], [8, 7], [8, 6], [8, 5], [8, 4], [8, 3]];
lvl5p2 = [[12, 15], [12, 14], [12, 13], [12, 12], [12, 11], [12, 10], [12, 9], [12, 9], [11, 9], [10, 9], [9, 9], [8, 9], [7, 9], [6, 9], [6, 8], [6, 7], [7, 7], [8, 7], [9, 7], [10, 7], [11, 7], [12, 7], [12, 6], [12, 5], [11, 5], [11, 4], [10, 4], [10, 3], [9, 3]];
lvl6p0 = [[1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [7, 3], [8, 3], [9, 3], [10, 3], [11, 3], [12, 3], [13, 3], [14, 3], [14, 4], [14, 5], [14, 6], [14, 7], [14, 8], [14, 9], [14, 10], [14, 11], [14, 12], [14, 13], [14, 14], [13, 14], [12, 14], [11, 14], [10, 14], [9, 14], [8, 14], [7, 14], [6, 14], [5, 14], [4, 14], [3, 14], [3, 13], [3, 12], [3, 11], [3, 10], [3, 9], [4, 9], [5, 9], [6, 9], [7, 9], [8, 9]];
lvl6p1 = [[1, 6], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [11, 7], [11, 8], [11, 9], [11, 10], [11, 11], [10, 11], [9, 11], [8, 11], [8, 10], [8, 9]];
lvl7p0 = [[1, 4], [2, 4], [3, 4], [4, 4], [5, 4], [6, 4], [7, 4], [8, 4], [9, 4], [10, 4], [11, 4], [12, 4], [12, 4], [12, 5], [12, 6], [11, 6], [10, 6], [9, 6], [8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 7], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8], [9, 8], [10, 8], [11, 8], [12, 8], [12, 9], [12, 10], [11, 10], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [4, 11], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [8, 13]];
lvl7p1 = [[4, 1], [4, 2], [4, 3], [4, 4], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12], [4, 12], [5, 12], [6, 12], [6, 11], [6, 10], [6, 9], [6, 8], [6, 7], [6, 6], [6, 5], [6, 4], [7, 4], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13]];
lvl7p2 = [[12, 1], [12, 2], [12, 3], [12, 4], [12, 5], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [12, 12], [11, 12], [10, 12], [10, 11], [10, 10], [10, 9], [10, 8], [10, 7], [10, 6], [10, 5], [10, 4], [9, 4], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13]];
lvl7p3 = [[15, 4], [14, 4], [13, 4], [12, 4], [11, 4], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [4, 4], [4, 5], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [12, 6], [12, 7], [12, 8], [11, 8], [10, 8], [9, 8], [8, 8], [7, 8], [6, 8], [5, 8], [4, 8], [4, 9], [4, 10], [5, 10], [6, 10], [7, 10], [8, 10], [9, 10], [10, 10], [11, 10], [12, 10], [12, 11], [12, 12], [11, 12], [10, 12], [9, 12], [8, 12], [8, 13]];
lvl8p0 = [[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [11, 2], [12, 2], [13, 2], [14, 2], [14, 2], [14, 3], [14, 4], [13, 4], [12, 4], [11, 4], [10, 4], [9, 4], [8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [2, 5], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [12, 6], [13, 6], [14, 6], [14, 7], [14, 8], [13, 8], [12, 8], [11, 8], [10, 8], [9, 8]];
lvl8p1 = [[15, 14], [14, 14], [13, 14], [12, 14], [11, 14], [10, 14], [9, 14], [8, 14], [7, 14], [6, 14], [5, 14], [4, 14], [3, 14], [2, 14], [2, 14], [2, 13], [2, 12], [3, 12], [4, 12], [5, 12], [6, 12], [7, 12], [8, 12], [9, 12], [10, 12], [11, 12], [12, 12], [13, 12], [14, 12], [14, 11], [14, 10], [13, 10], [12, 10], [11, 10], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [3, 10], [2, 10], [2, 9], [2, 8], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]];
lvl9p0 = [[5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 7], [6, 7], [7, 7], [8, 7], [9, 7], [9, 8], [9, 9], [9, 10], [9, 11], [9, 12], [9, 13]];
lvl9p1 = [[7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [7, 5], [8, 5], [9, 5], [10, 5], [11, 5], [12, 5], [13, 5], [13, 6], [13, 7], [13, 8], [13, 9], [13, 10], [13, 11], [12, 11], [11, 11], [11, 12], [11, 13], [10, 13], [9, 13]];
lvl9p2 = [[9, 1], [9, 2], [9, 3], [9, 3], [8, 3], [7, 3], [6, 3], [5, 3], [4, 3], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [4, 11], [5, 11], [6, 11], [7, 11], [7, 12], [7, 13], [8, 13]];
lvl9p3 = [[11, 1], [11, 2], [11, 3], [11, 4], [11, 5], [11, 6], [11, 7], [11, 8], [11, 9], [11, 9], [10, 9], [9, 9], [8, 9], [7, 9], [6, 9], [5, 9], [5, 10], [5, 11], [5, 12], [5, 13], [6, 13], [7, 13], [8, 13]];
lvl10p0 = [[1, 12], [2, 12], [3, 12], [4, 12], [4, 12], [4, 13], [4, 14], [5, 14], [6, 14], [7, 14], [8, 14], [9, 14], [10, 14], [10, 13], [10, 12], [9, 12], [8, 12], [7, 12], [6, 12], [6, 11], [6, 10], [7, 10], [8, 10], [8, 9]];
lvl10p1 = [[4, 1], [4, 2], [4, 3], [4, 4], [4, 4], [3, 4], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [3, 10], [4, 10], [4, 9], [4, 8], [4, 7], [4, 6], [5, 6], [6, 6], [6, 7], [6, 8], [7, 8], [8, 8]];
lvl10p2 = [[12, 15], [12, 14], [12, 13], [12, 12], [12, 12], [13, 12], [14, 12], [14, 11], [14, 10], [14, 9], [14, 8], [14, 7], [14, 6], [13, 6], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [11, 10], [10, 10], [10, 9], [10, 8], [9, 8]];
lvl10p3 = [[15, 4], [14, 4], [13, 4], [12, 4], [12, 4], [12, 3], [12, 2], [11, 2], [10, 2], [9, 2], [8, 2], [7, 2], [6, 2], [6, 3], [6, 4], [7, 4], [8, 4], [9, 4], [10, 4], [10, 5], [10, 6], [9, 6], [8, 6], [8, 7], [8, 8]];
mode7lvl = "00000000000000000000000000000000000000000000000000000000000000000000000000040001000100010001000000040000000000000000000000000000000000000000000001003000300030000100000000000000000000000000000000000000000000000001003000325532003000010000000000000000000000000000000000000000000001003000325534003200300001000000000000000000000000000000000000000000000100300032553200300001000000000000000000000000000000000000000000000000010030003000300001000000000000000000000000000000000000000000000000040001000100010001000000040000000000000000000000000000000000000000000000000000000000000000000000";
mode7spw1 = [[5, 30]];
mode7spw2 = [[1, 30]];
mode7spw3 = [[8, 30]];
mode7spw4 = [[0, 30]];
mode7spw5 = [[9, 25]];
mode7spw6 = [[2, 45]];
mode7spw7 = [[6, 30]];
mode7spw8 = [[7, 30]];
mode7spw9 = [[3, 30]];
mode7spw10 = [[10, 40]];
mode7achi1 = [[18, 5], [18, 20], [18, 35]];
mode7achi2 = [[18, 5], [18, 20], [18, 35]];
mode7achi3 = [[18, 5], [18, 20], [18, 35]];
mode7achi4 = [[18, 5], [18, 20], [18, 35]];
mode7achi5 = [[18, 5], [18, 20], [18, 35]];
mode7achi6 = [[18, 5], [18, 20], [18, 35]];
mode7achi7 = [[18, 5], [18, 20], [18, 35]];
mode7achi8 = [[18, 5], [18, 20], [18, 35]];
mode7achi9 = [[18, 5], [18, 20], [18, 35]];
mode7achi10 = [[18, 5], [18, 20], [18, 35]];
mode8lvl1 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000001000000000000000000000000010022000000220001000000000000000000000000000000000000000000000000000001000024000001000000000000000000000000000000000000000000000000000001002200000022000000000000000000000000000001000000010000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl2 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000010022000100220001000000000000000000000000000000000000000000000001002200010022000100000000000000000000000000000000000000000000000000000001002400010024000100000000000000000000000000000000000000000000000100220001002200000000000000000000000000000000000000000000000000000000000100220001002200010000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl3 = "00000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000100000000000000000000000000000000000000000000000100220001002200010022000100000000000000000000000000000000000000010022000100220001002200010000000000000000000000000000000000000000000000010024000100240001002400010000000000000000000000000000000000000001002200010022000100220001000000000000000000000000000000000000000000000001002200010022000100220001000000000000000000000000000000000000000000000001000000010000000100000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl4 = "00000000000000000000000000000000000000000000000000000000000000000000000000000100000100000100000100000000000000002200002200002200002200000000000100000100000100000100000100000000002200002200002200002200000000000000000100000100000100000100000000000000000000000000000000000000000001002401002401002401002400010000000000000000000000000000000000000000000000010000010000010000010000000000002200002200002200002200000000000001000001000001000001000001000000000000220000220000220000220000000000000100000100000100000100000000000000000000000000000000000000000000000000000000000000000000000000";
mode8lvl5 = "00000000000000000000000000000000000000000000000000000000000000000000000000002200002200002200002200000000000001000001000001000001000000000000010000220000220000220001000000000000010000010000010000010000000000000000220000220000240000220000000000000100000100000100000100000000000001000024000024000024000100000000000001000001000001000001000000000000000022000022000024000022000000000000010000010000010000010000000000000100002200002200002200010000000000000100000100000100000100000000000000002200002200002200002200000000000000000000000000000000000000000000000000000000000000000000000000";
mode9lvl = "00000000000000000000000000000000000000000000000001000000000000010000000000010000000000000100000000000000000000000000000000000000000000000000010000000100000000000100000000000000000000000000010000000000000000000000010000000000000000000100000000000000000000000000000000000000000000000000000000000100000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000100000100000000000000000000000000000000000000010000000000000001000000000000000000000000000000000000000000010000000000000100000000000000000000000000000000000000";
loadGame();
openScreen("main", true);
stop();
Symbol 8 MovieClip [bushobj] Frame 1
if (img._currentframe == 1) {
hp = 20;
} else {
hp = 10;
}
w1 = -70;
w2 = 70;
h1 = -110;
h2 = -15;
act = 0;
scale = 20;
onEnterFrame = function () {
if (img._currentframe < 5) {
if (act > 0) {
if (_yscale < 100) {
_yscale = (_yscale + scale);
} else {
_yscale = (_yscale - scale);
}
if (scale < 1) {
act = 0;
_yscale = 100;
}
scale--;
}
}
};
Symbol 17 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 1
stop();
timer = 5;
key1._visible = false;
keys = 1;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 57 MovieClip Frame 1
stop();
timer = 5;
key1._visible = false;
keys = 1;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 61 MovieClip Frame 1
stop();
timer = 5;
key1._visible = false;
key2._visible = false;
key3._visible = false;
keys = 3;
onEnterFrame = function () {
if (keys == 0) {
timer--;
if (timer == 0) {
dieChest(_parent);
}
}
};
Symbol 62 MovieClip [chest] Frame 1
hp = 100;
w1 = -12;
w2 = 58;
h1 = -35;
h2 = 40;
Symbol 76 MovieClip [crystal] Frame 1
hp = 100 - (img._currentframe * 20);
w1 = -35;
w2 = 35;
h1 = -70;
h2 = 10;
act = 0;
scale = 20;
timer = random(40);
onEnterFrame = function () {
if (img._currentframe < 5) {
if (act > 0) {
if (_rotation < 0) {
_rotation = (_rotation + scale);
} else {
_rotation = (_rotation - scale);
}
if (scale < 1) {
act = 0;
_rotation = 0;
}
scale--;
}
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_x - 20) + random(40), (_y - 70) + random(80), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 40;
}
}
}
};
Symbol 177 MovieClip Frame 1
stop();
Symbol 431 MovieClip [enemy0] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
armor = true;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
grib.grib.gotoAndStop(1);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 1;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 30);
gotoAndStop (30);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
warn._visible = cargo;
shad._alpha = 30;
shad._xscale = (shad._yscale = 100);
shad._y = 29;
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - (speed * 5));
} else {
delEnemy(this);
}
if (sleep == true) {
if (armor == true) {
gotoAndStop(_currentframe + 8);
} else {
gotoAndStop(_currentframe - 16);
}
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
if (armor != true) {
gotoAndStop(_currentframe - 8);
}
moving = 1;
}
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._xscale = (grib._yscale = grib._yscale + 20);
} else {
grib._xscale = (grib._yscale = grib._yscale - 30);
}
}
}
};
Symbol 612 MovieClip [enemy1] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
grib.grib.gotoAndStop(1);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
warn._visible = cargo;
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
gotoAndStop(_currentframe - 8);
moving = 1;
}
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._xscale = (grib._yscale = grib._yscale + 20);
} else {
grib._xscale = (grib._yscale = grib._yscale - 30);
}
}
}
};
Symbol 834 MovieClip Frame 39
gotoAndPlay (15);
Symbol 845 MovieClip [enemy2] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 56;
h1 = -46;
h2 = 43;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
eating = 0;
act = 0;
vspeed = 0;
killgrib = false;
cargo = false;
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((12 + (_root.mini_diff * 3)) + random(12)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
if ((moving == 1) && (eating == 0)) {
if (_root.minigame != 1) {
moveMedved(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
} else if (moving < 1) {
moving++;
if (moving == 1) {
if (eating > 5) {
eating = 43;
gotoAndStop (10);
} else {
trace(last);
gotoAndStop(last);
}
}
} else if (eating > 0) {
eating--;
if (eating == 5) {
if (food.count > 1) {
playSound("beareat");
food["grib" + food.count]._visible = false;
food.count--;
_root.achi[18]--;
createScore(_x, _y, 2);
} else if (food.count == 1) {
playSound("beareat");
food.grib1._visible = false;
food.count = 0;
dieFood(this);
}
food = undefined;
huntEnemy(this);
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 845 MovieClip [enemy2] Frame 13
onEnterFrame = function () {
_alpha = (_alpha - 2);
if (_alpha < 2) {
this.removeMovieClip();
}
};
Symbol 845 MovieClip [enemy2] Frame 21
stop();
Symbol 874 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 14
gotoAndPlay (1);
Symbol 900 MovieClip [enemy3] Frame 1
stop();
hp = 100;
shad._alpha = 25;
shad._xscale = (shad._yscale = 75);
hplow = hp;
hpgui = 0;
moving = 1;
w1 = -30;
w2 = 30;
h1 = bird._y - 30;
h2 = bird._y + 30;
if (_x < 300) {
_x = 24;
path = -1;
bird._xscale = bird._xscale * -1;
shad._xscale = shad._xscale * -1;
} else {
_x = 808;
path = 1;
}
if (((_root.minigame == 0) || (_root.minigame == 5)) || (_root.minigame == 6)) {
ishunt = true;
} else {
ishunt = false;
}
if (info == 0) {
bird.weap._visible = false;
shad.weap._visible = false;
if (ishunt) {
huntVor(this);
}
} else {
bird.weap.gotoAndStop(info);
shad.weap.gotoAndStop(info);
_y = (200 + random(260));
}
sleep = false;
cargo = false;
bird.grib._visible = false;
shad.grib._visible = false;
if (ishunt) {
speed = (-4 - random(4)) * path;
} else if (_root.minigame == 2) {
speed = 3 + (random(41) / 10);
} else {
speed = (4 + (_root.mini_diff / 10)) + random(4);
}
this.swapDepths((_y * 10000) + id);
onEnterFrame = function () {
if (_root.paused == false) {
warn._visible = cargo;
if (moving == 1) {
if (ishunt) {
_x = (_x + speed);
if (info == 0) {
h1 = bird._y - 30;
h2 = bird._y + 30;
dist = Math.abs((_x - food._x) - 24);
if (dist < 100) {
shad._alpha = 50 - (dist / 4);
shad._xscale = (100 - (dist / 4)) * path;
shad._yscale = shad._xscale * path;
bird._y = -dist;
if (dist < 5) {
if (cargo == false) {
if (food.count > 0) {
cargo = (bird.grib._visible = true);
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
}
}
}
}
}
if (sleep == true) {
bird.gotoAndPlay(1);
shad.gotoAndPlay(1);
sleep = false;
}
} else {
moving++;
}
if (ishunt) {
if (_x < 24) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
if (_x > 808) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else if (_root.minigame == 2) {
_x = (_x + speed);
if (_x > 828) {
dieBird(this);
}
} else {
_x = (_x - speed);
if (_x < 0) {
delEnemy(this);
}
}
hpbar._y = bird._y - 30;
hplowbar._y = bird._y - 30;
hpbor._y = bird._y - 30;
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 972 MovieClip [enemy4] Frame 1
gotoAndStop (8);
speed = 2;
w1 = 0;
w2 = 50;
h1 = -15;
h2 = 35;
if ((_root.minigame == 1) || (_root.minigame == 3)) {
xstart = 0;
} else {
xstart = (xtile = _x / 48);
}
ystart = (ytile = _y / 36);
moving = 1;
act = 0;
die = false;
path = new Array();
if (_root.minigame == 2) {
speed = 1;
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntSpider(this);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (moving == 1) {
moveSpider(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else {
if (moving == 0) {
huntSpider(this);
spid.play();
}
moving++;
}
if (_x < 20) {
if (_root.minigame == 1) {
delEnemy(this);
}
}
}
};
Symbol 972 MovieClip [enemy4] Frame 20
if ((_root.minigame == 0) || (_root.minigame == 6)) {
_root.rain.gotoAndPlay(2);
}
Symbol 972 MovieClip [enemy4] Frame 36
stop();
onEnterFrame = function () {
_alpha = (_alpha - 2);
if (_alpha < 2) {
this.removeMovieClip();
}
};
Symbol 1140 MovieClip [enemy5] Frame 1
stop();
step = 0;
hp = 100;
w1 = -5;
w2 = 53;
h1 = -15;
h2 = 40;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
eating = 0;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 1;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntKrolik(this);
}
} else {
speed = Math.round(((25 + (_root.mini_diff * 4)) + random(25)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
if (moving == 1) {
if (_root.minigame != 1) {
moveKrolik(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
gotoAndStop(_currentframe - 8);
moving = 1;
}
}
z = y - _y;
shad._xscale = (shad._yscale = 100 - z);
shad._y = z + 20;
}
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1163 MovieClip Frame 14
gotoAndPlay (1);
Symbol 1164 MovieClip [enemy6] Frame 1
stop();
hp = 100;
if (_root.minigame != 1) {
_y = -30;
} else {
_y = 600;
}
shad._alpha = 25;
shad._xscale = (shad._yscale = 75);
w1 = -30;
w2 = 30;
h1 = bird._y - 40;
h2 = bird._y + 30;
hplow = hp;
hpgui = 0;
sleep = false;
moving = 1;
if (random(10) < 5) {
bird._xscale = bird._xscale * -1;
shad._xscale = shad._xscale * -1;
}
if (((_root.minigame == 0) || (_root.minigame == 5)) || (_root.minigame == 6)) {
ishunt = true;
} else {
ishunt = false;
}
if (ishunt) {
huntSova(this);
}
cargo = false;
goback = false;
bird.weap._visible = false;
shad.weap._visible = false;
bird.grib._visible = false;
shad.grib._visible = false;
if (ishunt) {
speed = 3 + random(3);
this.swapDepths((food._y * 10000) + id);
} else if (_root.minigame == 1) {
speed = (3 + (_root.mini_diff / 10)) + random(3);
this.swapDepths((_y * 10000) + id);
}
onEnterFrame = function () {
if (_root.paused == false) {
warn._visible = cargo;
if (moving == 1) {
if (ishunt) {
dist = Math.abs(_y - food._y);
if (dist < 100) {
if (speed > 0) {
_y = (_y + Math.ceil(((speed * dist) / 100) + 0.1));
} else {
_y = (_y + Math.floor(((speed * dist) / 100) - 0.1));
}
shad._visible = true;
shad._y = dist;
shad._alpha = 50 - (dist / 2);
shad._xscale = 100 - (dist / 4);
shad._yscale = shad._xscale;
if (dist < 5) {
if (goback == false) {
speed = speed * -1;
goback = true;
if (food.count > 0) {
cargo = (bird.grib._visible = true);
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
}
}
} else {
_y = (_y + speed);
shad._visible = false;
}
}
if (sleep == true) {
bird.gotoAndPlay(1);
shad.gotoAndPlay(1);
sleep = false;
}
} else {
moving++;
}
if (ishunt) {
if (_y < -30) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else if (_root.minigame == 1) {
_y = (_y - speed);
if (_y < 0) {
delEnemy(this);
}
}
hpbar._y = bird._y - 40;
hplowbar._y = bird._y - 40;
hpbor._y = bird._y - 40;
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1345 MovieClip [enemy7] Frame 1
hp = 100;
w1 = -25;
w2 = 25;
h1 = -35;
h2 = 15;
hplow = hp;
hpgui = 0;
hpbar._visible = false;
hplowbar._visible = false;
hpbor._visible = false;
act = 0;
timer = 0;
nodam = false;
cargo = false;
image_index = 1;
if (_root.minigame != 1) {
huntKrot(this);
food.krot[place] == true;
nodam = false;
} else {
gotoAndStop (4);
nodam = true;
warn._visible = false;
}
this.swapDepths((_y * 10000) + id);
onEnterFrame = function () {
if (_root.paused == false) {
img.gotoAndStop(image_index);
switch (act) {
case 0 :
image_index++;
if (image_index > 9) {
act = 1;
if (_root.minigame != 1) {
timer = 20 + random(20);
} else {
timer = 20 + random(120);
}
}
break;
case 1 :
if (timer > 0) {
timer--;
} else {
nodam = false;
act = 2;
}
break;
case 2 :
image_index++;
if (image_index > 29) {
act = 3;
timer = 60 + random(40);
}
break;
case 3 :
if (timer > 0) {
timer--;
} else if (_root.minigame != 1) {
act = 4;
} else {
act = 7;
}
break;
case 4 :
image_index++;
if (image_index > 35) {
act = 5;
if (food.count > 0) {
cargo = true;
img.grib.gotoAndStop(food.type);
img.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
}
break;
case 5 :
image_index++;
if (image_index > 44) {
act = 6;
timer = 9;
nodam = true;
}
break;
case 6 :
if (timer > 0) {
timer--;
_alpha = (_alpha - 10);
} else {
dieFood(this);
}
break;
case 7 :
image_index--;
if (image_index >= 11) {
break;
}
_root.life--;
_root.achi[20]--;
act = 6;
timer = 9;
nodam = true;
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
}
};
Symbol 1493 MovieClip Frame 16
_parent.act = 4;
_parent.gotoAndStop("fly");
Symbol 1510 MovieClip Frame 26
gotoAndPlay (16);
Symbol 1511 MovieClip [enemy8] Frame 1
stop();
hp = 100;
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
flying = false;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
cargo = (grib._visible = false);
fade = true;
_alpha = 10;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 10);
gotoAndStop (6);
}
_root[(("lvl" + lvl) + "p") + ww];
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
warn._visible = cargo;
if (flying == false) {
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
moving++;
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (_y < (y + vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 0;
_y = y;
if (sleep != false) {
break;
}
gotoAndStop(_currentframe - 8);
moving = 1;
}
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
}
} else {
switch (act) {
case 3 :
y = _y;
break;
case 4 :
_y = (_y - 3);
if (_xscale > 100) {
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
}
if (_y >= -30) {
break;
}
if (cargo != true) {
break;
}
dieFood(this);
}
z = (y - _y) / 2;
shad._alpha = 30 - z;
shad._xscale = (shad._yscale = 100 - z);
shad._y = (32 + y) - _y;
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._xscale = (grib._yscale = grib._yscale + 20);
} else {
grib._xscale = (grib._yscale = grib._yscale - 30);
}
}
}
};
Symbol 1529 MovieClip [enemy9] Frame 1
stop();
speed = 2;
w1 = -40;
w2 = 40;
h1 = -30;
h2 = 40;
if (_root.minigame != 1) {
xstart = (xtile = _x / 48);
} else {
xstart = 0;
}
ystart = (ytile = _y / 36);
if (random(10) < 5) {
bird._xscale = bird._xscale * -1;
}
moving = 1;
step = 2 + random(2);
die = false;
cargo = false;
bird.grib._visible = false;
bird.weap._visible = false;
if (info > 0) {
bird.weap._visible = true;
bird.weap.gotoAndStop(info + 6);
}
huntBat(this);
onEnterFrame = function () {
if (_root.paused == false) {
warn._visible = cargo;
if (moving == 1) {
dist = point_distance(_x, _y, flyx, flyy);
if (dist > 5) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = Math.min(dist / 10, 10);
} else {
if (step > 0) {
moving = -25 - random(15);
} else {
moving = -30;
if (step == 0) {
if (food.count > 0) {
cargo = (bird.grib._visible = true);
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food["grib" + food.count]._visible = false;
food.count--;
createScore(food._x, food._y, 2);
}
} else if (cargo == true) {
dieFood(this);
} else {
delEnemy(this);
}
}
step--;
}
if (_y != ypre) {
this.swapDepths(6400000 + id);
}
ypre = _y;
} else {
if (moving == 0) {
huntBat(this);
}
moving++;
}
if (_x < 20) {
if (_root.minigame == 1) {
delEnemy(this);
}
}
}
};
Symbol 1615 MovieClip [enemy10] Frame 1
stop();
hp = 100;
w1 = -20;
w2 = 70;
h1 = -35;
h2 = 40;
xstart = (xtile = _x / 48);
ystart = (ytile = _y / 36);
hplow = hp;
hpgui = 0;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
cargo = false;
cargonum = 0;
grib1._visible = false;
grib2._visible = false;
grib3._visible = false;
grib4._visible = false;
grib5._visible = false;
grib1.grib.gotoAndStop(1);
grib2.grib.gotoAndStop(1);
grib3.grib.gotoAndStop(1);
grib4.grib.gotoAndStop(1);
grib5.grib.gotoAndStop(1);
fade = true;
_alpha = 10;
scale = 10;
scaleon = false;
path = new Array();
if (_root.minigame != 1) {
speed = 0.5;
if (_root.minigame == 2) {
pp = _root[(("lvl" + _root.lvl) + "p") + info];
i = 0;
while (i < pp.length) {
path.push([pp[pp.length - i][1], pp[pp.length - i][0]]);
i++;
}
} else {
huntEnemy(this);
}
} else {
speed = Math.round(((15 + (_root.mini_diff * 3)) + random(15)) / 10);
gotoAndStop (6);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (fade == true) {
if (_alpha < 90) {
_alpha = (_alpha + 10);
} else {
_alpha = 100;
fade = false;
}
}
if (scaleon == true) {
if (imin._yscale < 100) {
imin._yscale = imin._yscale + scale;
} else {
imin._yscale = imin._yscale - scale;
}
if (scale < 1) {
scaleon = false;
imin._yscale = 100;
}
scale--;
}
warn._visible = cargo;
if (moving == 1) {
if (_root.minigame != 1) {
moveBig(this);
if (_y != ypre) {
this.swapDepths((_y * 10000) + id);
}
ypre = _y;
} else if (_x > 30) {
_x = (_x - speed);
} else {
delEnemy(this);
}
} else {
moving++;
}
if (hp < hplow) {
hplow = hplow - 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else if (hpgui > 0) {
hpgui = hpgui - 10;
}
if (hpbar._visible == true) {
if (hpgui > 0) {
hpbar._alpha = (hplowbar._alpha = (hpbor._alpha = hpgui));
} else {
hpbar._visible = (hplowbar._visible = (hpbor._visible = false));
}
}
if (grib1._xscale != 100) {
if (grib1._xscale < 100) {
grib1._xscale = (grib1._yscale = grib1._yscale + 20);
grib2._xscale = (grib2._yscale = grib2._yscale + 20);
grib3._xscale = (grib3._yscale = grib3._yscale + 20);
grib4._xscale = (grib4._yscale = grib4._yscale + 20);
grib5._xscale = (grib5._yscale = grib5._yscale + 20);
} else {
grib1._xscale = (grib1._yscale = grib1._yscale - 30);
grib2._xscale = (grib2._yscale = grib2._yscale - 30);
grib3._xscale = (grib3._yscale = grib3._yscale - 30);
grib4._xscale = (grib4._yscale = grib4._yscale - 30);
grib5._xscale = (grib5._yscale = grib5._yscale - 30);
}
}
}
};
Symbol 1669 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 1670 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 1697 MovieClip [kap] Frame 23
stop();
Symbol 1727 MovieClip [lairobj] Frame 1
timer = 30;
count = 0;
hp = 80;
w1 = -55;
w2 = 55;
h1 = -4;
h2 = 76;
act = 0;
scale = 10;
animal = 0;
limit = 3;
onEnterFrame = function () {
if (_root.paused == false) {
if (img._currentframe < 5) {
if (timer == 0) {
if (count < limit) {
count++;
if (_currentframe == 1) {
animal = 1 + random(7);
} else {
animal = _currentframe - 1;
}
switch (animal) {
case 1 :
createEnemy(xtile, ytile + 1, 1, 0, this);
timer = 45;
break;
case 2 :
createEnemy(xtile, ytile + 1, 2, 0, this);
timer = 80;
break;
case 3 :
createEnemy(xtile, ytile + 1, 5, 0, this);
timer = 30;
break;
case 4 :
createEnemy(xtile, ytile + 1, 8, 0, this);
timer = 50;
break;
case 5 :
createEnemy(xtile, ytile + 1, 9, 0, this);
timer = 60;
break;
case 6 :
createEnemy(xtile, ytile + 1, 0, 0, this);
timer = 70;
break;
case 7 :
createEnemy(xtile, ytile + 1, 10, 0, this);
timer = 120;
}
}
} else {
timer--;
}
if (act > 0) {
if (img._x < 0) {
img._x = img._x + scale;
} else {
img._x = img._x - scale;
}
if (scale < 1) {
act = 0;
img._x = 0;
}
scale--;
}
} else if (img._alpha > 0) {
img._alpha = img._alpha - 4;
}
}
};
Symbol 1730 MovieClip [lakeobj] Frame 1
timer = 30 + random(60);
onEnterFrame = function () {
if (timer == 0) {
timer = 30 + random(60);
createGroundPart((_x + 64) + 350, (_y + 30) + 260, "lakefx");
} else {
timer--;
}
};
Symbol 1734 MovieClip [mineobj] Frame 5
stop();
Symbol 1825 MovieClip Frame 1
if (_parent.blue == undefined) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(_parent.blue + 1);
}
img.gotoAndPlay(1 + random(30));
timer = 40;
onEnterFrame = function () {
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_parent._x - 7) + random(14), (_parent._y - 7) + random(14), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 40;
}
}
};
Symbol 1825 MovieClip Frame 2
img.gotoAndPlay(1 + random(30));
Symbol 1825 MovieClip Frame 3
img.gotoAndPlay(1 + random(30));
Symbol 1825 MovieClip Frame 4
img.gotoAndPlay(1 + random(30));
Symbol 1859 MovieClip Frame 1
if (_parent.blue == undefined) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(_parent.blue + 1);
}
img.gotoAndPlay(1 + random(30));
timer = 40;
onEnterFrame = function () {
if (_root.effect == true) {
if (timer > 0) {
timer--;
} else {
createPart((_parent._x - 7) + random(14), (_parent._y - 7) + random(14), "star1", _root.levelmap.getNextHighestDepth(), 1);
timer = 40;
}
}
};
Symbol 1859 MovieClip Frame 2
img.gotoAndPlay(1 + random(30));
Symbol 1859 MovieClip Frame 3
img.gotoAndPlay(1 + random(30));
Symbol 1859 MovieClip Frame 4
img.gotoAndPlay(1 + random(30));
Symbol 2002 MovieClip [prize] Frame 1
kill = false;
timer = 250 + random(50);
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
speed = vspeed / 2;
w1 = -50 * _root.bonusMagnet;
w2 = 50 * _root.bonusMagnet;
h1 = -50 * _root.bonusMagnet;
h2 = 50 * _root.bonusMagnet;
if (info == 0) {
limit = limit + 10;
speed = speed + 2;
}
if (info == 1) {
limit = 0;
speed = 0;
act = 2;
}
dir = (dir2 = random(360));
if (_x < 64) {
_x = 64;
}
if (_x > 704) {
_x = 704;
}
if (_y < 30) {
_y = 30;
}
if (_y > 500) {
_y = 500;
}
switch (_currentframe) {
case 1 :
img.gotoAndPlay(1 + random(12));
x = 90;
y = 68;
info = undefined;
break;
case 2 :
x = 90;
y = 68;
info = undefined;
break;
case 3 :
case 4 :
case 5 :
case 6 :
x = info._x + 24;
y = info._y + 18;
break;
case 7 :
x = 94;
y = 98;
info = undefined;
break;
case 8 :
case 9 :
x = 94;
y = 78;
blue = info;
info = undefined;
break;
case 10 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
x = 260 + ((_currentframe - 10) * 60);
y = 510;
info = undefined;
}
onEnterFrame = function () {
if ((_root.paused == false) || (_root.win == true)) {
if (kill == false) {
if (timer == 0) {
if (_xscale == 0) {
if (info != undefined) {
food = info;
dieFood(this);
}
diePrize(this);
} else {
_yscale = (_yscale - 5);
_xscale = (_yscale - 5);
}
} else {
timer--;
}
if (act > 0) {
if ((((_x < 90) || (_x > 730)) || (_y < 60)) || (_y > 520)) {
speed = 0;
}
if (speed > 0) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y - lengthdir_y(speed, dir));
speed = speed - 0.2;
}
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
break;
case 2 :
if (limit > (-1 * vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else if (limit == (-1 * vspeed)) {
vspeed = -1 * (vspeed + 4);
limit = vspeed;
} else {
act = 0;
speed = 2;
dir = -1 * point_direction(_x, _y, x, y);
if (!((_root.magnit == true) || (_root.automagnet == true))) {
break;
}
kill = true;
}
}
} else if (_root.magnit == true) {
kill = true;
_yscale = 100;
_xscale = 100;
}
} else {
dist = point_distance(_x, _y, x, y);
if (dist > speed) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = Math.max(dist / 10, 20);
} else {
switch (_currentframe) {
case 1 :
_root.curr_money = _root.curr_money + (10 * _root.bonusDeposit);
_root.achi[6]++;
addStat(2, 10 * _root.bonusDeposit);
diePrize(this);
break;
case 2 :
_root.curr_money = _root.curr_money + (20 * _root.bonusDeposit);
_root.achi[7]++;
addStat(2, 30 * _root.bonusDeposit);
diePrize(this);
break;
case 3 :
case 4 :
case 5 :
case 6 :
if (info.count < 5) {
info.count++;
z = info["grib" + info.count];
z._visible = true;
z._xscale = (z._yscale = 10);
}
createScore(info._x, info._y, 1);
diePrize(this);
break;
case 7 :
_root.key++;
diePrize(this);
break;
case 8 :
_root.curr_money = _root.curr_money + (250 * _root.bonusDeposit);
_root.achi[8]++;
addStat(2, 150 * _root.bonusDeposit);
diePrize(this);
break;
case 9 :
_root.curr_money = _root.curr_money + (50 * _root.bonusDeposit);
addStat(2, 50 * _root.bonusDeposit);
diePrize(this);
break;
case 10 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
addMine(_currentframe - 2);
diePrize(this);
}
}
}
}
};
Symbol 2002 MovieClip [prize] Frame 2
img.gotoAndPlay(1 + random(12));
Symbol 2147 MovieClip [weap] Frame 1
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
w1 = -25;
w2 = 25;
h1 = -30;
h2 = 30;
if (info == 0) {
limit = limit + 10;
}
wait = 5;
onEnterFrame = function () {
if (wait > 0) {
wait--;
}
if (act > 0) {
switch (act) {
case 1 :
if (vspeed > 0) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else {
act = 2;
}
return;
case 2 :
if (limit > (-1 * vspeed)) {
_y = (_y - vspeed);
vspeed = vspeed - 2;
} else if (limit == (-1 * vspeed)) {
vspeed = -1 * (vspeed + 4);
limit = vspeed;
} else {
act = 0;
}
}
}
};
Symbol 2168 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 2171 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 2175 MovieClip Frame 35
_parent.removeMovieClip();
Symbol 2184 MovieClip Frame 26
_parent.removeMovieClip();
Symbol 2187 MovieClip Frame 26
_parent.removeMovieClip();
Symbol 2199 MovieClip Frame 1
stop();
Symbol 2200 MovieClip [teslaobj] Frame 1
lifes = _root.bonusTesla;
timer = 5;
onEnterFrame = function () {
if (_root.paused == false) {
if (timer > 0) {
timer--;
} else {
fx.play();
playSound("tesla1", "tesla2");
castTesla(_x + 24, _y - 10);
timer = 15;
lifes--;
if (lifes == 0) {
createPart(_x + 24, _y + 18, "boom", levelmap.getNextHighestDepth(), 1);
_root.colmap[ytile][xtile] = 1;
bankTesla.splice(j, 1);
this.removeMovieClip();
}
}
}
};
Symbol 2200 MovieClip [teslaobj] Frame 5
stop();
Symbol 2212 MovieClip [tree] Frame 1
if (img._currentframe == 1) {
hp = 40;
} else {
hp = 10;
}
w1 = -75;
w2 = 75;
h1 = -160;
h2 = -30;
act = 0;
scale = 20;
onEnterFrame = function () {
if (img._currentframe < 5) {
if (act > 0) {
if (_yscale < 100) {
_yscale = (_yscale + scale);
} else {
_yscale = (_yscale - scale);
}
if (scale < 1) {
act = 0;
_yscale = 100;
}
scale--;
}
}
};
Symbol 2215 MovieClip [tree_s] Frame 1
stop();
Symbol 2248 MovieClip [batdie] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 3 + random(2);
rot = 10 - random(20);
timer = 30 + random(10);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2248 MovieClip [batdie] Frame 17
stop();
Symbol 2271 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 2280 MovieClip [bullet] Frame 1
dir = random(360);
speed = 10;
damx = _root.damGun;
timer = 5;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
if (timer > 0) {
timer--;
} else {
i = 0;
while (i < bankTree.length) {
z = bankTree[i];
if (hitPoint(_x, _y, z)) {
if (z.hp > 0) {
attackTree(z, 1, 0);
this.removeMovieClip();
}
}
i++;
}
i = 0;
while (i < bankChest.length) {
z = bankChest[i];
if (hitPoint(_x, _y, z)) {
if (z._currentframe < 4) {
castHitChest(this);
this.removeMovieClip();
}
}
i++;
}
i = 0;
while (i < bankEnemy.length) {
z = bankEnemy[i];
if (hitPoint(_x, _y, z)) {
trace(bankEnemy[i]);
castHitEnemy(this);
this.removeMovieClip();
}
i++;
}
}
if ((((_x < 0) || (_x > 800)) || (_y < 0)) || (_y > 600)) {
this.removeMovieClip();
}
}
};
Symbol 2287 MovieClip Frame 1
gotoAndStop(1 + random(3));
Symbol 2288 MovieClip [bushflow] Frame 1
dir = random(360);
speed = (4 + random(5)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 10 + random(15);
_rotation = random(360);
onEnterFrame = function () {
_y = (_y + vspeed);
_rotation = (_rotation + rot);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 4;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2295 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 2298 MovieClip [clip1] Frame 1
dir = 60 + random(10);
vspeed = 0;
speed = 6 + random(2);
rot = 20 + random(10);
timer = speed * 4;
_rotation = -30;
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2301 MovieClip [clip2] Frame 1
dir = 60 + random(10);
vspeed = 0;
speed = 7 + random(3);
rot = 20 + random(10);
timer = speed * 4;
_rotation = -30;
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2305 MovieClip [crack] Frame 1
if (random(2) == 0) {
_xscale = -100;
}
if (random(2) == 0) {
_yscale = -100;
}
Symbol 2305 MovieClip [crack] Frame 33
this.removeMovieClip();
Symbol 2312 MovieClip [damage1] Frame 1
stop();
_rotation = random(360);
onEnterFrame = function () {
if (_alpha < 10) {
this.removeMovieClip();
} else {
_alpha = (_alpha - 10);
}
};
Symbol 2335 MovieClip [dirt] Frame 1
gotoAndPlay(1 + random(3));
Symbol 2335 MovieClip [dirt] Frame 28
this.removeMovieClip();
Symbol 2356 MovieClip [explo1] Frame 19
this.removeMovieClip();
Symbol 2357 MovieClip [explo2] Frame 19
this.removeMovieClip();
Symbol 2364 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 2371 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 2374 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 2381 MovieClip [hulk4] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 40 - random(80);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2384 MovieClip [hulk5] Frame 1
stop();
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
rot = -5 - random(5);
} else {
dir = 60 + random(30);
rot = 5 + random(5);
}
timer = 15 + random(15);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2387 MovieClip [hulk6] Frame 1
stop();
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
} else {
dir = 60 + random(30);
}
timer = 15 + random(15);
onEnterFrame = function () {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 2392 MovieClip [lakefx] Frame 49
this.removeMovieClip();
Symbol 2395 MovieClip Frame 1
gotoAndStop(1 + random(3));
Symbol 2396 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 2403 MovieClip [nuke1] Frame 10
playSound("explo");
_root.quake = 10;
Symbol 2403 MovieClip [nuke1] Frame 14
_root.flashobj.gotoAndPlay(2);
castExplo(_root.levelmap._xmouse, _root.levelmap._ymouse, 640);
Symbol 2403 MovieClip [nuke1] Frame 15
this.removeMovieClip();
Symbol 2406 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 2409 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 2412 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 2413 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 2418 MovieClip [teslahit] Frame 6
this.removeMovieClip();
Symbol 3817 MovieClip [__Packages.Playtomic.LogRequest] Frame 0
class Playtomic.LogRequest
{
var Pieces;
function LogRequest () {
}
function Queue(data) {
Pieces++;
Data = Data + (((Data == "") ? "" : "~") + data);
if ((Pieces == 8) || (Data.length > 300)) {
Pieces = 0;
Ready = true;
}
}
function Send() {
var _local2 = function (success) {
if ((this.Data.indexOf("v/") == 0) || (this.Data.indexOf("~v/") > -1)) {
Playtomic.Log.IncreaseViews();
}
if ((this.Data.indexOf("p/") == 0) || (this.Data.indexOf("~p/") > -1)) {
Playtomic.Log.IncreasePlays();
}
};
var _local3 = new LoadVars();
_local3.sendAndLoad(((((((((("http://g" + Playtomic.Log.GUID) + ".api.playtomic.com/Tracker/q.aspx?swfid=") + Playtomic.Log.SWFID) + "&q=") + Data) + "&url=") + Playtomic.Log.SourceUrl) + "&") + Math.random()) + "z", _local2, "POST");
}
var Data = "";
var Ready = false;
}
Symbol 3818 MovieClip [__Packages.Playtomic.Log] Frame 0
class Playtomic.Log
{
static var SourceUrl, Cookie;
function Log () {
}
static function View(swfid, guid, defaulturl) {
if (swfid == undefined) {
swfid = 0;
}
if (guid == undefined) {
guid = "";
}
if (defaulturl == undefined) {
defaulturl = "";
}
if (SWFID > 0) {
return(undefined);
}
SWFID = swfid;
GUID = guid;
Enabled = true;
if ((SWFID == 0) || (GUID == "")) {
Enabled = false;
return(undefined);
}
if (defaulturl.indexOf("http://") != 0) {
Enabled = false;
return(undefined);
}
SourceUrl = defaulturl;
if (((SourceUrl == null) || (SourceUrl == "")) || (SourceUrl.indexOf("https://") == 0)) {
Enabled = false;
return(undefined);
}
Cookie = SharedObject.getLocal("playtomic");
var _local4 = GetCookie("views");
Send("v/" + _local4, true);
_global.setTimeout(PingServer, 60000);
}
static function ForceSend() {
if (Request == null) {
return(undefined);
}
Request.Send();
Request = new Playtomic.LogRequest();
}
static function Play() {
if (!Enabled) {
return(undefined);
}
LevelCounters = new Array();
LevelAverages = new Array();
LevelRangeds = new Array();
Send("p/" + (Plays + 1), true);
}
static function CustomMetric(name, group, unique) {
if (!Enabled) {
return(undefined);
}
if ((group == null) || (group == undefined)) {
group = "";
}
if ((unique == null) || (unique == undefined)) {
unique = false;
}
if (unique) {
if (Contains(Customs, name)) {
return(undefined);
}
Customs.push(name);
}
Send((("c/" + Clean(name)) + "/") + Clean(group));
}
static function Link(url, name, group, unique, total, fail) {
if (!Enabled) {
return(undefined);
}
Send((((((((((("l/" + Clean(name)) + "/") + Clean(group)) + "/") + Clean(url)) + "/") + unique) + "/") + total) + "/") + fail);
}
static function LevelCounterMetric(name, level, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
var _local1 = (name + ".") + level.toString();
if (Contains(LevelCounters, _local1)) {
return(undefined);
}
LevelCounters.push(_local1);
}
Send((("lc/" + Clean(name)) + "/") + Clean(level));
}
static function LevelRangedMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
var _local1 = (name + ".") + level.toString();
if (Contains(LevelRangeds, _local1)) {
return(undefined);
}
LevelRangeds.push(_local1);
SaveCookie("lr_" + name, 1);
}
Send((((("lr/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function LevelAverageMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
var _local1 = (name + ".") + level.toString();
if (Contains(LevelAverages, _local1)) {
return(undefined);
}
LevelAverages.push(_local1);
}
Send((((("la/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function Contains(arr, key) {
var _local1 = arr.length - 1;
while (_local1 > -1) {
if (arr[_local1] == key) {
return(true);
}
_local1--;
}
return(false);
}
static function Heatmap(metric, heatmap, x, y) {
if (!Enabled) {
return(undefined);
}
Send((((((("h/" + Clean(metric)) + "/") + Clean(heatmap)) + "/") + x) + "/") + y);
}
static function Funnel(name, step, stepnum) {
if (!Enabled) {
return(undefined);
}
Send((((("f/" + Clean(name)) + "/") + Clean(step)) + "/") + stepnum);
}
static function PlayerLevelStart(levelid) {
if (!Enabled) {
return(undefined);
}
Send("pls/" + levelid);
}
static function PlayerLevelWin(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plw/" + levelid);
}
static function PlayerLevelQuit(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plq/" + levelid);
}
static function PlayerLevelRetry(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plr/" + levelid);
}
static function PlayerLevelFlag(levelid) {
if (!Enabled) {
return(undefined);
}
Send("plf/" + levelid);
}
static function PingServer() {
if (!Enabled) {
return(undefined);
}
Pings = ++Pings;
Send((("t/" + (FirstPing ? "y" : "n")) + "/") + Pings, true);
if (FirstPing) {
FirstPing = false;
setInterval(PingServer, 60000);
}
}
static function Send(s, view) {
if (view == undefined) {
view = false;
}
Request.Queue(s);
if ((Request.Ready || (view)) || (!Queue)) {
Request.Send();
Request = new Playtomic.LogRequest();
}
}
static function GetCookie(n) {
if (Cookie.data[n] == undefined) {
return(0);
}
return(parseInt(Cookie.data[n]));
}
static function SaveCookie(n, v) {
Cookie.data[n] = v.toString();
Cookie.flush();
}
static function Clean(s) {
while (s.indexOf("/") > -1) {
s = Replace(s, "/", "\\");
}
while (s.indexOf("~") > -1) {
s = Replace(s, "~", "-");
}
return(escape(s));
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static function IncreaseViews() {
var _local1 = GetCookie("views");
_local1++;
SaveCookie("views", _local1);
}
static function IncreasePlays() {
Plays = ++Plays;
}
static var Enabled = false;
static var Queue = true;
static var SWFID = 0;
static var GUID = "";
static var Request = new Playtomic.LogRequest();
static var FirstPing = true;
static var Pings = 0;
static var Plays = 0;
static var HighestGoal = 0;
static var Customs = new Array();
static var LevelCounters = new Array();
static var LevelAverages = new Array();
static var LevelRangeds = new Array();
}
Symbol 3819 MovieClip [__Packages.Playtomic.Link] Frame 0
class Playtomic.Link
{
function Link () {
}
static function Open(url, name, group) {
var _local6 = 0;
var _local10 = 0;
var _local4 = 0;
var _local3 = 0;
var _local7 = 0;
var _local5 = 0;
var _local9 = (url + ".") + name;
var _local8;
var _local1 = url;
_local1 = Replace(_local1, "http://", "");
if (_local1.indexOf("/") > -1) {
_local1 = _local1.substring(0, _local1.indexOf("/"));
}
if (_local1.indexOf("?") > -1) {
_local1 = _local1.substring(0, _local1.indexOf("?"));
}
_local1 = ("http://" + _local1) + "/";
var _local2 = _local1;
if (_local2.indexOf("//") > -1) {
_local2 = _local2.substring(_local2.indexOf("//") + 2);
}
_local2 = Replace(_local2, "www.", "");
if (_local2.indexOf("/") > -1) {
_local2 = _local2.substring(0, _local2.indexOf("/"));
}
try {
getURL (url, "_blank");
if (Clicks.indexOf(_local9) > -1) {
_local4 = 1;
} else {
_local4 = 1;
_local6 = 1;
Clicks.push(_local9);
}
if (Clicks.indexOf(_local2) > -1) {
_local3 = 1;
} else {
_local3 = 1;
_local10 = 1;
Clicks.push(_local2);
}
_local8 = true;
} catch(err) {
_local7 = 1;
_local5 = 1;
_local8 = false;
}
Playtomic.Log.Link(_local1, _local2.toLowerCase(), "DomainTotals", _local10, _local3, _local5);
Playtomic.Log.Link(url, name, group, _local6, _local4, _local7);
Playtomic.Log.ForceSend();
return(_local8);
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static var Clicks = new Array();
}
Symbol 2443 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndStop (1);
}
Symbol 2449 MovieClip Frame 1
stop();
Symbol 2449 MovieClip Frame 7
stop();
Symbol 2452 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
visitSite("spon");
}
Symbol 2459 MovieClip Frame 156
_root.gotoAndStop(4);
Symbol 2471 MovieClip Frame 1
_root.gotoAndStop("Language");
Symbol 2471 MovieClip Frame 86
_root.gotoAndStop("Language");
Symbol 2479 MovieClip Frame 1
stop();
Symbol 2572 MovieClip Frame 1
stop();
Symbol 2572 MovieClip Frame 2
gotoAndStop (1);
Symbol 2572 MovieClip Frame 7
gotoAndStop (1);
Symbol 2572 MovieClip Frame 13
gotoAndStop (1);
Symbol 2572 MovieClip Frame 19
gotoAndStop (1);
Symbol 2572 MovieClip Frame 25
gotoAndStop (1);
Symbol 2572 MovieClip Frame 31
gotoAndStop (1);
Symbol 2572 MovieClip Frame 37
gotoAndStop (1);
Symbol 2572 MovieClip Frame 43
gotoAndStop (1);
Symbol 2572 MovieClip Frame 49
gotoAndStop (1);
Symbol 2572 MovieClip Frame 55
gotoAndStop (1);
Symbol 2572 MovieClip Frame 61
gotoAndStop (1);
Symbol 2572 MovieClip Frame 67
gotoAndStop (1);
Symbol 2572 MovieClip Frame 73
gotoAndStop (1);
Symbol 2572 MovieClip Frame 79
gotoAndStop (1);
Symbol 2572 MovieClip Frame 85
gotoAndStop (1);
Symbol 2572 MovieClip Frame 91
gotoAndStop (1);
Symbol 2572 MovieClip Frame 97
gotoAndStop (1);
Symbol 2572 MovieClip Frame 103
gotoAndStop (1);
Symbol 2572 MovieClip Frame 109
gotoAndStop (1);
Symbol 2572 MovieClip Frame 115
gotoAndStop (1);
Symbol 2572 MovieClip Frame 121
gotoAndStop (1);
Symbol 2572 MovieClip Frame 127
gotoAndStop (1);
Symbol 2572 MovieClip Frame 133
gotoAndStop (1);
Symbol 2572 MovieClip Frame 139
gotoAndStop (1);
Symbol 2572 MovieClip Frame 145
gotoAndStop (1);
Symbol 2572 MovieClip Frame 151
gotoAndStop (1);
Symbol 2572 MovieClip Frame 157
gotoAndStop (1);
Symbol 2572 MovieClip Frame 163
gotoAndStop (1);
Symbol 2572 MovieClip Frame 169
gotoAndStop (1);
Symbol 2572 MovieClip Frame 175
gotoAndStop (1);
Symbol 2572 MovieClip Frame 181
gotoAndStop (1);
Symbol 2572 MovieClip Frame 187
gotoAndStop (1);
Symbol 2572 MovieClip Frame 193
gotoAndStop (1);
Symbol 2572 MovieClip Frame 199
gotoAndStop (1);
Symbol 2572 MovieClip Frame 205
gotoAndStop (1);
Symbol 2572 MovieClip Frame 211
gotoAndStop (1);
Symbol 2572 MovieClip Frame 217
gotoAndStop (1);
Symbol 2572 MovieClip Frame 223
gotoAndStop (1);
Symbol 2572 MovieClip Frame 229
gotoAndStop (1);
Symbol 2572 MovieClip Frame 235
gotoAndStop (1);
Symbol 2572 MovieClip Frame 241
gotoAndStop (1);
Symbol 2572 MovieClip Frame 247
gotoAndStop (1);
Symbol 2572 MovieClip Frame 253
gotoAndStop (1);
Symbol 2572 MovieClip Frame 259
gotoAndStop (1);
Symbol 2572 MovieClip Frame 265
gotoAndStop (1);
Symbol 2572 MovieClip Frame 271
gotoAndStop (1);
Symbol 2572 MovieClip Frame 277
gotoAndStop (1);
Symbol 2572 MovieClip Frame 283
gotoAndStop (1);
Symbol 2572 MovieClip Frame 289
gotoAndStop (1);
Symbol 2572 MovieClip Frame 295
gotoAndStop (1);
Symbol 2572 MovieClip Frame 301
gotoAndStop (1);
Symbol 2572 MovieClip Frame 307
gotoAndStop (1);
Symbol 2572 MovieClip Frame 313
gotoAndStop (1);
Symbol 2572 MovieClip Frame 319
gotoAndStop (1);
Symbol 2572 MovieClip Frame 325
gotoAndStop (1);
Symbol 2572 MovieClip Frame 331
gotoAndStop (1);
Symbol 2572 MovieClip Frame 337
gotoAndStop (1);
Symbol 2572 MovieClip Frame 343
gotoAndStop (1);
Symbol 2572 MovieClip Frame 349
gotoAndStop (1);
Symbol 2572 MovieClip Frame 355
gotoAndStop (1);
Symbol 2572 MovieClip Frame 361
gotoAndStop (1);
Symbol 2572 MovieClip Frame 367
gotoAndStop (1);
Symbol 2572 MovieClip Frame 373
gotoAndStop (1);
Symbol 2572 MovieClip Frame 379
gotoAndStop (1);
Symbol 2572 MovieClip Frame 385
gotoAndStop (1);
Symbol 2572 MovieClip Frame 391
gotoAndStop (1);
Symbol 2572 MovieClip Frame 397
gotoAndStop (1);
Symbol 2572 MovieClip Frame 403
gotoAndStop (1);
Symbol 2572 MovieClip Frame 409
gotoAndStop (1);
Symbol 2572 MovieClip Frame 415
gotoAndStop (1);
Symbol 2572 MovieClip Frame 421
gotoAndStop (1);
Symbol 2572 MovieClip Frame 427
gotoAndStop (1);
Symbol 2572 MovieClip Frame 433
gotoAndStop (1);
Symbol 2572 MovieClip Frame 439
gotoAndStop (1);
Symbol 2572 MovieClip Frame 445
gotoAndStop (1);
Symbol 2572 MovieClip Frame 451
gotoAndStop (1);
Symbol 2572 MovieClip Frame 457
gotoAndStop (1);
Symbol 2572 MovieClip Frame 463
gotoAndStop (1);
Symbol 2572 MovieClip Frame 469
gotoAndStop (1);
Symbol 2572 MovieClip Frame 475
gotoAndStop (1);
Symbol 2572 MovieClip Frame 481
gotoAndStop (1);
Symbol 2572 MovieClip Frame 487
gotoAndStop (1);
Symbol 2572 MovieClip Frame 493
gotoAndStop (1);
Symbol 2572 MovieClip Frame 499
gotoAndStop (1);
Symbol 2572 MovieClip Frame 505
gotoAndStop (1);
Symbol 2572 MovieClip Frame 511
gotoAndStop (1);
Symbol 2572 MovieClip Frame 517
gotoAndStop (1);
Symbol 2572 MovieClip Frame 523
gotoAndStop (1);
Symbol 2572 MovieClip Frame 529
gotoAndStop (1);
Symbol 2572 MovieClip Frame 535
gotoAndStop (1);
Symbol 2572 MovieClip Frame 541
gotoAndStop (1);
Symbol 2572 MovieClip Frame 547
gotoAndStop (1);
Symbol 2572 MovieClip Frame 553
gotoAndStop (1);
Symbol 2572 MovieClip Frame 559
gotoAndStop (1);
Symbol 2572 MovieClip Frame 565
gotoAndStop (1);
Symbol 2612 MovieClip Frame 1
stop();
Symbol 2617 MovieClip Frame 1
stop();
Symbol 2617 MovieClip Frame 9
weap.gotoAndStop(10);
Symbol 2617 MovieClip Frame 10
weap.gotoAndStop(10);
Symbol 2640 MovieClip Frame 1
_visible = false;
stop();
Symbol 2640 MovieClip Frame 2
_visible = true;
y = 0;
i = 0;
while (i < bankFood.length) {
z = bankFood[i];
if (z.count < 5) {
_root.achi[18]++;
y = 1;
z.count++;
x = z["grib" + z.count];
x._visible = true;
x._xscale = (x._yscale = 10);
createScore(z._x, z._y, 1);
if (_root.effect == true) {
j = 5;
while (j--) {
createPart(z._x + random(48), z._y + random(36), "star2", _root.levelmap.getNextHighestDepth(), 1);
}
}
}
i++;
}
playSound("lightning");
if (y == 1) {
playSound("holy");
}
Symbol 2640 MovieClip Frame 103
gotoAndStop (1);
Symbol 2651 MovieClip Frame 1
stop();
Symbol 2712 MovieClip Frame 1
onEnterFrame = function () {
txt1.text = _root.achi[type];
if (_currentframe == 1) {
if (_root.achi[type] >= need) {
gotoAndStop (2);
}
} else if (_root.achi[type] < need) {
gotoAndStop (1);
}
};
Symbol 2731 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 2734 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 2741 MovieClip Frame 1
stop();
Symbol 2742 MovieClip Frame 1
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
ib3.ico.gotoAndStop(3);
ib1.desc.text = "\u00C2m thanh";
ib2.desc.text = "Nh\u1EA1c";
ib3.desc.text = "T\u1EA1m d\u1EEBng";
ib1.desc._visible = false;
ib2.desc._visible = false;
ib3.desc._visible = false;
ib1.but.onRollOver = function () {
ib1.desc._visible = true;
};
ib1.but.onRollOut = function () {
ib1.desc._visible = false;
};
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib3.but.onRollOver = function () {
ib3.desc._visible = true;
};
ib3.but.onRollOut = function () {
ib3.desc._visible = false;
};
ib1.but.onPress = function () {
playSound("click");
if (_root.sound == true) {
_root.sound = false;
ib1.gotoAndStop(2);
} else {
_root.sound = true;
ib1.gotoAndStop(1);
}
};
ib2.but.onPress = function () {
playSound("click");
if (_root.music == true) {
_root.music = false;
playMusic("stop");
ib2.gotoAndStop(2);
} else {
_root.music = true;
playMusic("pre");
ib2.gotoAndStop(1);
}
};
ib3.but.onPress = function () {
ib3.desc._visible = false;
playSound("click");
if (_root.paused == false) {
showLogo(5);
openMenu("game");
_root.musicVol.setVolume(0);
}
};
ib1.desc.text = "\u00C2m thanh";
ib2.desc.text = "Nh\u1EA1c";
ib3.desc.text = "T\u1EA1m d\u1EEBng";
Symbol 2745 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
mousePressed = false;
playSound("click");
gotoAndPlay ("on");
_root.reload = 5;
_root.selectMine(img._currentframe);
}
Symbol 2750 MovieClip Frame 1
stop();
Symbol 2751 MovieClip Frame 1
stop();
Symbol 2751 MovieClip Frame 7
stop();
Symbol 2759 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
_root.reload = 2;
_root.cursor.gotoAndStop(1);
_root["mine" + _root.curr_mine].img.select._visible = false;
}
Symbol 2809 MovieClip Frame 1
stop();
Symbol 2815 MovieClip Frame 1
stop();
Symbol 2862 MovieClip Frame 1
stop();
Symbol 2907 MovieClip Frame 1
stop();
Symbol 2954 MovieClip Frame 1
stop();
Symbol 3001 MovieClip Frame 1
stop();
Symbol 3048 MovieClip Frame 1
stop();
Symbol 3095 MovieClip Frame 1
stop();
Symbol 3142 MovieClip Frame 1
stop();
Symbol 3187 MovieClip Frame 1
stop();
Symbol 3234 MovieClip Frame 1
stop();
Symbol 3235 MovieClip Frame 1
gotoAndStop(_root.handnum);
Symbol 3239 MovieClip Frame 1
stop();
Symbol 3239 MovieClip Frame 2
createInterPart(_parent._x + 24, _parent._y + 20, "clip1");
Symbol 3249 MovieClip Frame 1
stop();
Symbol 3249 MovieClip Frame 2
createInterPart(_parent._x + 32, _parent._y + 26, "clip1");
Symbol 3256 MovieClip Frame 1
stop();
Symbol 3256 MovieClip Frame 2
createInterPart(_parent._x + 24, _parent._y + 20, "clip2");
Symbol 3287 MovieClip Frame 1
stop();
Symbol 3294 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 3297 MovieClip Frame 1
ammo = 0;
speed = 0;
_root.pre_weap = 1;
lopata.rad._visible = false;
_root.butdrop._visible = false;
stop();
onEnterFrame = function () {
_x = _root._xmouse;
_y = _root._ymouse;
if (_xscale != 100) {
if (_xscale > 100) {
_yscale = (_yscale - 5);
_xscale = (_yscale - 5);
} else {
_yscale = 100;
_xscale = 100;
}
}
};
Symbol 3297 MovieClip Frame 2
if ((_root.minigame == 1) || (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipPistol;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 3);
Symbol 3297 MovieClip Frame 3
if ((_root.minigame == 1) || (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipGun;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 4);
Symbol 3297 MovieClip Frame 4
if ((_root.minigame == 1) || (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipShot;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 3);
Symbol 3297 MovieClip Frame 5
if ((_root.minigame == 1) || (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipTesla;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 4);
Symbol 3297 MovieClip Frame 6
if ((_root.minigame == 1) || (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipGauss;
} else {
ammo = _root.pre_ammo;
}
ammoend = Math.ceil(ammo / 5);
Symbol 3297 MovieClip Frame 7
if ((_root.minigame == 1) || (_root.unlimammo == true)) {
ammo = 999999 /* 0x0F423F */;
} else if (_root.pre_weap == 1) {
ammo = _root.clipRocket;
} else {
ammo = _root.pre_ammo;
}
rad._xscale = (rad._yscale = _root.radRocket * 2);
ammoend = Math.ceil(ammo / 3) + 1;
Symbol 3297 MovieClip Frame 8
ammo = -1;
Symbol 3297 MovieClip Frame 9
ammo = -1;
rad._xscale = (rad._yscale = _root.radBomb * 2);
Symbol 3297 MovieClip Frame 10
ammo = -1;
Symbol 3297 MovieClip Frame 11
ammo = -1;
Symbol 3297 MovieClip Frame 12
ammo = -1;
rad._xscale = (rad._yscale = _root.radBomb * 2);
Symbol 3297 MovieClip Frame 13
ammo = -1;
rad._xscale = (rad._yscale = _root.radTesla * 2);
Symbol 3313 MovieClip Frame 1
stop();
Symbol 3327 Button
on (press) {
var gname = "mushroom_madness_3";
var gscore = _root.tongtien;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
}
Symbol 3341 Button
on (rollOver) {
_parent.mess.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.text = "";
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.mess.text = "";
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
eff.gotoAndPlay(2);
x = _parent._x + _x;
y = _parent._y + _y;
z = 13;
while (z--) {
createInterPart(x + (20 * z), y + random(43), "star2");
}
playSound("buy");
}
}
}
Symbol 3404 MovieClip Frame 1
stop();
Symbol 3427 Button
on (rollOver) {
_parent.mess.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.text = "";
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.mess.text = "";
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
eff.gotoAndPlay(2);
x = (_parent._x + _x) - 44;
y = (_parent._y + _y) - 30;
z = 9;
while (z--) {
createInterPart(x + (10 * z), y + random(70), "star2");
}
playSound("buy");
}
}
}
Symbol 3432 MovieClip Frame 1
stop();
Symbol 3446 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 3447 MovieClip Frame 4
if (_root.handnum == (id - 9)) {
selback._visible = true;
} else {
selback._visible = false;
}
Symbol 3458 Button
on (rollOver) {
_parent.mess.text = _root["str_desc_" + id];
playSound("over");
}
on (rollOut) {
_parent.mess.text = "";
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_parent.mess.text = "";
_root.money = Math.round(_root.money - cost);
doUpgr(id);
reUpgr(_parent);
eff.gotoAndPlay(2);
x = (_parent._x + _x) - 44;
y = (_parent._y + _y) - 30;
z = 9;
while (z--) {
createInterPart(x + (10 * z), y + random(70), "star2");
}
playSound("buy");
}
}
}
Symbol 3462 MovieClip Frame 1
stop();
Symbol 3470 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.upgr[id] == 11) {
selback._visible = false;
_root.upgr[id] = 12;
} else {
selback._visible = true;
_root.upgr[id] = 11;
}
_root.vipChange();
}
}
}
Symbol 3471 MovieClip Frame 4
if (_root.upgr[id] == 11) {
selback._visible = true;
} else {
selback._visible = false;
}
Symbol 3491 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndPlay ("on");
}
Symbol 3495 MovieClip Frame 1
stop();
Symbol 3495 MovieClip Frame 7
stop();
Symbol 3512 MovieClip Frame 1
stop();
Symbol 3525 Button
on (rollOver) {
playSound("over");
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
playSound("click");
gotoAndPlay ("on");
}
Symbol 3547 MovieClip Frame 1
stop();
Symbol 3547 MovieClip Frame 7
stop();
Symbol 3547 MovieClip Frame 13
gotoAndStop (1);
Symbol 3566 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.lvlmode = this.mode;
_root.minigame = this.minigame;
openScreen("game");
}
}
}
Symbol 3586 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = this.id;
_root.lvlmode = this.mode;
_root.minigame = this.minigame;
_root.money = _root.money - need;
_root.bonus_cost = need;
openScreen("game");
}
}
}
Symbol 3596 Button
on (rollOver) {
playSound("over");
}
on (press) {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvlmode = this.mode;
_root.minigame = this.minigame;
_root.lvl = this.title;
openScreen("game");
}
}
}
Symbol 3597 MovieClip Frame 1
onEnterFrame = function () {
if (timer > 0) {
timer--;
} else if (_xscale < 100) {
_xscale = (_xscale + 20);
_yscale = _xscale;
_alpha = _xscale;
}
};
Symbol 3609 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (2);
_parent.icon.gotoAndStop(2);
_parent.txtcost._visible = false;
playSound("star");
if (award == true) {
obj = _root.attachMovie("scoreobj", "score", _root.getNextHighestDepth());
obj._x = (_parent._x + _parent._parent._x) + 100;
obj._y = _parent._y + _parent._parent._y;
obj.gotoAndStop(5);
obj.combo.combo.count.text = ("+" + _parent.cost) + " $";
}
}
}
};
stop();
Symbol 3609 MovieClip Frame 13
stop();
Symbol 3623 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
visitSite(lnk);
}
Symbol 3638 MovieClip Frame 1
stop();
title = "Ch\u01A1i\nMushroom Madness";
lnk = "MM1";
Symbol 3638 MovieClip Frame 2
title = "Ch\u01A1i\nMushroom Madness 2";
lnk = "MM2";
Symbol 3638 MovieClip Frame 3
title = "Ch\u01A1i Pikachu\nPikachu";
lnk = "PPC";
Symbol 3638 MovieClip Frame 4
title = "Ch\u01A1i\nAngry Birds - Nh\u1EEFng ch\u00FA chim n\u1ED5i gi\u1EADn";
lnk = "GSB";
Symbol 3638 MovieClip Frame 5
title = "Ch\u01A1i\nC\u00F4ng ch\u00FAa ng\u1EE7 trong r\u1EEBng";
lnk = "FC";
Symbol 3638 MovieClip Frame 6
title = "Ch\u01A1i\nK\u1EBB c\u1EAFp g\u1EB7p b\u00E0 gi\u00E0";
lnk = "IG";
Symbol 3638 MovieClip Frame 7
title = "Ch\u01A1i\nPikachu phi\u00EAn b\u1EA3n m\u1EDBi";
lnk = "TBW";
Symbol 3638 MovieClip Frame 8
title = "Ch\u01A1i\nNinja s\u01A1n t\u01B0\u1EDDng";
lnk = "NP";
Symbol 3667 MovieClip Frame 1
stop();
Symbol 3672 MovieClip Frame 1
stop();
Symbol 3675 MovieClip Frame 1
stop();
Symbol 3676 MovieClip Frame 1
stop();
Symbol 3677 MovieClip Frame 1
stop();
Symbol 3700 MovieClip Frame 1
stop();
Symbol 3764 MovieClip Frame 1
stop();
Symbol 3766 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 3766 MovieClip Frame 2
_root.menubut2._visible = true;
hiendiem.text = _root.tongtien;
trace("Money: " + _root.money);
mess.text = "";
reUpgr(this);
getUpgrDone();
xbut1.title = "Ti\u1EBFp t\u1EE5c";
xbut1.but.onPress = function () {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openScreen("stage");
}
}
};
Symbol 3766 MovieClip Frame 11
_root.menubut2._visible = true;
but1.title = "Ti\u1EBFp t\u1EE5c";
but2.title = "H\u01B0\u1EDBng d\u1EABn";
but3.title = "Server game";
but4.title = "Ch\u01A1i l\u1EA1i c\u1EEDa";
but5.title = "Game kh\u00E1c";
but6.title = "L\u01B0u v\u00E0 Tho\u00E1t";
if ((_root.minigame == 3) || (_root.minigame == 7)) {
but4._visible = false;
} else {
but4._visible = true;
}
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.musicVol.setVolume(100);
showLogo(0);
_root.menubut._visible = true;
openMenu("exit");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("hint");
}
}
};
but3.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("http://game.24h.com.vn/");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("game");
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("http://game.24h.com.vn/");
}
}
};
but6.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.minigame == 6) {
if (_root.surscore < _root.curr_money) {
_root.surscore = _root.curr_money;
}
_root.money = _root.money + _root.curr_money;
}
saveGame();
_root.lvl = 0;
_root.bonus = 0;
_root.minigame = 0;
openScreen("stage");
}
}
};
Symbol 3766 MovieClip Frame 21
_root.menubut2._visible = true;
but1.title = "B\u1EAFt \u0111\u1EA7u";
but2.title = "Server game";
but3.title = "H\u01B0\u1EDBng d\u1EABn";
but4.title = "T\u00E1c gi\u1EA3";
but5.title = "Game kh\u00E1c";
but6.title = "Trang ch\u1EE7";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.sav[2][1][0] != -1) {
openMenu("cont");
} else {
createInterPart(350, 300, "nuke1");
playSound("nuke");
openScreen("stage");
}
}
}
};
but2.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("walk");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("hint");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("cred");
}
}
};
but5.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but6.but.onRelease = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("add");
}
}
};
Symbol 3766 MovieClip Frame 31
_root.menubut2._visible = true;
but5.title = "Ti\u1EBFp t\u1EE5c";
if (_root.sound == true) {
but1.title = "Ti\u1EBFng: B\u1EADt";
} else {
but1.title = "Ti\u1EBFng: T\u1EAFt";
}
if (_root.music == true) {
but2.title = "Nh\u1EA1c: B\u1EADt";
} else {
but2.title = "Nh\u1EA1c: T\u1EAFt";
}
if (_root.effect == true) {
but3.title = "H\u00ECnh \u1EA3nh FX: B\u1EADt";
} else {
but3.title = "H\u00ECnh \u1EA3nh FX: B\u1EADt";
}
if (_root.hint == true) {
but4.title = "G\u1EE3i \u00FD: B\u1EADt";
} else {
but4.title = "G\u1EE3i \u00FD: T\u1EAFt";
}
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.sound == true) {
_root.sound = false;
but1.title = "Ti\u1EBFng: T\u1EAFt";
} else {
_root.sound = true;
but1.title = "Ti\u1EBFng: B\u1EADt";
}
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.music == true) {
_root.music = false;
but2.title = "Nh\u1EA1c: T\u1EAFt";
playMusic("stop");
} else {
_root.music = true;
but2.title = "Nh\u1EA1c: B\u1EADt";
playMusic("pre");
}
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.effect == true) {
_root.effect = false;
but3.title = "H\u00ECnh \u1EA3nh FX: T\u1EAFt";
} else {
_root.effect = true;
but3.title = "H\u00ECnh \u1EA3nh FX: B\u1EADt";
}
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.hint == true) {
_root.hint = false;
but4.title = "G\u1EE3i \u00FD: T\u1EAFt";
} else {
_root.hint = true;
but4.title = "G\u1EE3i \u00FD: B\u1EADt";
}
}
}
};
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openMenu("back");
}
}
};
Symbol 3766 MovieClip Frame 41
_root.menubut2._visible = true;
i = 1;
while (i < 4) {
this["star" + i].gotoAndPlay(_root.sav[0][i - 1] + 1);
i++;
}
but1.title = "D\u1EC5";
but2.title = "Trung b\u00ECnh";
but3.title = "Kh\u00F3";
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 3766 MovieClip Frame 51
_root.menubut2._visible = true;
but1.title = "Ti\u1EBFp t\u1EE5c";
but2.title = "Game m\u1EDBi";
but3.title = "Quay l\u1EA1i";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
createInterPart(350, 300, "nuke1");
playSound("nuke");
openScreen("stage");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
resetGame();
saveGame();
createInterPart(350, 300, "nuke1");
playSound("launch");
openScreen("stage");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
};
Symbol 3766 MovieClip Frame 61
_root.menubut2._visible = true;
i = 1;
while (i < 10) {
z = this["mode" + i];
z.id = i;
z.newimg._visible = false;
if (_root.modes[i][3] <= _root.stat[7]) {
z.gotoAndStop(1);
if ((((_root.sav[i][1][0] == -1) & (i != 3)) & (i != 8)) & (i != 9)) {
z.newimg._visible = true;
}
} else {
z.gotoAndStop("lock");
z.need.text = "C\u1EA7n " + _root.modes[i][3];
}
z.title = _root.modes[i][0];
z.desc = _root.modes[i][5];
z.img.gotoAndStop(i);
z.img.comp._visible = false;
z.img.perc._visible = false;
if ((i < 8) & (_root.modes[i][3] <= _root.stat[7])) {
z.img.perc._visible = true;
if (i == 3) {
z.img.perc.text = "K\u1EF7 l\u1EE5c c\u1EEDa: " + _root.stat[8];
} else {
z.perc = Math.round((getStarDone(i) * 100) / (_root.modes[i][2] * 3));
z.img.perc.text = z.perc + "% Ho\u00E0n th\u00E0nh";
if (z.perc > 99) {
z.img.comp._visible = true;
}
}
}
i++;
}
stars.text = _root.stat[7];
showLevels = function (type) {
_root.modeselect = type;
i = 1;
while (i < 10) {
this["mode" + i].img.select._visible = false;
i++;
}
this["mode" + type].img.select._visible = true;
modename.text = _root.modes[type][0] + " M\u00E0n";
modedesc.text = _root.modes[type][5];
if (_root.modes[type][4] > 0) {
modestars._visible = true;
modestars.stars.text = getStarDone(type);
modestars.maxstars.text = "/" + (_root.modes[type][2] * 3);
} else {
modestars._visible = false;
}
i = 1;
while (i < 16) {
z = this["l" + i];
z._xscale = 0;
z.timer = i;
z.mode = type;
if (i > _root.modes[type][2]) {
z._visible = false;
} else {
z._visible = true;
z.id = i;
z.title = i;
z.minigame = _root.modes[type][1];
switch (type) {
case 3 :
if (i == 1) {
z.title = 1;
} else {
z.title = (i - 1) * 5;
}
if ((z.title != 1) & (_root.stat[8] < z.title)) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(5);
}
break;
case 8 :
z.need = (z.id * 250) * _root.bonusDeposit;
if (_root.money < z.need) {
z.gotoAndStop(4);
} else {
z.gotoAndStop(3);
}
break;
case 9 :
z.need = (z.id * 500) * _root.bonusDeposit;
if (_root.money < z.need) {
z.gotoAndStop(4);
} else {
z.gotoAndStop(3);
}
break;
default :
if (_root.sav[type][i][0] == -2) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
z.star.gotoAndStop(((2 + _root.sav[type][i][0]) + _root.sav[type][i][1]) + _root.sav[type][i][2]);
}
}
}
i++;
}
};
showLevels(_root.modeselect);
mode1.but.onPress = function () {
showLevels(1);
};
mode2.but.onPress = function () {
showLevels(2);
};
mode3.but.onPress = function () {
showLevels(3);
};
mode4.but.onPress = function () {
showLevels(4);
};
mode5.but.onPress = function () {
showLevels(5);
};
mode6.but.onPress = function () {
showLevels(6);
};
mode7.but.onPress = function () {
showLevels(7);
};
mode8.but.onPress = function () {
showLevels(8);
};
mode9.but.onPress = function () {
showLevels(9);
};
gachis = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
if (_root.gachi[i][j] == -1) {
gachis++;
}
j++;
}
i++;
}
kongsend("achievements", gachis);
kongsend("enemies", _root.stat[0]);
kongsend("money", _root.stat[2]);
kongsend("quests", _root.stat[7]);
kongsend("upgrades", _root.stat[6]);
trace("achi=" + gachis);
xbut1.title = "Shop v\u0169 kh\u00ED";
achibut.title = ("Th\u00E0nh t\u00EDch \u0111\u1EA1t \u0111\u01B0\u1EE3c " + gachis) + "/40";
xbut3.title = "L\u01B0u v\u00E0 Tho\u00E1t";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("upgr");
}
}
};
achibut.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("achi");
}
}
};
xbut3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
openScreen("main");
}
}
};
Symbol 3766 MovieClip Frame 71
_root.menubut2._visible = true;
if ((_root.stat[7] > 5) & ((_root.lvl % 2) == 0)) {
ads1._visible = true;
ads2._visible = true;
ads1.img.gotoAndStop(1 + random(8));
do {
ads2.img.gotoAndStop(1 + random(8));
} while (ads1.img._currentframe == ads2.img._currentframe);
} else {
ads1._visible = false;
ads2._visible = false;
}
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Nhi\u1EC7m v\u1EE5";
starscnt = 0;
i = 0;
while (i < 3) {
z = this["but" + i];
z.type = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][0];
z.need = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][1];
z.cost = _root.lvl * 100;
z.quest.gotoAndStop(z.type + 1);
z.icon.gotoAndStop(_root.sav[_root.lvlmode][_root.lvl][i] + 1);
z.txt1.text = z.need;
z.txt2.text = _root["str_achi_" + z.type];
if (_root.sav[_root.lvlmode][_root.lvl][i] == 1) {
z.back.gotoAndStop("on");
z.txtcost._visible = false;
} else {
z.back.gotoAndStop("off");
z.txtcost._visible = true;
z.txtcost.text = ("+" + z.cost) + " $";
}
z.back.timer = 0;
z.back.award = false;
if (z.need <= _root.achi[z.type]) {
starscnt++;
z.back.timer = (10 * i) + 20;
if (_root.sav[_root.lvlmode][_root.lvl][i] < 1) {
_root.sav[_root.lvlmode][_root.lvl][i] = 1;
_root.curr_money = _root.curr_money + z.cost;
addStat(2, z.cost);
z.back.award = true;
}
}
i++;
}
if (starscnt == 3) {
playSound("holy");
_root.warachi.gotoAndPlay(2);
}
_root.money = _root.money + _root.curr_money;
_root.tongtien = _root.tongtien + _root.curr_money;
if (_root.sav[_root.lvlmode][_root.lvl][0] == -1) {
_root.sav[_root.lvlmode][_root.lvl][0] = 0;
}
if (_root.sav[_root.lvlmode][_root.lvl + 1][0] == -2) {
_root.sav[_root.lvlmode][_root.lvl + 1][0] = -1;
}
addStat(1, _root.achi[17]);
setStat(13, 1);
setStat(7, getStarDone(0));
setStat(_root.modes[1][4], getLevelDone(1));
setStat(_root.modes[2][4], getLevelDone(2));
setStat(_root.modes[4][4], getLevelDone(4));
setStat(_root.modes[5][4], getLevelDone(5));
setStat(_root.modes[6][4], getLevelDone(6));
setStat(_root.modes[7][4], getLevelDone(7));
saveGame();
kongsend("enemies", _root.stat[0]);
kongsend("money", _root.stat[2]);
if (_root.stat[14] == 16) {
kongsend("adventure_complete", 1);
}
if (_root.stat[15] == 8) {
kongsend("rush_complete", 1);
}
if (_root.stat[16] == 8) {
kongsend("defence_complete", 1);
}
xbut1.title = "Ti\u1EBFp t\u1EE5c";
xbut2.title = "Ch\u01A1i l\u1EA1i c\u1EEDa";
xbut3.title = "Game kh\u00E1c";
xbut4.title = "L\u01B0u v\u00E0 Tho\u00E1t";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if ((_root.lvlmode == 4) & (_root.lvl == 15)) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
};
xbut2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("game");
}
}
};
xbut3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
xbut4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = 0;
openScreen("main");
}
}
};
Symbol 3766 MovieClip Frame 81
_root.menubut2._visible = true;
t1._visible = false;
t2._visible = false;
t3._visible = false;
t4._visible = false;
if (_root.lvlmode == 2) {
reHint(this, _root.lvl);
}
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Nhi\u1EC7m v\u1EE5";
i = 0;
while (i < 3) {
z = this["but" + i];
trace((_root.lvlmode + " achi ") + _root.lvl);
z.type = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][0];
z.need = _root[(("mode" + _root.lvlmode) + "achi") + _root.lvl][i][1];
z.cost = _root.lvl * 100;
z.quest.gotoAndStop(z.type + 1);
z.icon.gotoAndStop(_root.sav[_root.lvlmode][_root.lvl][i] + 1);
z.txt1.text = z.need;
z.txt2.text = _root["str_achi_" + z.type];
if (_root.sav[_root.lvlmode][_root.lvl][i] == 1) {
z.back.gotoAndStop("on");
z.txtcost._visible = false;
} else {
z.back.gotoAndStop("off");
z.txtcost._visible = true;
z.txtcost.text = ("+" + z.cost) + " $";
}
i++;
}
xbut1.title = "Ti\u1EBFp t\u1EE5c";
xbut1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
showLogo(0);
playMusic("muz");
_root.menubut._visible = true;
if (_root.randweap == true) {
_root.butdrop._visible = true;
}
playVocal();
openMenu("exit");
}
}
};
Playtomic.Log.LevelCounterMetric("Plays", (_root.lvlmode * 100) + _root.lvl);
Symbol 3766 MovieClip Frame 91
_root.menubut2._visible = true;
playSound("gameover");
record = _root.surscore;
if (_root.surscore < _root.curr_money) {
_root.surscore = _root.curr_money;
beat_txt._visible = true;
} else {
beat_txt._visible = false;
}
setStat(8, _root.mini_diff);
_root.money = _root.money + _root.curr_money;
_root.tongtien = _root.tongtien + _root.curr_money;
saveGame();
kongsend("survival_score", _root.surscore);
kongsend("survival_level", _root.stat[8]);
but1.title = "Ti\u1EBFp t\u1EE5c";
but2.title = "Game kh\u00E1c";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("upgr");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
Symbol 3766 MovieClip Frame 101
_root.menubut2._visible = true;
setStat(11, 1);
hints.gotoAndStop(3);
reHint(hints, 0);
but1.title = "T\u00F9y ch\u1ECDn";
but2.title = "V\u1EADt ph\u1EA9m";
but3.title = "Lo\u00E0i th\u00FA";
but4.title = "V\u0169 kh\u00ED";
but5.title = "Quay l\u1EA1i";
title = "H\u01B0\u1EDBng d\u1EABn - Lo\u00E0i th\u00FA";
but5.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("back");
}
}
};
but1.but.onPress = function () {
hints.gotoAndStop(1);
reHint(hints, 0);
title = "H\u01B0\u1EDBng d\u1EABn - T\u00F9y ch\u1ECDn";
};
but2.but.onPress = function () {
hints.gotoAndStop(2);
reHint(hints, 0);
title = "H\u01B0\u1EDBng d\u1EABn - V\u1EADt ph\u1EA9m";
};
but3.but.onPress = function () {
hints.gotoAndStop(3);
reHint(hints, 0);
title = "H\u01B0\u1EDBng d\u1EABn - Lo\u00E0i th\u00FA";
};
but4.but.onPress = function () {
hints.gotoAndStop(4);
reHint(hints, 0);
title = "H\u01B0\u1EDBng d\u1EABn - V\u0169 kh\u00ED";
};
Symbol 3766 MovieClip Frame 111
_root.menubut2._visible = true;
playSound("vocal_14");
ads1._visible = true;
ads2._visible = true;
ads1.img.gotoAndStop(1 + random(8));
do {
ads2.img.gotoAndStop(1 + random(8));
} while (ads1.img._currentframe == ads2.img._currentframe);
but1.title = "Th\u1EED l\u1EA1i";
but2.title = "Server game";
but3.title = "Game kh\u00E1c";
but4.title = "L\u01B0u v\u00E0 Tho\u00E1t";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("game");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("walk");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but4.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
}
}
};
Playtomic.Log.LevelCounterMetric("GameOver", (_root.lvlmode * 100) + _root.lvl);
Symbol 3766 MovieClip Frame 121
_root.menubut2._visible = true;
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Th\u01B0\u1EDFng";
profit = _root.curr_money - _root.bonus_cost;
outgo_txt.text = "-" + _root.bonus_cost;
income_txt.text = _root.curr_money;
profit_txt.text = profit + "";
trace(profit);
if (profit < 0) {
playSound("vocal_14");
noprofit._visible = true;
profit_txt._visible = (profit_icon._visible = false);
} else {
playSound("win");
noprofit._visible = false;
profit_txt._visible = (profit_icon._visible = true);
_root.warachi.gotoAndPlay(2);
}
_root.money = _root.money + _root.curr_money;
_root.tongtien = _root.tongtien + _root.curr_money;
saveGame();
but1.title = "Ti\u1EBFp t\u1EE5c";
but2.title = "Game kh\u00E1c";
but3.title = "L\u01B0u v\u00E0 Tho\u00E1t";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
if (_root.lvl == 24) {
openScreen("vict");
} else {
openScreen("upgr");
}
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
but3.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.lvl = 0;
openScreen("main");
}
}
};
Symbol 3766 MovieClip Frame 131
_root.menubut2._visible = true;
but1.title = _root.str_but_mini1;
but2.title = _root.str_but_mini2;
but3.title = _root.str_but_mini3;
but4.title = _root.str_but_mini4;
but5.title = _root.str_but_mini5;
i = 1;
while (i < 6) {
z = this["but" + i];
z.id = i;
if (_root.sav[24 + i] != undefined) {
z.gotoAndStop(1);
} else {
z.gotoAndStop(2);
}
i++;
}
but1.title = "C\u00F4ng k\u00EDch";
but2.title = "G\u00E0i b\u1EABy";
but3.title = "\u0110\u00EAm t\u1ED1i";
but4.title = "S\u0103n v\u1ECBt";
but5.title = "\u0110\u1EADp h\u1ED9p";
but6.title = "Quay l\u1EA1i";
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 3766 MovieClip Frame 141
_root.menubut2._visible = true;
if (_root.minigame == 6) {
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.mini_diff) + " C\u1EEDa";
survstat._visible = true;
survstat.maxwave.text = _root.stat[8];
survstat.maxscore.text = _root.surscore;
} else {
title = ((_root.modes[_root.lvlmode][0] + " ") + _root.lvl) + " Th\u01B0\u1EDFng";
survstat._visible = false;
}
desc = _root.modes[_root.lvlmode][5];
if (_root.minigame == 3) {
if (_root.key == 1) {
desc = desc + (("\nB\u1EA1n c\u00F3 " + _root.key) + " kh\u00F3a.");
} else {
desc = desc + (("\nB\u1EA1n c\u00F3 " + _root.key) + " kh\u00F3a.");
}
}
but1.title = "Ti\u1EBFp t\u1EE5c";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
_root.menubut._visible = true;
showLogo(0);
openMenu("exit");
playMusic("muz_0");
}
}
};
Symbol 3766 MovieClip Frame 151
_root.menubut2._visible = true;
but1.title = "Quay l\u1EA1i";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openMenu("main");
}
}
};
Instance of Symbol 3729 MovieClip in Symbol 3766 MovieClip Frame 151
on (release) {
getURL ("http://game.24h.com.vn/", "_blank");
}
Symbol 3766 MovieClip Frame 161
_root.menubut2._visible = true;
desc = "B\u1EA1n \u0111\u00E3 ho\u00E0n th\u00E0nh ch\u1EBF \u0111\u1ED9 ch\u01A1i ph\u01B0u l\u01B0u!\nH\u00E3y th\u1EED c\u00E1c game ph\u1EE5 \u0111\u1EC3 \u0111\u1EA1t \u0111\u01B0\u1EE3c \u0111i\u1EC3m cao nh\u1EA5t.!";
but1.title = "Ti\u1EBFp t\u1EE5c";
but2.title = "Game kh\u00E1c";
but1.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
openScreen("stage");
}
}
};
but2.but.onPress = function () {
if (_xscale == 100) {
if (_root.trans_delay == false) {
visitSite("spon");
}
}
};
Symbol 3766 MovieClip Frame 171
_root.menubut2._visible = false;
gachis = 0;
bonushave = 0;
bonusall = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
z = this[("but" + i) + j];
z.cost = _root[(("but" + i) + j) + "cost"];
z.title = _root[(("but" + i) + j) + "title"];
z.desc = _root[(("but" + i) + j) + "desc"];
z.have = _root.stat[i];
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(1);
bonushave = bonushave + z.cost;
gachis++;
} else {
z.perc = Math.floor((_root.stat[i] / _root.gachi[i][j]) * 100) + "%";
z.gotoAndStop(2);
}
if (z.cost > 0) {
bonusall = bonusall + z.cost;
if (z.cost < 1000) {
z.costtxt.text = z.cost;
} else {
z.costtxt.text = (z.cost / 1000) + "K";
}
}
j++;
}
i++;
}
if (_root.surv_allow == true) {
achitxt._visible = false;
} else {
achitxt._visible = true;
}
xbut1.title = "Quay l\u1EA1i";
xbut1.but.onPress = function () {
playSound("click");
if (_xscale == 100) {
if (_root.trans_delay == false) {
saveGame();
if (backmenu == "stage") {
openScreen("stage");
} else {
openScreen("main");
}
}
}
};
Symbol 3766 MovieClip Frame 181
_root.menubut2._visible = false;
Symbol 3767 MovieClip Frame 1
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
ib1.desc.text = "SOUND";
ib2.desc.text = "MUSIC";
ib1.desc._visible = false;
ib2.desc._visible = false;
ib1.but.onRollOver = function () {
ib1.desc._visible = true;
};
ib1.but.onRollOut = function () {
ib1.desc._visible = false;
};
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib1.but.onPress = function () {
playSound("click");
if (_root.sound == true) {
_root.sound = false;
ib1.gotoAndStop(2);
_root.menubut.ib1.gotoAndStop(2);
} else {
_root.sound = true;
ib1.gotoAndStop(1);
_root.menubut.ib1.gotoAndStop(1);
}
};
ib2.but.onPress = function () {
playSound("click");
if (_root.music == true) {
_root.music = false;
playMusic("stop");
ib2.gotoAndStop(2);
_root.menubut.ib2.gotoAndStop(2);
} else {
_root.music = true;
playMusic("pre");
ib2.gotoAndStop(1);
_root.menubut.ib2.gotoAndStop(1);
}
};
Symbol 3773 MovieClip Frame 1
stop();
Symbol 3774 MovieClip Frame 1
stop();
Symbol 3774 MovieClip Frame 2
play();
Symbol 3774 MovieClip Frame 15
stop();
switch (img._currentframe) {
case 1 :
openMenu("main");
break;
case 2 :
if (((_root.minigame == 3) || (_root.minigame == 6)) || (_root.minigame == 7)) {
openMenu("minirdy");
} else {
openMenu("ready");
}
break;
case 3 :
if ((_root.minigame == 3) || (_root.minigame == 7)) {
openMenu("bonusscore");
} else {
playSound("win");
openMenu("score");
}
break;
case 4 :
openMenu("over");
playSound("gameover");
break;
case 6 :
openMenu("vict");
playSound("win");
}
Symbol 3805 MovieClip Frame 1
stop();
Symbol 3805 MovieClip Frame 8
_root.musicVol.setVolume(90);
Symbol 3805 MovieClip Frame 9
_root.musicVol.setVolume(80);
Symbol 3805 MovieClip Frame 10
_root.musicVol.setVolume(70);
Symbol 3805 MovieClip Frame 11
_root.musicVol.setVolume(60);
Symbol 3805 MovieClip Frame 12
_root.musicVol.setVolume(50);
Symbol 3805 MovieClip Frame 13
_root.musicVol.setVolume(40);
Symbol 3805 MovieClip Frame 14
_root.musicVol.setVolume(30);
Symbol 3805 MovieClip Frame 15
_root.musicVol.setVolume(20);
Symbol 3805 MovieClip Frame 16
_root.musicVol.setVolume(10);
Symbol 3805 MovieClip Frame 17
_root.musicVol.setVolume(0);
Symbol 3805 MovieClip Frame 18
clearLevel();
switch (tar) {
case "achi" :
_root.back.gotoAndStop(11);
_root.back.img.lin._visible = false;
openMenu(tar, true);
playMusic("amb_night");
_root.silenlogo._visible = false;
_root.kinglogo._visible = false;
break;
case "main" :
_root.back.gotoAndStop(9);
openMenu("exit", true);
playMusic("muz_0");
_root.silenlogo._visible = true;
_root.lvl = 0;
_root.kinglogo._visible = true;
break;
case "vict" :
_root.back.gotoAndStop(10);
openMenu("exit", true);
playMusic("muz_0");
break;
case "game" :
switch (_root.lvlmode) {
case 1 :
if (_root.lvl == 1) {
_root.weather = 6;
} else {
_root.weather = 7;
}
break;
case 5 :
_root.weather = 8;
break;
case 3 :
_root.weather = 1 + random(5);
break;
case 9 :
_root.weather = 6;
break;
default :
_root.weather = ((_root.lvl - 1) % 5) + 1;
}
_root.back.gotoAndStop(_root.weather);
loadLevel();
showMines(true);
addStat(18, 1);
openMenu("exit", true);
playMusic("amb_day");
_root.silenlogo._visible = false;
_root.kinglogo._visible = true;
if (_root.cursor._currentframe > 1) {
_root.butdrop._visible = true;
}
break;
case "upgr" :
_root.back.gotoAndStop(11);
_root.back.img.lin._visible = false;
openMenu(tar, true);
playMusic("amb_night");
_root.kinglogo._visible = false;
_root.silenlogo._visible = false;
break;
case "stage" :
_root.back.gotoAndStop(11);
_root.back.img.lin._visible = false;
openMenu(tar, true);
playMusic("amb_night");
_root.silenlogo._visible = false;
_root.kinglogo._visible = false;
break;
case "send" :
_root.back.gotoAndStop(1);
openMenu(tar, true);
}
Symbol 3805 MovieClip Frame 21
_root.musicVol.setVolume(0);
Symbol 3805 MovieClip Frame 22
_root.musicVol.setVolume(10);
Symbol 3805 MovieClip Frame 23
_root.musicVol.setVolume(20);
Symbol 3805 MovieClip Frame 24
_root.musicVol.setVolume(30);
Symbol 3805 MovieClip Frame 25
_root.musicVol.setVolume(40);
Symbol 3805 MovieClip Frame 26
_root.musicVol.setVolume(50);
Symbol 3805 MovieClip Frame 27
_root.musicVol.setVolume(60);
Symbol 3805 MovieClip Frame 28
_root.musicVol.setVolume(70);
Symbol 3805 MovieClip Frame 29
_root.musicVol.setVolume(80);
Symbol 3805 MovieClip Frame 30
_root.musicVol.setVolume(90);
Symbol 3805 MovieClip Frame 31
_root.musicVol.setVolume(100);
Symbol 3805 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 3809 MovieClip Frame 1
stop();
Symbol 3810 MovieClip Frame 1
stop();
Symbol 3810 MovieClip Frame 2
if (cost < 1000) {
img.costtxt.text = cost;
} else {
img.costtxt.text = (cost / 1000) + "K";
}
Symbol 3810 MovieClip Frame 11
x = _x - 70;
y = _y - 20;
z = 11;
while (z--) {
createInterPart(x + (20 * z), y + random(40), "star2");
}
playSound("holy");
Symbol 3812 MovieClip Frame 1
stop();
Symbol 3816 MovieClip Frame 1
stop();
Symbol 3816 MovieClip Frame 9
playSound(choose("vocal_10", "vocal_15", "vocal_16"));