Frame 1
function unloadcpm(cpm_allowed) {
unload_cpm = true;
domain_part = _url.split("://");
real_domains = domain_part[1].split("/");
domain.text = real_domains[0];
for (x in cpm_allowed) {
if (cpm_allowed[x] == real_domains[0]) {
unload_cpm = false;
}
}
if (unload_cpm) {
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
}
}
var PATH = "http://www.blitzgamer.com/blitz_HighScores/";
var GAMENAME = "sfallen";
var SCORESPATH = (("http://www.blitzgamer.com/" + GAMENAME) + "_highscores.php");
var preloader_timer = 440;
var preload_finish = false;
mc_loadinfo._visible = false;
bt_skip._visible = false;
bt_buttonplay.stop();
onEnterFrame = function () {
seconds = int(preloader_timer / 40);
mc_loadinfo.info_load = ("THE GAME WILL LOAD IN " + seconds) + " SECONDS";
if (preloader_timer < 440) {
mc_loadinfo._visible = true;
}
if (preloader_timer <= 200) {
bt_skip._visible = true;
}
if (preloader_timer <= 0) {
preloader_timer = 0;
preload_finish = true;
adBox.removeMovieClip();
}
if (preload_finish) {
mc_loadinfo._visible = false;
bt_skip._visible = false;
if (bt_buttonplay._currentframe != bt_buttonplay._totalframes) {
bt_buttonplay.play();
} else {
bt_buttonplay.onRelease = function () {
adBox.unloadMovie();
adBox.removeMovieClip();
play();
};
}
}
};
bt_skip.onRelease = function () {
preloader_timer = 0;
};
var CPMStarContentSpotID = "911Q772934A8";
System.security.allowDomain("server.cpmstar.com");
cpm_allowed = ["chat.kongregate.com", "www.kongregate.com"];
unloadcpm(cpm_allowed);
_root.kongregateServices.connect();
stop();
percentLoad = 0;
var stage_width = 500;
var stage_height = 450;
attachMovie("window", "window", 100, {_x:250, _y:225});
Instance of Symbol 173 MovieClip in Frame 1
onClipEvent (load) {
bytes = 0;
totalbytes = 0;
}
onClipEvent (enterFrame) {
bytes = Math.round(_parent.getBytesLoaded() / 1024);
totalbytes = Math.round(_parent.getBytesTotal() / 1024);
_xscale = Math.round((bytes / totalbytes) * 100);
percentLoad = _xscale;
if (bytes >= totalbytes) {
_parent.preloader_timer--;
}
}
Frame 3
onEnterFrame = function () {
adBox.unloadMovie();
adBox.removeMovieClip();
};
function playMovie() {
logo.gotoAndStop(logo._currentframe + 1);
}
playID = setInterval(playMovie, 27);
Frame 7
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);
}
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);
}
function load_level(level_type) {
if (level_type == "LEVEL 1") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3], [3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 5, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 1, 1, 2, 0, 5, 5, 5, 0, 0, 0, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1]];
player = [1, 9];
point[0] = [15, 10];
point[1] = [14, 7];
goal[0] = [1, 10];
collect_total = point.length;
total_timer = 2400;
this_level = "LEVEL 1";
next_level = "LEVEL 2";
create_stage(level);
}
if (level_type == "LEVEL 2") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 7, 0, 0, 0, 3], [3, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 1, 1, 0, 0, 3], [3, 1, 1, 0, 0, 0, 0, 4, 0, 0, 0, 0, 1, 2, 2, 1, 1, 3], [3, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 3], [3, 0, 0, 0, 0, 1, 2, 2, 2, 5, 0, 0, 0, 8, 0, 0, 0, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
player = [1, 9];
point[0] = [1, 7];
point[1] = [16, 7];
key[0] = [15, 10, 13, 6];
key[1] = [11, 10, 13, 10];
goal[0] = [1, 10];
collect_total = point.length;
total_timer = 2400;
this_level = "LEVEL 2";
next_level = "LEVEL 3";
create_stage(level);
}
if (level_type == "LEVEL 3") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 5, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 3], [3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 3], [3, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 3], [1, 2, 2, 2, 1, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 1, 6, 1]];
player = [1, 8];
point[0] = [16, 9];
point[1] = [7, 8];
point[2] = [12, 4];
goal[0] = [1, 9];
collect_total = point.length;
total_timer = 2400;
this_level = "LEVEL 3";
next_level = "LEVEL 4";
create_stage(level);
if (!mute_music) {
bgm01.stop();
bgm02.start(0, 10000);
}
}
if (level_type == "LEVEL 4") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3], [3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3], [3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3], [3, 0, 0, 0, 0, 1, 2, 2, 2, 2, 4, 0, 0, 0, 0, 0, 4, 4, 0, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1]];
player = [1, 5];
enemy[0] = [11, 11, 0.5];
enemy[1] = [3, 11, 0.5];
point[0] = [1, 11];
point[1] = [18, 5];
key[0] = [17, 9, 16, 5];
goal[0] = [1, 6];
collect = 0;
collect_total = point.length;
total_timer = 2400;
score = 0;
this_level = "LEVEL 4";
next_level = "LEVEL 5";
create_stage(level);
}
if (level_type == "LEVEL 5") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 5, 0, 0, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 5, 5, 0, 0, 0, 3], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 3], [3, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1]];
player = [1, 10];
point[0] = [1, 7];
point[1] = [7, 5];
point[2] = [18, 5];
point[3] = [18, 9];
point[4] = [12, 11];
goal[0] = [1, 11];
collect = 0;
collect_total = point.length;
total_timer = 3600;
score = 0;
this_level = "LEVEL 5";
next_level = "LEVEL 6";
create_stage(level);
if (!mute_music) {
bgm02.stop();
}
}
if (level_type == "LEVEL 6") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3], [3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 3], [3, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3], [1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1]];
player = [1, 7];
enemy[0] = [3, 11, 0.5];
enemy[1] = [9, 11, 0.5];
enemy[2] = [16, 11, 0.5];
enemy[3] = [9, 11, -0.5];
point[0] = [18, 8];
point[1] = [18, 4];
point[2] = [6, 4];
goal[0] = [1, 8];
collect = 0;
collect_total = point.length;
total_timer = 2400;
score = 0;
this_level = "LEVEL 6";
next_level = "LEVEL 7";
create_stage(level);
if (!mute_music) {
copper.stop();
bgm01.start(0, 10000);
}
victory = true;
cookie.data.victory = victory;
cookie.flush();
_root.kongregateStats.submit("CompleteLevel5", 1);
}
if (level_type == "LEVEL 7") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 3], [3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 1, 1, 1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 4, 2, 2, 2, 1, 0, 4, 4, 4, 4, 0, 0, 0, 0, 5, 5, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1]];
player = [1, 7];
enemy[0] = [1, 12, 0.5];
enemy[1] = [14, 12, 0.5];
enemy[2] = [18, 12, -0.5];
key[0] = [1, 12, 18, 5];
point[0] = [20, 5];
point[1] = [20, 11];
point[2] = [13, 11];
goal[0] = [1, 8];
collect = 0;
collect_total = point.length;
total_timer = 3600;
score = 0;
this_level = "LEVEL 7";
next_level = "LEVEL 8";
create_stage(level);
}
if (level_type == "LEVEL 8") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3], [3, 1, 1, 0, 0, 0, 0, 0, 5, 0, 0, 4, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 5, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3], [3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 3], [3, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 5, 0, 0, 3], [3, 0, 0, 0, 5, 0, 0, 4, 4, 1, 0, 0, 0, 0, 0, 1, 1, 0, 5, 5, 0, 0, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1]];
player = [1, 11];
enemy[0] = [12, 12, 0.5];
enemy[1] = [12, 12, -0.5];
key[0] = [1, 6, 16, 11];
key[1] = [21, 9, 18, 5];
point[0] = [21, 12];
point[1] = [21, 5];
point[2] = [1, 9];
goal[0] = [1, 12];
collect = 0;
collect_total = point.length;
total_timer = 3600;
score = 0;
this_level = "LEVEL 8";
next_level = "LEVEL 9";
create_stage(level);
if (!mute_music) {
bgm01.stop();
bgm02.start(0, 10000);
}
}
if (level_type == "LEVEL 9") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0, 1, 4, 0, 5, 0, 0, 0, 3], [3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 5, 5, 0, 0, 3], [3, 1, 2, 1, 1, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 1, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 2, 0, 0, 2, 5, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 5, 5, 5, 0, 0, 2, 0, 0, 8, 5, 0, 0, 0, 3], [1, 1, 1, 1, 6, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1]];
player = [1, 12];
enemy[0] = [20, 13, 0.5];
enemy[1] = [4, 6, -0.5];
key[0] = [18, 10, 16, 7];
key[1] = [22, 13, 18, 13];
point[0] = [1, 6];
point[1] = [14, 13];
point[2] = [16, 13];
point[3] = [22, 6];
goal[0] = [1, 13];
collect = 0;
collect_total = point.length;
total_timer = 3600;
score = 0;
this_level = "LEVEL 9";
next_level = "LEVEL 10";
create_stage(level);
}
if (level_type == "LEVEL 10") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 3], [1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3], [1, 1, 1, 1, 1, 6, 1, 2, 1, 1, 1, 1, 1, 6, 1, 6, 1, 6, 1, 2, 2, 2, 2, 1]];
player = [1, 12];
enemy[0] = [12, 13, 0.5];
key[0] = [21, 5, 9, 6];
point[0] = [1, 8];
point[1] = [7, 6];
point[2] = [9, 13];
point[3] = [22, 11];
point[4] = [19, 12];
point[5] = [7, 12];
goal[0] = [1, 13];
collect = 0;
collect_total = point.length;
total_timer = 4800;
score = 0;
this_level = "LEVEL 10";
next_level = "LEVEL 11";
create_stage(level);
if (!mute_music) {
bgm02.stop();
}
}
if (level_type == "LEVEL 11") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 3], [3, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 3], [3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 1, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3], [3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 5, 5, 0, 0, 5, 5, 3], [1, 2, 2, 2, 2, 1, 1, 1, 1, 6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1, 6, 1, 1, 1, 1]];
player = [1, 10];
enemy[0] = [9, 13, 0.5];
enemy[1] = [9, 13, -0.5];
enemy[2] = [14, 13, 0.5];
enemy[3] = [14, 13, -0.5];
enemy[4] = [18, 13, 0.5];
enemy[5] = [18, 13, -0.5];
point[0] = [6, 13];
point[1] = [1, 8];
point[2] = [22, 7];
point[3] = [11, 9];
goal[0] = [1, 11];
collect = 0;
collect_total = point.length;
total_timer = 3600;
score = 0;
this_level = "LEVEL 11";
next_level = "LEVEL 12";
create_stage(level);
if (!mute_music) {
copper.stop();
bgm01.start(0, 10000);
}
}
if (level_type == "LEVEL 12") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 1, 1, 3], [3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 3], [3, 0, 0, 5, 0, 1, 1, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 3], [3, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 3], [3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3], [3, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 0, 0, 3], [3, 0, 0, 0, 4, 4, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 5, 5, 0, 8, 0, 0, 3], [1, 1, 1, 1, 1, 1, 6, 1, 6, 2, 2, 2, 2, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
player = [1, 12];
enemy[0] = [16, 13, 0.5];
enemy[1] = [16, 13, -0.5];
key[0] = [10, 8, 11, 11];
key[1] = [24, 10, 22, 13];
key[2] = [24, 13, 21, 4];
point[0] = [1, 10];
point[1] = [1, 5];
point[2] = [12, 7];
point[3] = [24, 4];
goal[0] = [1, 13];
collect = 0;
collect_total = point.length;
total_timer = 3600;
score = 0;
this_level = "LEVEL 12";
next_level = "LEVEL 13";
create_stage(level);
}
if (level_type == "LEVEL 13") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 4, 4, 0, 0, 5, 5, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 3], [3, 4, 4, 0, 0, 4, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 4, 4, 0, 5, 0, 0, 0, 0, 4, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 0, 0, 3], [3, 1, 1, 0, 0, 0, 0, 0, 4, 4, 2, 0, 0, 4, 4, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 5, 0, 5, 0, 0, 0, 7, 0, 4, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 5, 5, 5, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
player = [1, 12];
enemy[0] = [21, 13, 0.5];
key[0] = [1, 10, 10, 12];
key[1] = [22, 9, 19, 13];
key[2] = [8, 7, 10, 7];
point[0] = [8, 10];
point[1] = [2, 6];
point[2] = [5, 6];
point[3] = [14, 4];
point[4] = [24, 13];
goal[0] = [1, 13];
collect = 0;
collect_total = point.length;
total_timer = 4800;
score = 0;
this_level = "LEVEL 13";
next_level = "LEVEL 14";
create_stage(level);
if (!mute_music) {
bgm01.stop();
bgm02.start(0, 10000);
}
}
if (level_type == "LEVEL 14") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 1, 1, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 1, 1, 2, 2, 3], [3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 2, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1, 1, 2, 2, 2, 2, 1]];
player = [1, 12];
enemy[0] = [19, 13, 0.5];
enemy[1] = [12, 13, -0.5];
point[0] = [12, 13];
point[1] = [19, 13];
point[2] = [23, 8];
point[3] = [16, 7];
point[4] = [2, 6];
point[5] = [5, 6];
goal[0] = [1, 13];
collect = 0;
collect_total = point.length;
total_timer = 4800;
score = 0;
this_level = "LEVEL 14";
next_level = "LEVEL 15";
create_stage(level);
}
if (level_type == "LEVEL 15") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 1]];
player = [1, 8];
point[0] = [6, 9];
point[1] = [12, 9];
point[2] = [19, 9];
point[3] = [27, 9];
goal[0] = [1, 9];
collect = 0;
collect_total = point.length;
total_timer = 7200;
score = 0;
this_level = "LEVEL 15";
if (!rampage) {
next_level = "END";
} else {
next_level = "RAMPAGE";
}
create_stage(level);
if (!mute_music) {
bgm02.stop();
}
}
if (level_type == "RAMPAGE") {
level = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 3], [3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 3], [1, 1, 1, 1, 1, 2, 1, 6, 1, 1, 6, 1, 1, 6, 1, 6, 1, 2, 2, 1, 6, 1]];
player = [1, 8];
point[0] = [6, 9];
point[1] = [9, 9];
point[2] = [14, 9];
point[3] = [19, 9];
point[4] = [15, 6];
goal[0] = [1, 9];
collect = 0;
collect_total = point.length;
total_timer = 7200;
score = 0;
this_level = "RAMPAGE";
next_level = "END";
create_stage(level);
if (!mute) {
copper.stop();
}
}
if (level_type == "END") {
create_endscreen();
finallydone = true;
cookie.data.finallydone = finallydone;
cookie.flush();
_root.kongregateStats.submit("FinishedTheGame", 1);
}
}
function create_enemy() {
enemy_timer_start++;
if (this_level == "LEVEL 1") {
enemy_timer_end = 40;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
create_enemyA(1);
}
}
if (this_level == "LEVEL 2") {
enemy_timer_end = 80;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((enemy_timer_start == (enemy_timer_end / 2)) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyB(1);
}
}
if (this_level == "LEVEL 3") {
enemy_timer_end = 160;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyB(1);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(2);
}
}
if (this_level == "LEVEL 4") {
enemy_timer_end = 200;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
}
}
if (this_level == "LEVEL 5") {
enemy_timer_end = 10000;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if (enemy_timer_start == 1) {
create_enemyD(1);
}
boss_sound();
}
if (this_level == "LEVEL 6") {
enemy_timer_end = 240;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
}
}
if (this_level == "LEVEL 7") {
enemy_timer_end = 280;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
create_enemyB(3);
}
}
if (this_level == "LEVEL 8") {
enemy_timer_end = 320;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
create_enemyC(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
create_enemyB(3);
}
}
if (this_level == "LEVEL 9") {
enemy_timer_end = 360;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
create_enemyC(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
create_enemyC(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
create_enemyB(3);
}
}
if (this_level == "LEVEL 10") {
enemy_timer_end = 1000;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = enemy_timer_end;
}
if (enemy_timer_start == 1) {
create_enemyD(2);
}
if (enemy_timer_start == 400) {
create_enemyE(1);
}
boss_sound();
}
if (this_level == "LEVEL 11") {
enemy_timer_end = 400;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
create_enemyC(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
create_enemyC(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
create_enemyB(3);
create_enemyC(3);
}
}
if (((this_level == "LEVEL 12") || (this_level == "LEVEL 13")) || (this_level == "LEVEL 14")) {
enemy_timer_end = 360;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
create_enemyC(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
create_enemyC(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
create_enemyB(3);
create_enemyC(3);
}
}
if (this_level == "LEVEL 15") {
enemy_timer_end = 5000;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = enemy_timer_end;
}
if (enemy_timer_start == 1) {
create_enemyD(3);
}
if (enemy_timer_start == 400) {
create_enemyE(2);
}
if (enemy_timer_start == 1000) {
create_enemyE(1);
}
if (enemy_timer_start == 2400) {
create_enemyD(2);
}
boss_sound();
}
if (this_level == "RAMPAGE") {
enemy_timer_end = 180;
if (enemy_timer_start > enemy_timer_end) {
enemy_timer_start = 0;
}
if ((((enemy_timer_start == (enemy_timer_end / 8)) || (enemy_timer_start == ((enemy_timer_end / 8) * 3))) || (enemy_timer_start == ((enemy_timer_end / 8) * 6))) || (enemy_timer_start == enemy_timer_end)) {
create_enemyA(1);
create_enemyB(1);
create_enemyC(1);
}
if (((enemy_timer_start == (enemy_timer_end / 4)) || (enemy_timer_start == (enemy_timer_end / 2))) || (enemy_timer_start == ((enemy_timer_end / 4) * 3))) {
create_enemyA(2);
create_enemyB(2);
create_enemyC(2);
}
if (enemy_timer_start == enemy_timer_end) {
create_enemyA(3);
create_enemyB(3);
create_enemyC(3);
}
rampages = true;
cookie.data.rampages = rampages;
cookie.flush();
_root.kongregateStats.submit("RampagesLevel", 1);
}
}
function boss_sound() {
if (!pause) {
if (!boss_exist) {
boss_exist_timer++;
} else {
boss_exist_timer = 0;
}
}
if ((boss_exist_timer == 40) && (!mute_sound)) {
copper.stop();
}
if ((collect == collect_total) && (boss_exist_timer == 40)) {
total_score = total_score + ((seconds_end + (minutes_end * 60)) - 1);
money = money + ((score + (seconds_end + (minutes_end * 60))) - 1);
player_win();
}
}
__com_mochibot__("dd39c5b1", this, 10301, true);
__com_mochibot__("6d2cd177", this, 10301, true);
this.createEmptyMovieClip("highSender", this.getNextHighestDepth());
fscommand ("allowscale", false);
fscommand ("trapallkeys", false);
fscommand ("showmenu", false);
stop();
var cookie = SharedObject.getLocal("SaveTheGoms");
var daydie;
var victory;
var shotthem;
var killthem;
var killthisbadboy;
var fastkill;
var superfastkill;
var hyperfastkill;
var rampages;
var finallydone;
var destroy_bombs;
var tile_size = 45;
var shake_range = 1.4;
var hero_width = 15;
var hero_height = 18;
var ground_acceleration = 2;
var ground_friction = 0.6;
var air_acceleration = 0.5;
var air_friction = 0.7;
var treadmill_speed = 2;
var max_speed = 6;
var xspeed = 0;
var yspeed = 0;
var falling = false;
var gravity = 0.7;
var jump_speed = 10;
var health_total;
var health = health_total;
var health_hit;
var regen;
var enemy_width = 15;
var enemy_height = 22;
var enemy_timer_start = 0;
var enemy_timer_end;
var enemy_array = new Array();
var boss_exist = false;
var boss_exist_timer = 0;
var level = new Array();
var enemy = new Array();
var key = new Array();
var goal = new Array();
var point = new Array();
var collect_total;
var collect = 0;
var collect_hero = false;
var score = 0;
var total_score;
var temp_total_score;
var money;
var seconds_end = 0;
var minutes_end = 0;
var hero_lose = false;
var hero_win = false;
var hero_hit = false;
var teleport = false;
var enable_teleport = false;
var teleport_delaystart = 0;
var teleport_delay = 100;
var teleport_delaytime;
var pause = true;
var play_title = true;
var mute_sound = false;
var mute_music = false;
var bgm_volume = 100;
var combo_hit = 0;
var combo_delay = 40;
var combo_start = 0;
var enemy_hit = false;
var bullet_array = new Array();
var bullet_number;
var bullet_offset;
var bullet_speed;
var bullet_age;
var bullet_bearing;
var bullet_spread;
var bullet_barrel;
var bullet_ranspeed;
var bullet_projectiles;
var reload_delay;
var weapona_type;
var weaponb_type;
var weaponc_type;
var reload_timer;
var reload_complete = true;
var mouse_click = false;
var info_timer = 0;
var cheat_use;
var rampage;
var next_level = "LEVEL 1";
function winscreen_upgrade() {
winscreen.but_weapona1.gotoAndStop(1);
winscreen.but_weapona2.gotoAndStop(2);
winscreen.but_weapona3.gotoAndStop(3);
winscreen.but_weapona4.gotoAndStop(4);
winscreen.but_weapona5.gotoAndStop(29);
winscreen.but_weaponb1.gotoAndStop(5);
winscreen.but_weaponb2.gotoAndStop(6);
winscreen.but_weaponb3.gotoAndStop(7);
winscreen.but_weaponb4.gotoAndStop(8);
winscreen.but_weaponb5.gotoAndStop(29);
winscreen.but_weaponc1.gotoAndStop(9);
winscreen.but_weaponc2.gotoAndStop(10);
winscreen.but_weaponc3.gotoAndStop(11);
winscreen.but_weaponc4.gotoAndStop(12);
winscreen.but_weaponc5.gotoAndStop(29);
winscreen.but_teleport1.gotoAndStop(13);
winscreen.but_teleport2.gotoAndStop(14);
winscreen.but_teleport3.gotoAndStop(15);
winscreen.but_teleport4.gotoAndStop(16);
winscreen.but_teleport5.gotoAndStop(29);
winscreen.but_health1.gotoAndStop(17);
winscreen.but_health2.gotoAndStop(18);
winscreen.but_health3.gotoAndStop(19);
winscreen.but_health4.gotoAndStop(20);
winscreen.but_health5.gotoAndStop(29);
winscreen.but_armor1.gotoAndStop(21);
winscreen.but_armor2.gotoAndStop(22);
winscreen.but_armor3.gotoAndStop(23);
winscreen.but_armor4.gotoAndStop(24);
winscreen.but_armor5.gotoAndStop(29);
winscreen.but_regen1.gotoAndStop(25);
winscreen.but_regen2.gotoAndStop(26);
winscreen.but_regen3.gotoAndStop(27);
winscreen.but_regen4.gotoAndStop(28);
winscreen.but_regen5.gotoAndStop(29);
if (money >= winscreen.display_costweapona) {
winscreen.but_weapona5._visible = false;
} else {
winscreen.but_weapona5._visible = true;
}
winscreen.but_weapona1.onRelease = function () {
if (money >= winscreen.display_costweapona) {
weapona_type = "weapona1";
money = money - winscreen.display_costweapona;
}
};
winscreen.but_weapona2.onRelease = function () {
if (money >= winscreen.display_costweapona) {
weapona_type = "weapona2";
money = money - winscreen.display_costweapona;
}
};
winscreen.but_weapona3.onRelease = function () {
if (money >= winscreen.display_costweapona) {
weapona_type = "weapona3";
money = money - winscreen.display_costweapona;
}
};
winscreen.but_weapona4.onRelease = function () {
if (money >= winscreen.display_costweapona) {
weapona_type = "weapona4";
money = money - winscreen.display_costweapona;
}
};
if (money >= winscreen.display_costweaponb) {
winscreen.but_weaponb5._visible = false;
} else {
winscreen.but_weaponb5._visible = true;
}
winscreen.but_weaponb1.onRelease = function () {
if (money >= winscreen.display_costweaponb) {
weaponb_type = "weaponb1";
money = money - winscreen.display_costweaponb;
}
};
winscreen.but_weaponb2.onRelease = function () {
if (money >= winscreen.display_costweaponb) {
weaponb_type = "weaponb2";
money = money - winscreen.display_costweaponb;
}
};
winscreen.but_weaponb3.onRelease = function () {
if (money >= winscreen.display_costweaponb) {
weaponb_type = "weaponb3";
money = money - winscreen.display_costweaponb;
}
};
winscreen.but_weaponb4.onRelease = function () {
if (money >= winscreen.display_costweaponb) {
weaponb_type = "weaponb4";
money = money - winscreen.display_costweaponb;
}
};
if (money >= winscreen.display_costweaponc) {
winscreen.but_weaponc5._visible = false;
} else {
winscreen.but_weaponc5._visible = true;
}
winscreen.but_weaponc1.onRelease = function () {
if (money >= winscreen.display_costweaponc) {
weaponc_type = "weaponc1";
money = money - winscreen.display_costweaponc;
}
};
winscreen.but_weaponc2.onRelease = function () {
if (money >= winscreen.display_costweaponc) {
weaponc_type = "weaponc2";
money = money - winscreen.display_costweaponc;
}
};
winscreen.but_weaponc3.onRelease = function () {
if (money >= winscreen.display_costweaponc) {
weaponc_type = "weaponc3";
money = money - winscreen.display_costweaponc;
}
};
winscreen.but_weaponc4.onRelease = function () {
if (money >= winscreen.display_costweaponc) {
weaponc_type = "weaponc4";
money = money - winscreen.display_costweaponc;
}
};
if (weapona_type == "weapona0") {
winscreen.but_weapona1._visible = true;
winscreen.but_weapona2._visible = false;
winscreen.but_weapona3._visible = false;
winscreen.but_weapona4._visible = false;
winscreen.display_costweapona = 200;
}
if (weapona_type == "weapona1") {
winscreen.but_weapona1._visible = false;
winscreen.but_weapona2._visible = true;
winscreen.but_weapona3._visible = false;
winscreen.but_weapona4._visible = false;
}
if (weapona_type == "weapona2") {
winscreen.but_weapona1._visible = false;
winscreen.but_weapona2._visible = false;
winscreen.but_weapona3._visible = true;
winscreen.but_weapona4._visible = false;
}
if (weapona_type == "weapona3") {
winscreen.but_weapona1._visible = false;
winscreen.but_weapona2._visible = false;
winscreen.but_weapona3._visible = false;
winscreen.but_weapona4._visible = true;
}
if (weapona_type == "weapona4") {
winscreen.but_weapona1._visible = false;
winscreen.but_weapona2._visible = false;
winscreen.but_weapona3._visible = false;
winscreen.but_weapona4._visible = false;
}
if (weaponb_type == "none") {
winscreen.but_weaponb1._visible = true;
winscreen.but_weaponb2._visible = false;
winscreen.but_weaponb3._visible = false;
winscreen.but_weaponb4._visible = false;
}
if (weaponb_type == "weaponb1") {
winscreen.but_weaponb1._visible = false;
winscreen.but_weaponb2._visible = true;
winscreen.but_weaponb3._visible = false;
winscreen.but_weaponb4._visible = false;
}
if (weaponb_type == "weaponb2") {
winscreen.but_weaponb1._visible = false;
winscreen.but_weaponb2._visible = false;
winscreen.but_weaponb3._visible = true;
winscreen.but_weaponb4._visible = false;
}
if (weaponb_type == "weaponb3") {
winscreen.but_weaponb1._visible = false;
winscreen.but_weaponb2._visible = false;
winscreen.but_weaponb3._visible = false;
winscreen.but_weaponb4._visible = true;
}
if (weaponb_type == "weaponb4") {
winscreen.but_weaponb1._visible = false;
winscreen.but_weaponb2._visible = false;
winscreen.but_weaponb3._visible = false;
winscreen.but_weaponb4._visible = false;
}
if (weaponc_type == "none") {
winscreen.but_weaponc1._visible = true;
winscreen.but_weaponc2._visible = false;
winscreen.but_weaponc3._visible = false;
winscreen.but_weaponc4._visible = false;
}
if (weaponc_type == "weaponc1") {
winscreen.but_weaponc1._visible = false;
winscreen.but_weaponc2._visible = true;
winscreen.but_weaponc3._visible = false;
winscreen.but_weaponc4._visible = false;
}
if (weaponc_type == "weaponc2") {
winscreen.but_weaponc1._visible = false;
winscreen.but_weaponc2._visible = false;
winscreen.but_weaponc3._visible = true;
winscreen.but_weaponc4._visible = false;
}
if (weaponc_type == "weaponc3") {
winscreen.but_weaponc1._visible = false;
winscreen.but_weaponc2._visible = false;
winscreen.but_weaponc3._visible = false;
winscreen.but_weaponc4._visible = true;
}
if (weaponc_type == "weaponc4") {
winscreen.but_weaponc1._visible = false;
winscreen.but_weaponc2._visible = false;
winscreen.but_weaponc3._visible = false;
winscreen.but_weaponc4._visible = false;
}
if (money >= winscreen.display_costport) {
winscreen.but_teleport5._visible = false;
} else {
winscreen.but_teleport5._visible = true;
}
winscreen.but_teleport1.onRelease = function () {
if (money >= winscreen.display_costport) {
teleport_delaytime = 0.2;
money = money - winscreen.display_costport;
}
};
winscreen.but_teleport2.onRelease = function () {
if (money >= winscreen.display_costport) {
teleport_delaytime = 0.3;
money = money - winscreen.display_costport;
}
};
winscreen.but_teleport3.onRelease = function () {
if (money >= winscreen.display_costport) {
teleport_delaytime = 0.4;
money = money - winscreen.display_costport;
}
};
winscreen.but_teleport4.onRelease = function () {
if (money >= winscreen.display_costport) {
teleport_delaytime = 0.5;
money = money - winscreen.display_costport;
}
};
if (teleport_delaytime == 0.1) {
winscreen.but_teleport1._visible = true;
winscreen.but_teleport2._visible = false;
winscreen.but_teleport3._visible = false;
winscreen.but_teleport4._visible = false;
}
if (teleport_delaytime == 0.2) {
winscreen.but_teleport1._visible = false;
winscreen.but_teleport2._visible = true;
winscreen.but_teleport3._visible = false;
winscreen.but_teleport4._visible = false;
}
if (teleport_delaytime == 0.3) {
winscreen.but_teleport1._visible = false;
winscreen.but_teleport2._visible = false;
winscreen.but_teleport3._visible = true;
winscreen.but_teleport4._visible = false;
}
if (teleport_delaytime == 0.4) {
winscreen.but_teleport1._visible = false;
winscreen.but_teleport2._visible = false;
winscreen.but_teleport3._visible = false;
winscreen.but_teleport4._visible = true;
}
if (teleport_delaytime == 0.5) {
winscreen.but_teleport1._visible = false;
winscreen.but_teleport2._visible = false;
winscreen.but_teleport3._visible = false;
winscreen.but_teleport4._visible = false;
}
if (money >= winscreen.display_costhealth) {
winscreen.but_health5._visible = false;
} else {
winscreen.but_health5._visible = true;
}
winscreen.but_health1.onRelease = function () {
if (money >= winscreen.display_costhealth) {
health_total = 120;
money = money - winscreen.display_costhealth;
}
};
winscreen.but_health2.onRelease = function () {
if (money >= winscreen.display_costhealth) {
health_total = 150;
money = money - winscreen.display_costhealth;
}
};
winscreen.but_health3.onRelease = function () {
if (money >= winscreen.display_costhealth) {
health_total = 200;
money = money - winscreen.display_costhealth;
}
};
winscreen.but_health4.onRelease = function () {
if (money >= winscreen.display_costhealth) {
health_total = 300;
money = money - winscreen.display_costhealth;
}
};
if (health_total == 100) {
winscreen.but_health1._visible = true;
winscreen.but_health2._visible = false;
winscreen.but_health3._visible = false;
winscreen.but_health4._visible = false;
}
if (health_total == 120) {
winscreen.but_health1._visible = false;
winscreen.but_health2._visible = true;
winscreen.but_health3._visible = false;
winscreen.but_health4._visible = false;
}
if (health_total == 150) {
winscreen.but_health1._visible = false;
winscreen.but_health2._visible = false;
winscreen.but_health3._visible = true;
winscreen.but_health4._visible = false;
}
if (health_total == 200) {
winscreen.but_health1._visible = false;
winscreen.but_health2._visible = false;
winscreen.but_health3._visible = false;
winscreen.but_health4._visible = true;
}
if (health_total == 300) {
winscreen.but_health1._visible = false;
winscreen.but_health2._visible = false;
winscreen.but_health3._visible = false;
winscreen.but_health4._visible = false;
}
if (money >= winscreen.display_costarmor) {
winscreen.but_armor5._visible = false;
} else {
winscreen.but_armor5._visible = true;
}
winscreen.but_armor1.onRelease = function () {
if (money >= winscreen.display_costarmor) {
health_hit = 16;
money = money - winscreen.display_costarmor;
}
};
winscreen.but_armor2.onRelease = function () {
if (money >= winscreen.display_costarmor) {
health_hit = 12;
money = money - winscreen.display_costarmor;
}
};
winscreen.but_armor3.onRelease = function () {
if (money >= winscreen.display_costarmor) {
health_hit = 9;
money = money - winscreen.display_costarmor;
}
};
winscreen.but_armor4.onRelease = function () {
if (money >= winscreen.display_costarmor) {
health_hit = 5;
money = money - winscreen.display_costarmor;
}
};
if (health_hit == 20) {
winscreen.but_armor1._visible = true;
winscreen.but_armor2._visible = false;
winscreen.but_armor3._visible = false;
winscreen.but_armor4._visible = false;
}
if (health_hit == 16) {
winscreen.but_armor1._visible = false;
winscreen.but_armor2._visible = true;
winscreen.but_armor3._visible = false;
winscreen.but_armor4._visible = false;
}
if (health_hit == 12) {
winscreen.but_armor1._visible = false;
winscreen.but_armor2._visible = false;
winscreen.but_armor3._visible = true;
winscreen.but_armor4._visible = false;
}
if (health_hit == 9) {
winscreen.but_armor1._visible = false;
winscreen.but_armor2._visible = false;
winscreen.but_armor3._visible = false;
winscreen.but_armor4._visible = true;
}
if (health_hit == 5) {
winscreen.but_armor1._visible = false;
winscreen.but_armor2._visible = false;
winscreen.but_armor3._visible = false;
winscreen.but_armor4._visible = false;
}
if (money >= winscreen.display_costregen) {
winscreen.but_regen5._visible = false;
} else {
winscreen.but_regen5._visible = true;
}
winscreen.but_regen1.onRelease = function () {
if (money >= winscreen.display_costregen) {
regen = 0.01;
money = money - winscreen.display_costregen;
}
};
winscreen.but_regen2.onRelease = function () {
if (money >= winscreen.display_costregen) {
regen = 0.03;
money = money - winscreen.display_costregen;
}
};
winscreen.but_regen3.onRelease = function () {
if (money >= winscreen.display_costregen) {
regen = 0.06;
money = money - winscreen.display_costregen;
}
};
winscreen.but_regen4.onRelease = function () {
if (money >= winscreen.display_costregen) {
regen = 0.1;
money = money - winscreen.display_costregen;
}
};
if (regen == 0) {
winscreen.but_regen1._visible = true;
winscreen.but_regen2._visible = false;
winscreen.but_regen3._visible = false;
winscreen.but_regen4._visible = false;
}
if (regen == 0.01) {
winscreen.but_regen1._visible = false;
winscreen.but_regen2._visible = true;
winscreen.but_regen3._visible = false;
winscreen.but_regen4._visible = false;
}
if (regen == 0.03) {
winscreen.but_regen1._visible = false;
winscreen.but_regen2._visible = false;
winscreen.but_regen3._visible = true;
winscreen.but_regen4._visible = false;
}
if (regen == 0.06) {
winscreen.but_regen1._visible = false;
winscreen.but_regen2._visible = false;
winscreen.but_regen3._visible = false;
winscreen.but_regen4._visible = true;
}
if (regen == 0.1) {
winscreen.but_regen1._visible = false;
winscreen.but_regen2._visible = false;
winscreen.but_regen3._visible = false;
winscreen.but_regen4._visible = false;
}
cost_upgrade();
info_upgrade();
}
function info_upgrade() {
winscreen.but_weapona1.onRollOver = function () {
winscreen.info.gotoAndStop(1);
};
winscreen.but_weapona1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weapona2.onRollOver = function () {
winscreen.info.gotoAndStop(2);
};
winscreen.but_weapona2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weapona3.onRollOver = function () {
winscreen.info.gotoAndStop(3);
};
winscreen.but_weapona3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weapona4.onRollOver = function () {
winscreen.info.gotoAndStop(4);
};
winscreen.but_weapona4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponb1.onRollOver = function () {
winscreen.info.gotoAndStop(5);
};
winscreen.but_weaponb1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponb2.onRollOver = function () {
winscreen.info.gotoAndStop(6);
};
winscreen.but_weaponb2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponb3.onRollOver = function () {
winscreen.info.gotoAndStop(7);
};
winscreen.but_weaponb3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponb4.onRollOver = function () {
winscreen.info.gotoAndStop(8);
};
winscreen.but_weaponb4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponc1.onRollOver = function () {
winscreen.info.gotoAndStop(9);
};
winscreen.but_weaponc1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponc2.onRollOver = function () {
winscreen.info.gotoAndStop(10);
};
winscreen.but_weaponc2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponc3.onRollOver = function () {
winscreen.info.gotoAndStop(11);
};
winscreen.but_weaponc3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_weaponc4.onRollOver = function () {
winscreen.info.gotoAndStop(12);
};
winscreen.but_weaponc4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_teleport1.onRollOver = function () {
winscreen.info.gotoAndStop(13);
};
winscreen.but_teleport1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_teleport2.onRollOver = function () {
winscreen.info.gotoAndStop(14);
};
winscreen.but_teleport2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_teleport3.onRollOver = function () {
winscreen.info.gotoAndStop(15);
};
winscreen.but_teleport3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_teleport4.onRollOver = function () {
winscreen.info.gotoAndStop(16);
};
winscreen.but_teleport4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_health1.onRollOver = function () {
winscreen.info.gotoAndStop(17);
};
winscreen.but_health1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_health2.onRollOver = function () {
winscreen.info.gotoAndStop(18);
};
winscreen.but_health2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_health3.onRollOver = function () {
winscreen.info.gotoAndStop(19);
};
winscreen.but_health3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_health4.onRollOver = function () {
winscreen.info.gotoAndStop(20);
};
winscreen.but_health4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_armor1.onRollOver = function () {
winscreen.info.gotoAndStop(21);
};
winscreen.but_armor1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_armor2.onRollOver = function () {
winscreen.info.gotoAndStop(22);
};
winscreen.but_armor2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_armor3.onRollOver = function () {
winscreen.info.gotoAndStop(23);
};
winscreen.but_armor3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_armor4.onRollOver = function () {
winscreen.info.gotoAndStop(24);
};
winscreen.but_armor4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_regen1.onRollOver = function () {
winscreen.info.gotoAndStop(25);
};
winscreen.but_regen1.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_regen2.onRollOver = function () {
winscreen.info.gotoAndStop(26);
};
winscreen.but_regen2.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_regen3.onRollOver = function () {
winscreen.info.gotoAndStop(27);
};
winscreen.but_regen3.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
winscreen.but_regen4.onRollOver = function () {
winscreen.info.gotoAndStop(28);
};
winscreen.but_regen4.onRollOut = function () {
winscreen.info.gotoAndStop(winscreen.info._totalframes);
};
}
function cost_upgrade() {
if (winscreen.but_weapona1._visible == true) {
winscreen.display_costweapona = 200;
}
if (winscreen.but_weapona2._visible == true) {
winscreen.display_costweapona = 300;
}
if (winscreen.but_weapona3._visible == true) {
winscreen.display_costweapona = 500;
}
if (winscreen.but_weapona4._visible == true) {
winscreen.display_costweapona = 800;
}
if ((((winscreen.but_weapona1._visible == false) && (winscreen.but_weapona2._visible == false)) && (winscreen.but_weapona3._visible == false)) && (winscreen.but_weapona4._visible == false)) {
winscreen.display_costweapona = " ";
}
if (winscreen.but_weaponb1._visible == true) {
winscreen.display_costweaponb = 300;
}
if (winscreen.but_weaponb2._visible == true) {
winscreen.display_costweaponb = 500;
}
if (winscreen.but_weaponb3._visible == true) {
winscreen.display_costweaponb = 800;
}
if (winscreen.but_weaponb4._visible == true) {
winscreen.display_costweaponb = 1000;
}
if ((((winscreen.but_weaponb1._visible == false) && (winscreen.but_weaponb2._visible == false)) && (winscreen.but_weaponb3._visible == false)) && (winscreen.but_weaponb4._visible == false)) {
winscreen.display_costweaponb = " ";
}
if (winscreen.but_weaponc1._visible == true) {
winscreen.display_costweaponc = 500;
}
if (winscreen.but_weaponc2._visible == true) {
winscreen.display_costweaponc = 800;
}
if (winscreen.but_weaponc3._visible == true) {
winscreen.display_costweaponc = 1000;
}
if (winscreen.but_weaponc4._visible == true) {
winscreen.display_costweaponc = 1400;
}
if ((((winscreen.but_weaponc1._visible == false) && (winscreen.but_weaponc2._visible == false)) && (winscreen.but_weaponc3._visible == false)) && (winscreen.but_weaponc4._visible == false)) {
winscreen.display_costweaponc = " ";
}
if (winscreen.but_armor1._visible == true) {
winscreen.display_costarmor = 100;
}
if (winscreen.but_armor2._visible == true) {
winscreen.display_costarmor = 200;
}
if (winscreen.but_armor3._visible == true) {
winscreen.display_costarmor = 400;
}
if (winscreen.but_armor4._visible == true) {
winscreen.display_costarmor = 800;
}
if ((((winscreen.but_armor1._visible == false) && (winscreen.but_armor2._visible == false)) && (winscreen.but_armor3._visible == false)) && (winscreen.but_armor4._visible == false)) {
winscreen.display_costarmor = " ";
}
if (winscreen.but_health1._visible == true) {
winscreen.display_costhealth = 200;
}
if (winscreen.but_health2._visible == true) {
winscreen.display_costhealth = 300;
}
if (winscreen.but_health3._visible == true) {
winscreen.display_costhealth = 500;
}
if (winscreen.but_health4._visible == true) {
winscreen.display_costhealth = 1000;
}
if ((((winscreen.but_health1._visible == false) && (winscreen.but_health2._visible == false)) && (winscreen.but_health3._visible == false)) && (winscreen.but_health4._visible == false)) {
winscreen.display_costhealth = " ";
}
if (winscreen.but_regen1._visible == true) {
winscreen.display_costregen = 300;
}
if (winscreen.but_regen2._visible == true) {
winscreen.display_costregen = 500;
}
if (winscreen.but_regen3._visible == true) {
winscreen.display_costregen = 1000;
}
if (winscreen.but_regen4._visible == true) {
winscreen.display_costregen = 1500;
}
if ((((winscreen.but_regen1._visible == false) && (winscreen.but_regen2._visible == false)) && (winscreen.but_regen3._visible == false)) && (winscreen.but_regen4._visible == false)) {
winscreen.display_costregen = " ";
}
if (winscreen.but_teleport1._visible == true) {
winscreen.display_costport = 300;
}
if (winscreen.but_teleport2._visible == true) {
winscreen.display_costport = 500;
}
if (winscreen.but_teleport3._visible == true) {
winscreen.display_costport = 800;
}
if (winscreen.but_teleport4._visible == true) {
winscreen.display_costport = 1200;
}
if ((((winscreen.but_teleport1._visible == false) && (winscreen.but_teleport2._visible == false)) && (winscreen.but_teleport3._visible == false)) && (winscreen.but_teleport4._visible == false)) {
winscreen.display_costport = " ";
}
}
function remove_stage() {
if (!rampage) {
health = health_total;
} else {
health = health + 20;
}
collect_hero = false;
teleport_delaystart = 0;
enemy_timer_start = 0;
collect = 0;
score = 0;
total_score = temp_total_score;
boss_exist = false;
play_title = false;
point.splice(0);
enemy.splice(0);
key.splice(0);
bullet_array.splice(0);
enemy_array.splice(0);
level_container.removeMovieClip();
panel_container.removeMovieClip();
pausescreen.removeMovieClip();
losescreen.removeMovieClip();
winscreen.removeMovieClip();
endscreen.removeMovieClip();
}
function create_stage(l) {
createEmptyMovieClip("bg_container", 1);
createEmptyMovieClip("level_container", 2);
createEmptyMovieClip("panel_container", 3);
createEmptyMovieClip("sound_container", 4);
createEmptyMovieClip("music_container", 5);
level_container.createEmptyMovieClip("bg_container", 1);
level_container.createEmptyMovieClip("tile_container", 2);
level_container.createEmptyMovieClip("bullet_container", 3);
level_container.createEmptyMovieClip("enemy_container", 4);
level_container.createEmptyMovieClip("hero_container", 5);
level_container.createEmptyMovieClip("item_container", 6);
level_container.createEmptyMovieClip("boss_container", 7);
level_container.createEmptyMovieClip("effect_container", 8);
level_container.createEmptyMovieClip("combo_container", 9);
create_background();
create_level(l);
create_player();
create_goal();
create_foe();
create_key();
create_point();
create_move();
create_panel(total_timer);
create_winscreen();
create_losescreen();
create_pausescreen();
create_crosshair();
create_infoscreen();
pause = false;
hero_lose = false;
hero_win = false;
info_timer = 0;
play_title = true;
cookie.data.health = health;
cookie.flush();
}
function create_background() {
bg = level_container.bg_container.attachMovie("mc_bg", "bg", level_container.bg_container.getNextHighestDepth(), {_x:0, _y:(level.length * tile_size) - tile_size});
back = bg_container.attachMovie("mc_bg-back", "bg-back", bg_container.getNextHighestDepth());
if (((((this_level == "LEVEL 1") || (this_level == "LEVEL 2")) || (this_level == "LEVEL 3")) || (this_level == "LEVEL 4")) || (this_level == "LEVEL 5")) {
bg.gotoAndStop(1);
back.gotoAndStop(1);
} else {
bg.gotoAndStop(2);
back.gotoAndStop(2);
}
}
function create_player() {
level_container.hero_container.hero.removeMovieClip();
x_pos = (player[0] * tile_size) + (tile_size / 2);
y_pos = ((player[1] * tile_size) + (tile_size / 2)) + 1;
var hero = level_container.hero_container.attachMovie("mc_hero", "hero", level_container.hero_container.getNextHighestDepth(), {_x:x_pos, _y:y_pos});
hero.onEnterFrame = function () {
if (!pause) {
if (!hero_lose) {
if (!hero_win) {
hero.body.gotoAndPlay(hero.body._currentframe);
hero.head.gotoAndPlay(hero.head._currentframe);
hero.head._rotation = hero.weapon._rotation;
if (hero.head._rotation >= 30) {
hero.head._rotation = 30;
}
if (hero.head._rotation <= -30) {
hero.head._rotation = -30;
}
if ((walking && (!jumping)) && (!falling)) {
if ((hero._x >= level_container.crosshair._x) && (xspeed > 0)) {
if (!collect_hero) {
hero.gotoAndStop(3);
} else {
hero.gotoAndStop(10);
}
}
if ((hero._x >= level_container.crosshair._x) && (xspeed < 0)) {
if (!collect_hero) {
hero.gotoAndStop(2);
} else {
hero.gotoAndStop(9);
}
}
if ((hero._x <= level_container.crosshair._x) && (xspeed > 0)) {
if (!collect_hero) {
hero.gotoAndStop(2);
} else {
hero.gotoAndStop(9);
}
}
if ((hero._x <= level_container.crosshair._x) && (xspeed < 0)) {
if (!collect_hero) {
hero.gotoAndStop(3);
} else {
hero.gotoAndStop(10);
}
}
if (xspeed == 0) {
if (!collect_hero) {
hero.gotoAndStop(1);
} else {
hero.gotoAndStop(8);
}
}
} else if (jumping || (falling)) {
if (!collect_hero) {
hero.gotoAndStop(4);
} else {
hero.gotoAndStop(11);
}
}
weapon._x = _x;
weapon._y = _y;
if (x_pos < ((stage_width / 2) + tile_size)) {
weaponx = x_pos - tile_size;
} else if ((x_pos >= ((stage_width / 2) + tile_size)) && (x_pos <= ((level[0].length * tile_size) - ((stage_width / 2) + tile_size)))) {
weaponx = stage_width / 2;
} else if (x_pos > ((level[0].length * tile_size) - ((stage_width / 2) + tile_size))) {
weaponx = (x_pos - (level[0].length * tile_size)) + (stage_width + tile_size);
}
if (y_pos < ((stage_height / 2) - tile_size)) {
weapony = y_pos;
} else if ((y_pos >= ((stage_height / 2) - tile_size)) && (y_pos <= ((level.length * tile_size) - ((stage_height / 2) - (tile_size / 2))))) {
weapony = stage_height / 2;
} else if (y_pos > ((level.length * tile_size) - ((stage_height / 2) - (tile_size / 2)))) {
weapony = (y_pos - (level.length * tile_size)) + (stage_height - (tile_size / 2));
}
if (_xmouse > weaponx) {
level_container.hero_container.hero._xscale = 100;
hero.weapon._rotation = (Math.atan2(_ymouse - weapony, _xmouse - weaponx) * 180) / Math.PI;
} else {
level_container.hero_container.hero._xscale = -100;
hero.weapon._rotation = (((-Math.atan2(_ymouse - weapony, _xmouse - weaponx)) * 180) / Math.PI) + 180;
}
}
}
} else {
hero.body.gotoAndStop(hero.body._currentframe);
hero.head.gotoAndStop(hero.head._currentframe);
}
};
}
function player_die() {
level_container.hero_container.hero.gotoAndStop(6);
health = 0;
hero_lose = true;
if (rampage) {
cookie.data.level_complete = undefined;
cookie.flush();
}
}
function player_win() {
level_container.hero_container.hero.gotoAndStop(7);
hero_win = true;
}
function player_teleport() {
level_container.crosshair.onMouseDown = function () {
if (teleport && (enable_teleport)) {
x_pos = level_container._xmouse;
y_pos = level_container._ymouse;
pause = false;
teleport = false;
falling = true;
teleport_delaystart = 0;
}
};
}
function create_crosshair() {
var crosshair = level_container.attachMovie("mc_crosshair", "crosshair", level_container.getNextHighestDepth(), {_x:level_container._xmouse, _y:level_container._ymouse});
crosshair.onEnterFrame = function () {
if (!pause) {
if ((_ymouse > 40) && (_ymouse < 410)) {
Mouse.hide();
} else {
Mouse.show();
}
} else {
Mouse.show();
}
if (!teleport) {
crosshair.gotoAndStop(1);
} else {
crosshair.gotoAndStop(2);
}
crosshair._x = level_container._xmouse;
crosshair._y = level_container._ymouse;
if (crosshair._x < (0 + hero_width)) {
crosshair._x = 0 + hero_width;
}
if (crosshair._y < (0 + hero_height)) {
crosshair._y = 0 + hero_height;
}
if (crosshair._x > ((level_width * tile_size) - hero_width)) {
crosshair._x = (level_width * tile_size) - hero_width;
}
if (crosshair._y > ((level_height * tile_size) - hero_height)) {
crosshair._y = (level_height * tile_size) - hero_height;
}
crosshair_right = Math.floor((crosshair._x + (hero_width - 1)) / tile_size);
crosshair_left = Math.floor((crosshair._x - hero_width) / tile_size);
crosshair_bottom = Math.floor((crosshair._y + (hero_height - 1)) / tile_size);
crosshair_top = Math.floor((crosshair._y - hero_height) / tile_size);
crosshair_top_right = level[crosshair_top][crosshair_right];
crosshair_top_left = level[crosshair_top][crosshair_left];
crosshair_bottom_left = level[crosshair_bottom][crosshair_left];
crosshair_bottom_right = level[crosshair_bottom][crosshair_right];
if ((((((crosshair_top_right == 0) || (crosshair_top_right == 4)) || (crosshair_top_right == 5)) && (((crosshair_top_left == 0) || (crosshair_top_left == 4)) || (crosshair_top_left == 5))) && (((crosshair_bottom_left == 0) || (crosshair_bottom_left == 4)) || (crosshair_bottom_left == 5))) && (((crosshair_bottom_right == 0) || (crosshair_bottom_right == 4)) || (crosshair_bottom_right == 5))) {
enable_teleport = true;
} else {
enable_teleport = false;
}
};
}
function load_weapon(weapon_type) {
switch (weapon_type) {
case "WeaponA" :
if (weapona_type == "weapona0") {
bullet_number = 1;
bullet_offset = 3;
bullet_speed = 8;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 10;
bullet_ranspeed = 0;
bullet_power = 1;
bullet_projectiles = 1;
weapon_image = 1;
reload_delay = 400;
}
if (weapona_type == "weapona1") {
bullet_number = 1;
bullet_offset = 3;
bullet_speed = 8;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 15;
bullet_ranspeed = 0;
bullet_power = 1;
bullet_projectiles = 1;
weapon_image = 2;
reload_delay = 300;
}
if (weapona_type == "weapona2") {
bullet_number = 1;
bullet_offset = 5;
bullet_speed = 10;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 35;
bullet_ranspeed = 2;
bullet_power = 2;
bullet_projectiles = 1;
weapon_image = 3;
reload_delay = 250;
}
if (weapona_type == "weapona3") {
bullet_number = 1;
bullet_offset = 5;
bullet_speed = 10;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 40;
bullet_ranspeed = 2;
bullet_power = 2;
bullet_projectiles = 1;
weapon_image = 4;
reload_delay = 200;
}
if (weapona_type == "weapona4") {
bullet_number = 2;
bullet_offset = 15;
bullet_speed = 10;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 45;
bullet_ranspeed = 2;
bullet_power = 2;
bullet_projectiles = 1;
weapon_image = 5;
reload_delay = 150;
}
break;
case "WeaponB" :
if (weaponb_type == "weaponb1") {
bullet_number = 4;
bullet_offset = 2;
bullet_speed = 8;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 40;
bullet_ranspeed = 1;
bullet_power = 1;
bullet_projectiles = 2;
weapon_image = 6;
reload_delay = 900;
}
if (weaponb_type == "weaponb2") {
bullet_number = 6;
bullet_offset = 7;
bullet_speed = 8;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 40;
bullet_ranspeed = 1;
bullet_power = 1;
bullet_projectiles = 2;
weapon_image = 7;
reload_delay = 800;
}
if (weaponb_type == "weaponb3") {
bullet_number = 8;
bullet_offset = 10;
bullet_speed = 12;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 45;
bullet_ranspeed = 3;
bullet_power = 1;
bullet_projectiles = 2;
weapon_image = 8;
reload_delay = 700;
}
if (weaponb_type == "weaponb4") {
bullet_number = 10;
bullet_offset = 30;
bullet_speed = 12;
bullet_bearing = 0;
bullet_spread = 1;
bullet_barrel = 45;
bullet_ranspeed = 5;
bullet_power = 1;
bullet_projectiles = 2;
weapon_image = 9;
reload_delay = 600;
}
break;
case "WeaponC" :
if (weaponc_type == "weaponc1") {
bullet_number = 1;
bullet_offset = 3;
bullet_speed = 6;
bullet_bearing = 0.1;
bullet_spread = 3;
bullet_barrel = 50;
bullet_ranspeed = 0.3;
bullet_power = 1;
bullet_projectiles = 3;
weapon_image = 10;
reload_delay = 600;
}
if (weaponc_type == "weaponc2") {
bullet_number = 1;
bullet_offset = 2;
bullet_speed = 8;
bullet_bearing = 0.1;
bullet_spread = 3;
bullet_barrel = 50;
bullet_ranspeed = 0.2;
bullet_power = 1;
bullet_projectiles = 3;
weapon_image = 11;
reload_delay = 500;
}
if (weaponc_type == "weaponc3") {
bullet_number = 1;
bullet_offset = 2;
bullet_speed = 10;
bullet_bearing = 0.1;
bullet_spread = 5;
bullet_barrel = 50;
bullet_ranspeed = 0.3;
bullet_power = 1;
bullet_projectiles = 3;
weapon_image = 12;
reload_delay = 450;
}
if (weaponc_type != "weaponc4") {
break;
}
bullet_number = 1;
bullet_offset = 15;
bullet_speed = 12;
bullet_bearing = 0.2;
bullet_spread = 7;
bullet_barrel = 50;
bullet_ranspeed = 0.3;
bullet_power = 1;
bullet_projectiles = 3;
weapon_image = 13;
reload_delay = 400;
}
}
function fire_weapon() {
if (reload_complete && (mouse_down)) {
create_bullet();
if (!mute_sound) {
if (bullet_projectiles == 1) {
shoot01.start();
} else if (bullet_projectiles == 2) {
shoot02.start();
} else if (bullet_projectiles == 3) {
shoot03.start();
}
}
}
}
function create_tempbullet(bullet_bearing) {
var _local4 = 0;
while (_local4 < bullet_number) {
var _local2 = level_container.bullet_container.attachMovie("mc_bullet", "b" + level_container.bullet_container.getNextHighestDepth(), level_container.bullet_container.getNextHighestDepth());
_local2.gotoAndStop(bullet_projectiles);
var _local3 = random(bullet_offset) - (bullet_offset / 2);
if (level_container.hero_container.hero._xscale == 100) {
_local2.bullet_angle = (((level_container.hero_container.hero.weapon._rotation + _local3) * Math.PI) / 180) - bullet_bearing;
_local2._x = level_container.hero_container.hero._x + (bullet_barrel * Math.cos((level_container.hero_container.hero.weapon._rotation * Math.PI) / 180));
_local2._y = level_container.hero_container.hero._y + (bullet_barrel * Math.sin((level_container.hero_container.hero.weapon._rotation * Math.PI) / 180));
} else {
_local2.bullet_angle = (-((((level_container.hero_container.hero.weapon._rotation + _local3) + 180) * Math.PI) / 180)) - bullet_bearing;
_local2._x = level_container.hero_container.hero._x - (bullet_barrel * Math.cos(((-level_container.hero_container.hero.weapon._rotation) * Math.PI) / 180));
_local2._y = level_container.hero_container.hero._y - (bullet_barrel * Math.sin(((-level_container.hero_container.hero.weapon._rotation) * Math.PI) / 180));
}
_local2._rotation = (_local2.bullet_angle * 60) + 90;
_local2.x_speed = Math.cos(_local2.bullet_angle) * (bullet_speed + (Math.random() * bullet_ranspeed));
_local2.y_speed = Math.sin(_local2.bullet_angle) * (bullet_speed + (Math.random() * bullet_ranspeed));
bullet_array.push(_local2);
_local2.onEnterFrame = function () {
if (!pause) {
if (!hero_lose) {
if (!hero_win) {
this._x = this._x + this.x_speed;
this._y = this._y + this.y_speed;
this.center_x = Math.floor(this._x / tile_size);
this.center_y = Math.floor(this._y / tile_size);
this.center = level[this.center_y][this.center_x];
if (((this.center != 0) && (this.center != 4)) && (this.center != 5)) {
destroy_bullet(this);
}
if (this.hitTest(level_container.enemy)) {
destroy_bullet(this);
}
}
}
}
};
_local4++;
}
}
function create_bullet() {
if (bullet_spread == 1) {
create_tempbullet(bullet_bearing);
}
if (bullet_spread == 3) {
create_tempbullet(bullet_bearing);
create_tempbullet(-bullet_bearing);
create_tempbullet(0);
}
if (bullet_spread == 5) {
create_tempbullet(bullet_bearing * 2);
create_tempbullet((-bullet_bearing) * 2);
create_tempbullet(bullet_bearing);
create_tempbullet(-bullet_bearing);
create_tempbullet(0);
}
if (bullet_spread == 7) {
create_tempbullet(bullet_bearing * 3);
create_tempbullet((-bullet_bearing) * 3);
create_tempbullet(bullet_bearing * 2);
create_tempbullet((-bullet_bearing) * 2);
create_tempbullet(bullet_bearing);
create_tempbullet(-bullet_bearing);
create_tempbullet(0);
}
start_reload();
}
function start_reload() {
reload_complete = false;
reload_timer = setInterval(gun_reload, reload_delay);
}
function gun_reload() {
clearInterval(reload_timer);
reload_complete = true;
}
function destroy_bullet(_bullet) {
var _local2 = 0;
while (_local2 < bullet_array.length) {
var _local1 = bullet_array[_local2];
if (_local1 == _bullet) {
xtemp = _local1._x - (_local1.x_speed * 0.7);
ytemp = _local1._y - (_local1.y_speed * 0.7);
bullet_array.splice(_local2, 1);
removeMovieClip(_local1);
explosion("small");
}
_local2++;
}
}
function explosion(type) {
if (type == "bottom") {
var _local3 = 0;
var _local9 = 100;
var _local8 = 100;
var _local11 = 1;
var _local10 = 1;
var _local6 = 2;
var gravity_fragments = 0;
}
if (type == "center") {
var _local3 = 0.2;
var _local9 = 100;
var _local8 = 150;
var _local11 = 1;
var _local10 = 1;
var _local6 = 1;
var gravity_fragments = 0.1;
}
if (type == "big") {
var _local3 = 4;
var _local9 = 30;
var _local8 = 50;
var _local11 = 3;
var _local10 = 5;
var _local6 = 1;
var gravity_fragments = 0.2;
}
if (type == "huge") {
var _local3 = 1;
var _local9 = 200;
var _local8 = 250;
var _local11 = 2;
var _local10 = 3;
var _local6 = 1;
var gravity_fragments = 0.1;
}
if (type == "small") {
var _local3 = 2;
var _local9 = 30;
var _local8 = 60;
var _local11 = 1;
var _local10 = 2;
var _local6 = 3;
var gravity_fragments = 0.2;
}
var _local7 = rand_range(_local11, _local10);
var _local4 = 0;
while (_local4 < _local7) {
var _local2 = level_container.effect_container.attachMovie("mc_explode", "fragment" + level_container.effect_container.getNextHighestDepth(), level_container.effect_container.getNextHighestDepth(), {_x:xtemp, _y:ytemp});
_local2.gotoAndStop(_local6);
if (_local6 == 2) {
_local2._rotation = 0;
} else {
_local2._rotation = rand_range(1, 359);
}
var _local5 = rand_range(_local9, _local8);
_local2._xscale = _local5;
_local2._yscale = _local5;
_local2.xspeed = rand_range(-_local3, _local3);
_local2.yspeed = rand_range(-_local3, _local3);
_local2.onEnterFrame = function () {
if (!pause) {
if ((type == "bottom") || (type == "center")) {
shake(level_container);
}
this.explode.gotoAndPlay(this.explode._currentframe);
this.yspeed = this.yspeed + (gravity * gravity_fragments);
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
this.center_x = Math.floor(this._x / tile_size);
this.center_y = Math.floor(this._y / tile_size);
this.center = level[this.center_y][this.center_x];
if (type != "bottom") {
if ((((this.center != 0) && (this.center != 4)) && (this.center != 5)) || (this.explode._currentframe >= this.explode._totalframes)) {
this.removeMovieClip();
}
} else if (this.explode._currentframe >= this.explode._totalframes) {
this.removeMovieClip();
}
} else {
this.explode.gotoAndStop(this.explode._currentframe);
}
};
_local4++;
}
}
function rand_range(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function shake(target) {
var _local1 = random(2);
if (_local1 == 0) {
target._x = target._x + shake_range;
} else if (_local1 == 1) {
target._x = target._x - shake_range;
}
_local1 = random(2);
if (_local1 == 0) {
target._y = target._y + shake_range;
} else if (_local1 == 1) {
target._y = target._y - shake_range;
}
}
function create_key() {
x = 0;
while (x < key.length) {
key_mc = level_container.item_container.attachMovie("mc_key", "key" + level_container.item_container.getNextHighestDepth(), level_container.item_container.getNextHighestDepth(), {_x:(key[x][0] * tile_size) + (tile_size / 2), _y:((key[x][1] * tile_size) + (tile_size / 2)) + 1});
key_mc.ind = x;
key_mc.gotoAndStop(x + 1);
key_mc.onEnterFrame = function () {
if (this.hitTest(level_container.hero_container.hero.head)) {
open_x = [key[this.ind][2]];
open_y = [key[this.ind][3]];
level[open_y][open_x] = 0;
level_container.tile_container[(("t" + open_y) + "_") + open_x].door.gotoAndStop(2);
this.keys.gotoAndStop(2);
if ((level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim._currentframe == 2) && (!mute_sound)) {
door01.start();
}
if (!pause) {
if (level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim._currentframe != level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim._totalframes) {
level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim.gotoAndPlay(level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim._currentframe);
} else {
level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim.gotoAndStop(level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim._currentframe);
}
} else {
level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim.gotoAndStop(level_container.tile_container[(("t" + open_y) + "_") + open_x].door.door_anim._currentframe);
}
}
};
x++;
}
}
function create_point() {
x = 0;
while (x < point.length) {
point_mc = level_container.item_container.attachMovie("mc_point", "point_" + level_container.item_container.getNextHighestDepth(), level_container.item_container.getNextHighestDepth(), {_x:(point[x][0] * tile_size) + (tile_size / 2), _y:((point[x][1] * tile_size) + (tile_size / 2)) + 1});
point_mc.gotoAndStop(Math.floor(random(point_mc._totalframes - 1)) + 1);
point_mc.onEnterFrame = function () {
if (!hero_lose) {
if (this.hitTest(level_container.hero_container.hero.head) && (!collect_hero)) {
this.removeMovieClip();
collect_hero = true;
if (!mute_sound) {
collect01.start();
}
}
}
if (!pause) {
this.point.gotoAndPlay(this.point._currentframe);
} else {
this.point.gotoAndStop(this.point._currentframe);
}
};
x++;
}
}
function create_goal() {
x = 0;
while (x < goal.length) {
goal_mc = level_container.item_container.attachMovie("mc_goal", "goal" + level_container.item_container.getNextHighestDepth(), level_container.item_container.getNextHighestDepth(), {_x:(goal[x][0] * tile_size) + (tile_size / 2), _y:((goal[x][1] * tile_size) + (tile_size / 2)) + 1});
goal_mc.ind = x;
goal_mc.gotoAndStop(x + 1);
goal_mc.onEnterFrame = function () {
if (this.hitTest(level_container.hero_container.hero.head)) {
if (collect_hero) {
collect_hero = false;
collect++;
if (rampage) {
score = score + 110;
total_score = total_score + 110;
} else {
score = score + 100;
total_score = total_score + 100;
}
}
if (!mute_sound) {
collect02.start();
}
if ((collect >= collect_total) && (!boss_exist)) {
total_score = total_score + ((seconds_end + (minutes_end * 60)) - 1);
money = money + ((score + (seconds_end + (minutes_end * 60))) - 1);
level_container.hero_container.hero._y = this._y;
player_win();
}
}
};
x++;
}
}
function create_level(l) {
level_height = l.length;
level_width = l[0].length;
y = 0;
while (y < level_height) {
x = 0;
while (x < level_width) {
if (l[y][x] != 0) {
t = level_container.tile_container.attachMovie("mc_tile", (("t" + y) + "_") + x, level_container.tile_container.getNextHighestDepth(), {_x:x * tile_size, _y:y * tile_size});
t.gotoAndStop(l[y][x]);
t.tile.gotoAndStop(Math.floor(random(t.tile._totalframes - 1)) + 1);
}
x++;
}
y++;
}
}
function create_move() {
lose_timer = 0;
hero_win = false;
level_container._alpha = 0;
panel_container._alpha = 0;
load_weapon("WeaponA");
level_container._x = -tile_size;
level_container._y = (-(level.length * tile_size)) + (stage_height - (tile_size / 2));
onEnterFrame = function () {
bgm01.setVolume(bgm_volume);
bgm02.setVolume(bgm_volume);
if (play_title) {
if (!pause) {
bgm_volume++;
if (bgm_volume >= 100) {
bgm_volume = 100;
}
} else {
bgm_volume--;
if (bgm_volume <= 50) {
bgm_volume = 50;
}
}
} else {
bgm_volume = 100;
}
info_timer++;
level_container.hero_container.hero.weapon.gotoAndStop(weapon_image);
if (level_container._alpha < 100) {
level_container._alpha = level_container._alpha + 5;
} else {
level_container._alpha = 100;
}
if (panel_container._alpha < 100) {
panel_container._alpha = panel_container._alpha + 5;
} else {
panel_container._alpha = 100;
}
if (health <= 0) {
health = 0;
player_die();
}
if (health >= health_total) {
health = health_total;
}
if (!pause) {
if (health < health_total) {
health = health + regen;
}
foot_collision();
update_bullet();
check_combo();
create_enemy();
walking = false;
climbing = false;
if (Key.isDown(49) || (Key.isDown(97))) {
load_weapon("WeaponA");
}
if (Key.isDown(50) || (Key.isDown(98))) {
load_weapon("WeaponB");
}
if (Key.isDown(51) || (Key.isDown(99))) {
load_weapon("WeaponC");
}
if (!teleport) {
fire_weapon();
}
teleport_delaystart = teleport_delaystart + teleport_delaytime;
if (teleport_delaystart >= teleport_delay) {
teleport_delaystart = teleport_delay;
if (Key.isDown(32) || (Key.isDown(96))) {
level_container.blendMode = 9;
teleport = true;
pause = true;
player_teleport();
if (!mute_sound) {
teleport01.start();
}
}
} else {
teleport = false;
level_container.blendMode = 1;
}
if (Key.isDown(37) || (Key.isDown(65))) {
if (!hero_lose) {
if (!hero_win) {
xspeed = xspeed - speed;
walking = true;
}
}
}
if (Key.isDown(39) || (Key.isDown(68))) {
if (!hero_lose) {
if (!hero_win) {
xspeed = xspeed + speed;
walking = true;
}
}
}
if (Key.isDown(38) || (Key.isDown(87))) {
get_edges();
if ((!falling) and (!jumping)) {
jumping = true;
walking = false;
if (!hero_lose) {
if (!hero_win) {
yspeed = -jump_speed;
}
}
}
}
if (!walking) {
xspeed = xspeed * friction;
if (Math.abs(xspeed) < 0.5) {
xspeed = 0;
}
if ((!falling) and (!jumping)) {
if (!hero_lose) {
if (!hero_win) {
if (!collect_hero) {
level_container.hero_container.hero.gotoAndStop(1);
} else {
level_container.hero_container.hero.gotoAndStop(8);
}
}
}
}
}
if (xspeed > max_speed) {
xspeed = max_speed;
}
if (xspeed < (max_speed * -1)) {
xspeed = max_speed * -1;
}
if (falling or jumping) {
yspeed = yspeed + gravity;
}
if ((!falling) and (!jumping)) {
yspeed = 0;
}
xspeed = xspeed + bonus_speed;
check_collisions();
level_container.hero_container.hero._x = x_pos;
level_container.hero_container.hero._y = y_pos;
xspeed = xspeed - bonus_speed;
scroll_view();
if (hero_lose || (hero_win)) {
lose_timer++;
}
if (lose_timer >= 20) {
pause = true;
}
}
};
}
function scroll_view() {
if (x_pos < ((stage_width / 2) + tile_size)) {
level_container._x = level_container._x + (((-tile_size) - level_container._x) / 10);
} else if ((x_pos >= ((stage_width / 2) + tile_size)) && (x_pos <= ((level[0].length * tile_size) - ((stage_width / 2) + tile_size)))) {
level_container._x = level_container._x + ((((-x_pos) + (stage_width / 2)) - level_container._x) / 10);
} else if (x_pos > ((level[0].length * tile_size) - ((stage_width / 2) + tile_size))) {
level_container._x = level_container._x + ((((-(level[0].length * tile_size)) + (stage_width + tile_size)) - level_container._x) / 10);
}
if (y_pos < ((stage_height / 2) - tile_size)) {
level_container._y = level_container._y + ((tile_size - level_container._y) / 10);
} else if ((y_pos >= ((stage_height / 2) - tile_size)) && (y_pos <= ((level.length * tile_size) - ((stage_height / 2) - (tile_size / 2))))) {
level_container._y = level_container._y + ((((-y_pos) + (stage_height / 2)) - level_container._y) / 10);
} else if (y_pos > ((level.length * tile_size) - ((stage_height / 2) - (tile_size / 2)))) {
level_container._y = level_container._y + ((((-(level.length * tile_size)) + (stage_height - (tile_size / 2))) - level_container._y) / 10);
}
}
function create_combo() {
if (((combo_hit == 2) || (combo_hit == 5)) || (combo_hit >= 10)) {
var combo_info = level_container.combo_container.attachMovie("mc_combo", "combo" + level_container.combo_container.getNextHighestDepth(), level_container.combo_container.getNextHighestDepth(), {_x:xenemy, _y:yenemy});
combo_info.combo_info = ("COMBO " + combo_hit) + "X";
combo_info.cacheAsBitmap();
combo_info.onEnterFrame = function () {
if (!pause) {
combo_info._y = combo_info._y - 0.5;
if (combo_info._currentframe == combo_info._totalframes) {
combo_info.removeMovieClip();
}
}
};
}
if (combo_hit == 2) {
fastkill = true;
cookie.data.fastkill = fastkill;
cookie.flush();
_root.kongregateStats.submit("2Combos", 1);
}
if (combo_hit == 10) {
superfastkill = true;
cookie.data.superfastkill = superfastkill;
cookie.flush();
_root.kongregateStats.submit("10Combos", 1);
}
if (combo_hit == 50) {
hyperfastkill = true;
cookie.data.hyperfastkill = hyperfastkill;
cookie.flush();
_root.kongregateStats.submit("50Combos", 1);
}
}
function check_combo() {
combo_start++;
if (combo_start >= combo_delay) {
combo_start = 0;
combo_hit = 0;
}
if ((enemy_hit == true) && (combo_start <= combo_delay)) {
combo_hit++;
combo_start = 0;
}
enemy_hit = false;
}
function foot_collision() {
bonus_speed = 0;
left_foot_x = Math.floor((x_pos - hero_width) / tile_size);
right_foot_x = Math.floor((x_pos + (hero_width - 1)) / tile_size);
foot_y = Math.floor((y_pos + hero_height) / tile_size);
left_foot = level[foot_y][left_foot_x];
right_foot = level[foot_y][right_foot_x];
if (left_foot != 0) {
current_tile = left_foot;
} else {
current_tile = right_foot;
}
switch (current_tile) {
case 0 :
over = "air";
speed = air_acceleration;
friction = air_friction;
falling = true;
return;
case 1 :
over = "ground";
speed = ground_acceleration;
friction = ground_friction;
return;
case 2 :
over = "ground";
speed = ground_acceleration;
friction = ground_friction;
return;
case 3 :
over = "ground";
speed = ground_acceleration;
friction = ground_friction;
return;
case 4 :
over = "cloud";
speed = ground_acceleration;
friction = ground_friction;
return;
case 5 :
over = "cloud";
speed = ground_acceleration;
friction = ground_friction;
return;
case 6 :
over = "spikes";
if (!((left_foot == 6) && (right_foot == 6))) {
break;
}
xtemp = x_pos;
ytemp = y_pos;
if (health <= 0) {
break;
}
health = health - 50;
explosion("bottom");
panel_container.panel.hit._alpha = 100;
if (mute_sound) {
break;
}
explode02.start();
explode03.start();
hit01.start();
}
}
function check_collisions() {
y_pos = y_pos + yspeed;
get_edges();
if (!pause) {
if (yspeed > 0) {
if ((bottom_right != 0) || (bottom_left != 0)) {
if ((((bottom_right != 4) && (bottom_left != 4)) && (bottom_right != 5)) && (bottom_left != 5)) {
y_pos = (bottom * tile_size) - hero_height;
yspeed = 0;
falling = false;
jumping = false;
} else if (prev_bottom < bottom) {
y_pos = (bottom * tile_size) - hero_height;
yspeed = 0;
falling = false;
jumping = false;
}
}
}
if (yspeed < 0) {
if ((((top_right != 0) && (top_right != 4)) && (top_right != 5)) || (((top_left != 0) && (top_left != 4)) && (top_left != 5))) {
y_pos = (bottom * tile_size) + hero_height;
yspeed = 0;
falling = true;
jumping = false;
}
}
x_pos = x_pos + xspeed;
get_edges();
if (xspeed < 0) {
if (((((top_left != 0) && (top_left != 4)) && (top_left != 5)) && (top_left != 6)) || ((((bottom_left != 0) && (bottom_left != 4)) && (bottom_left != 5)) && (top_left != 6))) {
x_pos = ((left + 1) * tile_size) + hero_width;
xspeed = 0;
}
}
if (xspeed > 0) {
if (((((top_right != 0) && (top_right != 4)) && (top_right != 5)) && (top_right != 6)) || ((((bottom_right != 0) && (bottom_right != 4)) && (bottom_right != 5)) && (top_right != 6))) {
x_pos = (right * tile_size) - hero_width;
xspeed = 0;
}
}
prev_bottom = bottom;
}
}
function get_edges() {
right = Math.floor((x_pos + (hero_width - 1)) / tile_size);
left = Math.floor((x_pos - hero_width) / tile_size);
bottom = Math.floor((y_pos + (hero_height - 1)) / tile_size);
top = Math.floor((y_pos - hero_height) / tile_size);
top_right = level[top][right];
top_left = level[top][left];
bottom_left = level[bottom][left];
bottom_right = level[bottom][right];
}
function create_enemyA(type) {
var enemyA = level_container.enemy_container.attachMovie("mc_enemy", "enemyB" + level_container.enemy_container.getNextHighestDepth(), level_container.enemy_container.getNextHighestDepth(), {_x:(tile_size * 2) + random((level[0].length * tile_size) - (tile_size * 4)), _y:tile_size});
if (type == 1) {
var en_speed = 0.1;
var en_yspeed = 0.2;
var _local3 = 1;
var en_xspeed = (-4 + random(10));
}
if (type == 2) {
var en_speed = 0.1;
var en_yspeed = 0.1;
var _local3 = 5;
var en_xspeed = (-2 + random(5));
}
if (type == 3) {
var en_speed = 0.05;
var en_yspeed = 0.05;
var _local3 = 12;
var en_xspeed = 0;
}
if (type == 4) {
var en_speed = 0.1;
var en_yspeed = 0.2;
var _local3 = 1;
var en_xspeed = (-4 + random(10));
enemyA._x = xboss_temp;
enemyA._y = yboss_temp;
}
enemy_array.push([enemyA, _local3, _local3]);
enemyA.gotoAndStop(type);
enemyA._rotation = 180;
enemyA.onEnterFrame = function () {
if (!pause) {
this.enemy.gotoAndPlay(this.enemy._currentframe);
enemyA._rotation = 180 - (en_xspeed * 6.4);
enemyA._x = enemyA._x + en_xspeed;
enemyA._y = enemyA._y + en_speed;
en_speed = en_speed + (gravity * en_yspeed);
if (this._x < tile_size) {
this._x = tile_size + 1;
en_xspeed = -en_xspeed;
} else if (this._x > ((level[0].length * tile_size) - tile_size)) {
this._x = ((level[0].length * tile_size) - tile_size) - 1;
en_xspeed = -en_xspeed;
}
this.center_x = Math.floor(this._x / tile_size);
this.center_y = Math.floor(this._y / tile_size);
this.center = level[this.center_y][this.center_x];
if (((this.center == 1) || (this.center == 2)) || (this.center == 6)) {
destroy_enemy(enemyA);
explosion("bottom");
if (!mute_sound) {
explode02.start();
}
}
if (this.hitTest(level_container.hero_container.hero.head)) {
destroy_enemy(enemyA);
explosion("center");
health = health - health_hit;
panel_container.panel.hit._alpha = 100;
if (!mute_sound) {
explode01.start();
explode02.start();
hit01.start();
}
}
} else {
this.enemy.gotoAndStop(this.enemy._currentframe);
}
};
}
function create_enemyB(type) {
var enemyB = level_container.enemy_container.attachMovie("mc_enemy", "enemyB" + level_container.enemy_container.getNextHighestDepth(), level_container.enemy_container.getNextHighestDepth(), {_x:(tile_size * 2) + random((level[0].length * tile_size) - (tile_size * 4)), _y:tile_size});
var _local4 = 15;
var en_ranvalue = (1 / (_local4 / 100));
var en_dir = 180;
var en_count = 0;
if (type == 1) {
var en_speed = 4;
var en_randir = 60;
var _local3 = 1;
}
if (type == 2) {
var en_speed = 3;
var en_randir = 40;
var _local3 = 5;
}
if (type == 3) {
var en_speed = 2;
var en_randir = 20;
var _local3 = 12;
}
if (type == 4) {
var en_speed = 6;
var en_randir = 60;
var _local3 = 1;
enemyB._x = xboss_temp;
enemyB._y = yboss_temp;
}
enemy_array.push([enemyB, _local3, _local3]);
enemyB.gotoAndStop(type + 4);
enemyB._rotation = 180;
enemyB.onEnterFrame = function () {
if (!pause) {
this.enemy.gotoAndPlay(this.enemy._currentframe);
if (en_count >= en_ranvalue) {
en_count = 0;
en_dir = (180 - en_randir) + (Math.random() * (en_randir * 2));
} else {
en_count++;
}
enemyB._x = enemyB._x + (en_speed * Math.sin((en_dir * Math.PI) / 180));
enemyB._y = enemyB._y - (en_speed * Math.cos((en_dir * Math.PI) / 180));
enemyB._rotation = en_dir;
if (this._x < tile_size) {
this._x = tile_size + 1;
en_dir = -en_dir;
} else if (this._x > ((level[0].length * tile_size) - tile_size)) {
this._x = ((level[0].length * tile_size) - tile_size) - 1;
en_dir = -en_dir;
}
this.center_x = Math.floor(this._x / tile_size);
this.center_y = Math.floor(this._y / tile_size);
this.center = level[this.center_y][this.center_x];
if (((this.center == 1) || (this.center == 2)) || (this.center == 6)) {
destroy_enemy(enemyB);
explosion("bottom");
if (!mute_sound) {
explode02.start();
}
}
if (this.hitTest(level_container.hero_container.hero.head)) {
destroy_enemy(enemyB);
explosion("center");
health = health - health_hit;
panel_container.panel.hit._alpha = 100;
if (!mute_sound) {
explode01.start();
explode02.start();
hit01.start();
}
}
} else {
this.enemy.gotoAndStop(this.enemy._currentframe);
}
};
}
function create_enemyC(type) {
var enemyC = level_container.enemy_container.attachMovie("mc_enemy", "enemyC" + level_container.enemy_container.getNextHighestDepth(), level_container.enemy_container.getNextHighestDepth(), {_x:(tile_size * 2) + random((level[0].length * tile_size) - (tile_size * 4)), _y:tile_size});
var en_xmove = 0;
var en_ymove = 0;
if (type == 1) {
var en_speed = 6;
var en_turn = 0.1;
var _local5 = 1;
}
if (type == 2) {
var en_speed = 4;
var en_turn = 0.1;
var _local5 = 5;
}
if (type == 3) {
var en_speed = 2;
var en_turn = 0.1;
var _local5 = 12;
}
if (type == 4) {
var en_speed = 6;
var en_turn = 0.1;
var _local5 = 1;
enemyC._x = xboss_temp;
enemyC._y = yboss_temp;
}
enemy_array.push([enemyC, _local5, _local5]);
enemyC.gotoAndStop(type + 8);
enemyC._rotation = 180;
enemyC.onEnterFrame = function () {
if (!pause) {
this.enemy.gotoAndPlay(this.enemy._currentframe);
var _local2 = level_container.hero_container.hero._x - enemyC._x;
var _local3 = level_container.hero_container.hero._y - enemyC._y;
distanceTotal = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
var _local6 = (en_turn * _local2) / distanceTotal;
var _local5 = (en_turn * _local3) / distanceTotal;
en_xmove = en_xmove + _local6;
en_ymove = en_ymove + _local5;
var _local4 = Math.sqrt((en_xmove * en_xmove) + (en_ymove * en_ymove));
en_xmove = (en_speed * en_xmove) / _local4;
en_ymove = (en_speed * en_ymove) / _local4;
enemyC._x = enemyC._x + en_xmove;
enemyC._y = enemyC._y + en_ymove;
enemyC._rotation = 90 + ((180 * Math.atan2(en_ymove, en_xmove)) / Math.PI);
if (this._x < tile_size) {
this._x = tile_size + 1;
en_xmove = -en_xmove;
} else if (this._x > ((level[0].length * tile_size) - tile_size)) {
this._x = ((level[0].length * tile_size) - tile_size) - 1;
en_xmove = -en_xmove;
}
this.center_x = Math.floor(this._x / tile_size);
this.center_y = Math.floor(this._y / tile_size);
this.center = level[this.center_y][this.center_x];
if (((this.center == 1) || (this.center == 2)) || (this.center == 6)) {
destroy_enemy(enemyC);
explosion("bottom");
if (!mute_sound) {
explode02.start();
}
}
if (this.hitTest(level_container.hero_container.hero.head)) {
destroy_enemy(enemyC);
explosion("center");
health = health - health_hit;
panel_container.panel.hit._alpha = 100;
if (!mute_sound) {
explode01.start();
explode02.start();
hit01.start();
}
}
} else {
this.enemy.gotoAndStop(this.enemy._currentframe);
}
};
}
function create_enemyD(type) {
var enemyD = level_container.boss_container.attachMovie("mc_enemy-boss", "enemyD" + level_container.boss_container.getNextHighestDepth(), level_container.boss_container.getNextHighestDepth(), {_x:(level[0].length * tile_size) + tile_size, _y:tile_size * 3});
if (type == 1) {
var en_speed = 0.1;
var _local1 = 120;
var en_delay = 20;
var end_roam = 40;
}
if (type == 2) {
var en_speed = 0.2;
var _local1 = 150;
var en_delay = 40;
var end_roam = 60;
}
if (type == 3) {
var en_speed = 0.3;
var _local1 = 200;
var en_delay = 60;
var end_roam = 80;
}
var en_delay_start = 0;
var xspeed = 0;
var friction = 0.98;
var roaming = false;
enemy_array.push([enemyD, _local1, _local1]);
enemyD.onEnterFrame = function () {
if (!pause) {
if (enemyD.bar._xscale > 0) {
boss_exist = true;
}
enemyD.body.rotor.gotoAndPlay(enemyD.body.rotor._currentframe);
xboss_temp = enemyD._x;
yboss_temp = enemyD._y + 30;
enemyD._x = enemyD._x + xspeed;
xspeed = xspeed * friction;
if (!roaming) {
if (enemyD._x > (x_pos - end_roam)) {
xspeed = xspeed - en_speed;
enemyD.body._rotation = enemyD.body._rotation - 0.5;
if (enemyD.body._rotation < -15) {
enemyD.body._rotation = -15;
}
} else {
roaming = true;
}
} else if (enemyD._x < (x_pos + end_roam)) {
xspeed = xspeed + en_speed;
enemyD.body._rotation = enemyD.body._rotation + 0.5;
if (enemyD.body._rotation > 15) {
enemyD.body._rotation = 15;
}
} else {
roaming = false;
}
if (y_pos > ((level.length * tile_size) - (tile_size * 3))) {
enemyD._y = enemyD._y + (((y_pos - (tile_size * 6)) - enemyD._y) / 20);
} else {
enemyD._y = enemyD._y + (((y_pos - (tile_size * 4)) - enemyD._y) / 20);
}
if (en_delay_start >= en_delay) {
en_delay_start = 0;
if ((enemyD._x > tile_size) && (enemyD._x < ((level[0].length * tile_size) - tile_size))) {
if (type == 1) {
create_enemyA(1);
create_enemyA(4);
}
if (type == 2) {
create_enemyA(1);
create_enemyB(4);
}
if (type == 3) {
create_enemyC(2);
create_enemyC(4);
}
}
} else {
en_delay_start++;
}
} else {
enemyD.body.rotor.gotoAndStop(enemyD.body.rotor._currentframe);
}
};
}
function create_enemyE(type) {
var enemyE = level_container.boss_container.attachMovie("mc_enemy-boss", "enemyE" + level_container.boss_container.getNextHighestDepth(), level_container.boss_container.getNextHighestDepth(), {_x:(level[0].length * tile_size) + tile_size, _y:tile_size * 3});
if (type == 1) {
var en_speed = 0.4;
var _local1 = 80;
var en_delay = 80;
}
if (type == 2) {
var en_speed = 0.3;
var _local1 = 150;
var en_delay = 100;
}
var en_delay_start = 0;
var xspeed = 0;
var friction = 0.98;
var roaming = false;
enemy_array.push([enemyE, _local1, _local1]);
enemyE.onEnterFrame = function () {
if (!pause) {
if (enemyE.bar._xscale > 0) {
boss_exist = true;
}
enemyE.body.rotor.gotoAndPlay(enemyE.body.rotor._currentframe);
xboss_temp = enemyE._x;
yboss_temp = enemyE._y + 30;
enemyE._x = enemyE._x + xspeed;
xspeed = xspeed * friction;
left_roam = tile_size * 8;
right_roam = (level[0].length * tile_size) - (tile_size * 8);
if (!roaming) {
if (enemyE._x > left_roam) {
xspeed = xspeed - en_speed;
enemyE.body._rotation = enemyE.body._rotation - 0.5;
if (enemyE.body._rotation < -15) {
enemyE.body._rotation = -15;
}
} else {
roaming = true;
}
} else if (enemyE._x < right_roam) {
xspeed = xspeed + en_speed;
enemyE.body._rotation = enemyE.body._rotation + 0.5;
if (enemyE.body._rotation > 15) {
enemyE.body._rotation = 15;
}
} else {
roaming = false;
}
if (y_pos > ((level.length * tile_size) - (tile_size * 3))) {
enemyE._y = enemyE._y + (((y_pos - (tile_size * 6)) - enemyE._y) / 20);
} else {
enemyE._y = enemyE._y + (((y_pos - (tile_size * 4)) - enemyE._y) / 20);
}
if (en_delay_start >= en_delay) {
en_delay_start = 0;
if ((enemyE._x > tile_size) && (enemyE._x < ((level[0].length * tile_size) - tile_size))) {
if (type == 1) {
create_enemyC(4);
}
if (type == 2) {
create_enemyC(4);
create_enemyC(3);
}
}
} else {
en_delay_start++;
}
} else {
enemyE.body.rotor.gotoAndStop(enemyE.body.rotor._currentframe);
}
};
}
function destroy_enemy(_enemy) {
var _local3 = 0;
while (_local3 < enemy_array.length) {
var _local2 = 0;
while (_local2 < enemy_array[0].length) {
var _local1 = enemy_array[_local3][_local2];
if (_local1 == _enemy) {
xtemp = _local1._x;
ytemp = _local1._y - 10;
enemy_array.splice(_local3, 1);
_local1.removeMovieClip();
explosion("big");
}
_local2++;
}
_local3++;
}
}
function update_bullet() {
var _local2 = 0;
while (_local2 < bullet_array.length) {
var _local1 = bullet_array[_local2];
_local1._x = _local1._x + _local1.x_speed;
_local1._y = _local1._y + _local1.y_speed;
enemy_collision(_local1);
_local2++;
}
}
function enemy_collision(_bullet) {
var _local3 = 0;
while (_local3 < enemy_array.length) {
var _local2 = 0;
while (_local2 < enemy_array[0].length) {
var _local4 = enemy_array[_local3][_local2];
var _local5 = enemy_array[_local3][_local2 + 1];
if (_local4.enemy.hitTest(_bullet)) {
enemy_array[_local3][_local2 + 1] = enemy_array[_local3][_local2 + 1] - 1;
_local4.bar._xscale = (((enemy_array[_local3][_local2 + 2] * enemy_array[_local3][_local2 + 1]) / enemy_array[_local3][_local2 + 2]) / enemy_array[_local3][_local2 + 2]) * 100;
if ((_local4.bar._xscale <= 0) && (_local4.bar._xscale != undefined)) {
boss_exist = false;
explosion("huge");
killthisbadboy = true;
cookie.data.killthisbadboy = killthisbadboy;
cookie.flush();
_root.kongregateStats.submit("DestroyedHelicopter", 1);
if (!mute_sound) {
explode01.start();
explode02.start();
explode03.start();
}
}
xenemy = _local4._x;
yenemy = _local4._y;
destroy_bullet(_bullet);
if (enemy_array[_local3][_local2 + 1] <= 0) {
enemy_hit = true;
destroy_bombs++;
create_combo();
explosion("center");
if (destroy_bombs >= 50) {
shotthem = true;
cookie.data.shotthem = shotthem;
cookie.flush();
_root.kongregateStats.submit("Destroy50Bombs", 1);
}
if (destroy_bombs >= 200) {
killthem = true;
cookie.data.killthem = killthem;
cookie.flush();
_root.kongregateStats.submit("Destroy200Bombs", 1);
}
if (enemy_array[_local3][_local2 + 2] == 100) {
daydie = true;
cookie.data.daydie = daydie;
cookie.flush();
_root.kongregateStats.submit("KilledZombie", 1);
}
if (!mute_sound) {
explode01.start();
explode02.start();
}
if (combo_hit < 2) {
if (rampage) {
score = score + enemy_array[_local3][_local2 + 2];
total_score = total_score + enemy_array[_local3][_local2 + 2];
} else {
score = score + enemy_array[_local3][_local2 + 2];
total_score = total_score + enemy_array[_local3][_local2 + 2];
}
}
if ((combo_hit >= 2) && (combo_hit < 5)) {
if (rampage) {
score = score + (enemy_array[_local3][_local2 + 2] * 3);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 3);
} else {
score = score + (enemy_array[_local3][_local2 + 2] * 2);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 2);
}
}
if ((combo_hit >= 5) && (combo_hit < 10)) {
if (rampage) {
score = score + (enemy_array[_local3][_local2 + 2] * 8);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 8);
} else {
score = score + (enemy_array[_local3][_local2 + 2] * 5);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 5);
}
}
if (combo_hit >= 10) {
if (rampage) {
score = score + (enemy_array[_local3][_local2 + 2] * 15);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 15);
} else {
score = score + (enemy_array[_local3][_local2 + 2] * 10);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 10);
}
}
if (combo_hit >= 50) {
if (rampage) {
score = score + (enemy_array[_local3][_local2 + 2] * 30);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 30);
} else {
score = score + (enemy_array[_local3][_local2 + 2] * 20);
total_score = total_score + (enemy_array[_local3][_local2 + 2] * 20);
}
}
destroy_enemy(_local4);
}
}
_local2++;
}
_local3++;
}
}
function create_foe() {
x = 0;
while (x < enemy.length) {
foe = level_container.enemy_container.attachMovie("mc_zombie", "foe" + level_container.enemy_container.getNextHighestDepth(), level_container.enemy_container.getNextHighestDepth(), {_x:(enemy[x][0] * tile_size) + (tile_size / 2), _y:((enemy[x][1] * tile_size) + (tile_size / 2)) + 1});
foe.speed = enemy[x][2];
var _local2 = 100;
enemy_array.push([foe, _local2, _local2]);
foe.onEnterFrame = function () {
if (!pause) {
this.body.gotoAndPlay(this.body._currentframe);
if (this.speed > 0) {
this._xscale = -100;
} else {
this._xscale = 100;
}
this.x_pos = this._x;
this.y_pos = this._y;
this.x_pos = this.x_pos + this.speed;
this.left_foot_x = Math.floor((this.x_pos - enemy_width) / tile_size);
this.right_foot_x = Math.floor(((this.x_pos + enemy_width) - 1) / tile_size);
this.foot_y = Math.floor((this.y_pos + enemy_height) / tile_size);
this.bottom = Math.floor(((this.y_pos + enemy_height) - 1) / tile_size);
this.left_foot = level[this.foot_y][this.left_foot_x];
this.right_foot = level[this.foot_y][this.right_foot_x];
this.left = level[this.bottom][this.left_foot_x];
this.right = level[this.bottom][this.right_foot_x];
if ((((((this.left_foot != 0) && (this.left_foot != 4)) && (this.left_foot != 5)) && (((this.right_foot != 0) && (this.right_foot != 4)) && (this.right_foot != 5))) && (((this.left == 0) || (this.left == 4)) || (this.left == 5))) && (((this.right == 0) || (this.right == 4)) || (this.right == 5))) {
this._x = this.x_pos;
} else {
this.speed = this.speed * -1;
}
if (this.hitTest(level_container.hero_container.hero.head)) {
health = health - 50;
panel_container.panel.hit._alpha = 100;
if (!mute_sound) {
hit01.start();
}
}
} else {
this.body.gotoAndStop(this.body._currentframe);
}
};
x++;
}
}
function create_panel(total_timer) {
var panel = panel_container.attachMovie("mc_panel", "panel", getNextHghestDepth());
counter = 0;
last_time = getTimer();
panel.hit.blendMode = 8;
panel.onEnterFrame = function () {
panel.hit._alpha = panel.hit._alpha - 10;
if (panel.hit._alpha <= 0) {
panel.hit._alpha = 0;
}
if (weapona_type == "weapona0") {
panel.info_weapona.gotoAndStop(2);
}
if (weapona_type == "weapona1") {
panel.info_weapona.gotoAndStop(3);
}
if (weapona_type == "weapona2") {
panel.info_weapona.gotoAndStop(4);
}
if (weapona_type == "weapona3") {
panel.info_weapona.gotoAndStop(5);
}
if (weapona_type == "weapona4") {
panel.info_weapona.gotoAndStop(6);
}
if (weaponb_type == "weaponb1") {
panel.info_weaponb.gotoAndStop(7);
}
if (weaponb_type == "weaponb2") {
panel.info_weaponb.gotoAndStop(8);
}
if (weaponb_type == "weaponb3") {
panel.info_weaponb.gotoAndStop(9);
}
if (weaponb_type == "weaponb4") {
panel.info_weaponb.gotoAndStop(10);
}
if (weaponb_type == "none") {
panel.info_weaponb.gotoAndStop(1);
}
if (weaponc_type == "weaponc1") {
panel.info_weaponc.gotoAndStop(11);
}
if (weaponc_type == "weaponc2") {
panel.info_weaponc.gotoAndStop(12);
}
if (weaponc_type == "weaponc3") {
panel.info_weaponc.gotoAndStop(13);
}
if (weaponc_type == "weaponc4") {
panel.info_weaponc.gotoAndStop(14);
}
if (weaponc_type == "none") {
panel.info_weaponc.gotoAndStop(1);
}
panel.info_survivora.gotoAndStop(point.length);
panel.info_survivorb.gotoAndStop(collect + 1);
this.display_level = this_level;
this.display_health._xscale = (((health_total * health) / health_total) / health_total) * 100;
this.display_teleport._xscale = teleport_delaystart / 2;
if (this.display_teleport._xscale == 50) {
var _local3 = new Color(this.display_teleport);
_local3.setRGB(65280);
} else {
var _local2 = new Color(this.display_teleport);
_local2.setRGB(3381504);
}
if (!pause) {
if (total_timer > 0) {
total_timer--;
}
if (total_timer <= 0) {
player_die();
}
}
this.timer.minutes = int(total_timer / 2400);
this.timer.seconds = int((total_timer % 2400) / 40);
minutes_end = this.timer.minutes;
seconds_end = this.timer.seconds;
if (this.timer.minutes <= 9) {
this.timer.minutes = "0" + this.timer.minutes;
}
if (this.timer.seconds <= 9) {
this.timer.seconds = "0" + this.timer.seconds;
}
if ((this.timer.seconds <= 19) && (this.timer.minutes <= 0)) {
var _local4 = new Color(this.timer);
_local4.setRGB(16711680);
}
counter++;
if ((getTimer() - lastTime) >= 1000) {
this.display_fps = (((("BL:" + bullet_array.length) + " EN:") + enemy_array.length) + " FPS:") + counter;
counter = 0;
lastTime = getTimer();
}
this.display_total = "TOTAL SCORE : " + total_score;
this.display_score = score;
if (score <= 9) {
this.display_score = "0000" + score;
}
if ((score <= 99) && (score >= 10)) {
this.display_score = "000" + score;
}
if ((score <= 999) && (score >= 100)) {
this.display_score = "00" + score;
}
if ((score <= 9999) && (score >= 1000)) {
this.display_score = "0" + score;
}
if (!mute_sound) {
panel.bt_soundon._visible = false;
panel.bt_soundoff._visible = true;
} else {
panel.bt_soundon._visible = true;
panel.bt_soundoff._visible = false;
}
if (!mute_music) {
panel.bt_musicon._visible = false;
panel.bt_musicoff._visible = true;
} else {
panel.bt_musicon._visible = true;
panel.bt_musicoff._visible = false;
}
panel.bt_soundon.onRelease = function () {
panel.bt_soundoff._visible = true;
panel.bt_soundon._visible = false;
mute_sound = false;
if (boss_exist) {
copper.start(0, 10000);
}
};
panel.bt_soundoff.onRelease = function () {
panel.bt_soundoff._visible = false;
panel.bt_soundon._visible = true;
mute_sound = true;
if (boss_exist) {
copper.stop();
}
};
panel.bt_musicon.onRelease = function () {
panel.bt_musicoff._visible = true;
panel.bt_musicon._visible = false;
mute_music = false;
if (!boss_exist) {
if ((((((this_level == "LEVEL 1") || (this_level == "LEVEL 2")) || (this_level == "LEVEL 6")) || (this_level == "LEVEL 7")) || (this_level == "LEVEL 11")) || (this_level == "LEVEL 12")) {
bgm01.start(0, 100000);
} else {
bgm02.start(0, 10000);
}
}
};
panel.bt_musicoff.onRelease = function () {
panel.bt_musicoff._visible = false;
panel.bt_musicon._visible = true;
mute_music = true;
if (!boss_exist) {
bgm01.stop();
bgm02.stop();
}
};
};
}
function create_endscreen() {
endscreen = attachMovie("mc_endscreen", "endscreen", getNextHighestDepth());
endscreen._alpha = 0;
endscreen.display_total_score = 0;
total_score = total_score + 1000;
endscreen.onEnterFrame = function () {
if (endscreen._alpha < 100) {
endscreen._alpha = endscreen._alpha + 5;
} else {
endscreen._alpha = 100;
}
endscreen.display_total_score = endscreen.display_total_score + 20;
if (endscreen.display_total_score >= total_score) {
endscreen.display_total_score = total_score;
}
endscreen.bt_menu.onRelease = function () {
cookie.data.level_complete = undefined;
remove_stage();
play_game("title");
if (!mute_sound) {
copper.stop();
}
if (!mute_music) {
bgm01.stop();
bgm02.stop();
title.start(0, 10000);
}
};
if (endscreen.display_name != undefined) {
endscreen.bt_submit.onRelease = function () {
highSender.playerName = endscreen.display_name;
highSender.score = total_score;
highSender.gamename = GAMENAME;
highSender.validator = _root.scoreSystem.processScore(_root.score);
highSender.loadVariables(PATH + "new_score.php", "POST");
getURL (SCORESPATH, "_blank");
cookie.data.level_complete = undefined;
remove_stage();
play_game("title");
if (!mute_sound) {
copper.stop();
}
if (!mute_music) {
bgm01.stop();
bgm02.stop();
title.start(0, 10000);
}
};
}
if (cheat_use) {
endscreen.bt_submit._visible = false;
} else {
endscreen.bt_submit._visible = true;
}
};
}
function create_winscreen() {
winscreen = attachMovie("mc_winscreen", "winscreen", getNextHighestDepth());
winscreen._visible = false;
winscreen._alpha = 0;
winscreen.display_time_bonus = 0;
winscreen.display_score = 0;
winscreen.display_total_score = 0;
winscreen.info.gotoAndStop(winscreen.info._totalframes);
winscreen.onEnterFrame = function () {
winscreen_upgrade();
if (hero_win == true) {
winscreen._visible = true;
if (winscreen._alpha < 100) {
winscreen._alpha = winscreen._alpha + 5;
} else {
winscreen._alpha = 100;
}
winscreen.display_time_bonus = winscreen.display_time_bonus + 5;
if (winscreen.display_time_bonus >= (seconds_end + (minutes_end * 60))) {
winscreen.display_time_bonus = seconds_end + (minutes_end * 60);
}
winscreen.display_score = winscreen.display_score + 20;
if (winscreen.display_score >= score) {
winscreen.display_score = score;
}
winscreen.display_total_score = winscreen.display_total_score + 80;
if (winscreen.display_total_score >= total_score) {
winscreen.display_total_score = total_score;
}
winscreen.display_money = winscreen.display_money + 5;
if (winscreen.display_money >= money) {
winscreen.display_money = money;
}
temp_total_score = total_score;
}
if (winscreen.display_total_score == total_score) {
winscreen.bt_continue.onRelease = function () {
cookie.data.weapona_type = weapona_type;
cookie.data.weaponb_type = weaponb_type;
cookie.data.weaponc_type = weaponc_type;
cookie.data.health_total = health_total;
cookie.data.health_hit = health_hit;
cookie.data.regen = regen;
cookie.data.teleport_delaytime = teleport_delaytime;
cookie.data.money = money;
cookie.data.cheat_use = cheat_use;
cookie.data.total_score = total_score;
cookie.data.rampage = rampage;
cookie.data.level_complete = next_level;
cookie.flush();
remove_stage();
load_level(next_level);
_root.kongregateStats.submit("HighScore", total_score);
};
winscreen.bt_menu.onRelease = function () {
remove_stage();
play_game("title");
if (!mute_sound) {
copper.stop();
}
if (!mute_music) {
bgm01.stop();
bgm02.stop();
title.start(0, 10000);
}
};
if (winscreen._visible == true) {
if (Key.isDown(13)) {
remove_stage();
load_level(next_level);
}
}
}
};
}
function create_losescreen() {
losescreen = attachMovie("mc_losescreen", "losescreen", getNextHighestDepth());
losescreen._visible = false;
losescreen._alpha = 0;
losescreen.onEnterFrame = function () {
losescreen.display_total_score = total_score;
if (!rampage) {
losescreen.bt_restart._visible = true;
} else {
losescreen.bt_restart._visible = false;
}
if (hero_lose == true) {
losescreen._visible = true;
if (losescreen._alpha < 100) {
losescreen._alpha = losescreen._alpha + 5;
} else {
losescreen._alpha = 100;
}
losescreen.bt_restart.onRelease = function () {
hero_win = false;
hero_lose = false;
remove_stage();
load_level(this_level);
};
if (losescreen._visible == true) {
if (Key.isDown(13)) {
hero_win = false;
hero_lose = false;
remove_stage();
load_level(this_level);
}
}
losescreen.bt_menu.onRelease = function () {
remove_stage();
play_game("title");
if (rampage) {
cookie.data.level_complete = undefined;
cookie.flush();
}
if (!mute_sound) {
copper.stop();
}
if (!mute_music) {
bgm01.stop();
bgm02.stop();
title.start(0, 10000);
}
};
losescreen.bt_more.onRelease = function () {
getURL ("http://www.blitzgamer.com/?gameref=savethefallen", "_blank");
};
if (losescreen.display_name != undefined) {
losescreen.bt_submit.onRelease = function () {
highSender.playerName = losescreen.display_name;
highSender.score = total_score;
highSender.gamename = GAMENAME;
highSender.validator = _root.scoreSystem.processScore(_root.score);
highSender.loadVariables(PATH + "new_score.php", "POST");
getURL (SCORESPATH, "_blank");
cookie.data.level_complete = undefined;
remove_stage();
play_game("title");
if (!mute_sound) {
copper.stop();
}
if (!mute_music) {
bgm01.stop();
bgm02.stop();
title.start(0, 10000);
}
};
}
}
if (cheat_use) {
losescreen.bt_submit._visible = false;
} else {
losescreen.bt_submit._visible = true;
}
};
}
function create_pausescreen() {
pausescreen = attachMovie("mc_pausescreen", "pausescreen", getNextHighestDepth());
pausescreen._visible = false;
pausescreen._alpha = 0;
pausescreen.cheat._visible = false;
pausescreen.onEnterFrame = function () {
if (!rampage) {
pausescreen.bt_restart._visible = true;
} else {
pausescreen.bt_restart._visible = false;
}
if (!pause) {
pausescreen.display_total_score = total_score;
if (Key.isDown(80) || (Key.isDown(27))) {
pausescreen._visible = true;
pause = true;
pausescreen.bt_continue.onRelease = function () {
pausescreen._visible = false;
pausescreen._alpha = 0;
pausescreen.cheat._visible = false;
pausescreen.cheat.display_cheat = "";
pause = false;
};
pausescreen.bt_restart.onRelease = function () {
hero_win = false;
hero_lose = false;
remove_stage();
load_level(this_level);
};
pausescreen.bt_menu.onRelease = function () {
remove_stage();
play_game("title");
if (!mute_sound) {
copper.stop();
}
if (!mute_music) {
bgm01.stop();
bgm02.stop();
title.start(0, 10000);
}
};
if (!mute_sound) {
pausescreen.bt_soundon._visible = false;
pausescreen.bt_soundoff._visible = true;
} else {
pausescreen.bt_soundon._visible = true;
pausescreen.bt_soundoff._visible = false;
}
if (!mute_music) {
pausescreen.bt_musicon._visible = false;
pausescreen.bt_musicoff._visible = true;
} else {
pausescreen.bt_musicon._visible = true;
pausescreen.bt_musicoff._visible = false;
}
pausescreen.bt_soundon.onRelease = function () {
pausescreen.bt_soundoff._visible = true;
pausescreen.bt_soundon._visible = false;
mute_sound = false;
if (boss_exist) {
copper.start(0, 10000);
}
};
pausescreen.bt_soundoff.onRelease = function () {
pausescreen.bt_soundoff._visible = false;
pausescreen.bt_soundon._visible = true;
mute_sound = true;
if (boss_exist) {
copper.stop();
}
};
pausescreen.bt_musicon.onRelease = function () {
pausescreen.bt_musicoff._visible = true;
pausescreen.bt_musicon._visible = false;
mute_music = false;
if (!boss_exist) {
if ((((((this_level == "LEVEL 1") || (this_level == "LEVEL 2")) || (this_level == "LEVEL 6")) || (this_level == "LEVEL 7")) || (this_level == "LEVEL 11")) || (this_level == "LEVEL 12")) {
bgm01.start(0, 100000);
} else {
bgm02.start(0, 10000);
}
}
};
pausescreen.bt_musicoff.onRelease = function () {
pausescreen.bt_musicoff._visible = false;
pausescreen.bt_musicon._visible = true;
mute_music = true;
if (!boss_exist) {
bgm01.stop();
bgm02.stop();
}
};
}
} else if (pausescreen._visible == true) {
if (pausescreen._alpha < 100) {
pausescreen._alpha = pausescreen._alpha + 5;
} else {
pausescreen._alpha = 100;
}
if (Key.isDown(13)) {
pausescreen._visible = false;
pausescreen._alpha = 0;
pausescreen.cheat._visible = false;
pausescreen.cheat.display_cheat = "";
pause = false;
}
if (Key.isDown(8)) {
pausescreen.cheat._visible = true;
}
load_cheat();
}
};
}
function load_cheat() {
if (pausescreen.cheat.display_cheat == "ilikethisgun") {
cheat_use = true;
weapona_type = "weapona4";
load_weapon("WeaponA");
}
if (pausescreen.cheat.display_cheat == "thisisgood") {
cheat_use = true;
weaponb_type = "weaponb4";
load_weapon("WeaponB");
}
if (pausescreen.cheat.display_cheat == "blitzgamer") {
cheat_use = true;
weaponc_type = "weaponc4";
load_weapon("WeaponC");
}
if (pausescreen.cheat.display_cheat == "youcantkill") {
cheat_use = true;
health_hit = 5;
}
if (pausescreen.cheat.display_cheat == "superguy") {
cheat_use = true;
health_total = 300;
health = 300;
}
if (pausescreen.cheat.display_cheat == "itsalive") {
cheat_use = true;
regen = 0.1;
}
if (pausescreen.cheat.display_cheat == "icanfly") {
cheat_use = true;
teleport_delaytime = 0.5;
}
if (pausescreen.cheat.display_cheat == "iwin") {
if (((this_level == "LEVEL 5") || (this_level == "LEVEL 10")) || (this_level == "LEVEL 15")) {
copper.stop();
}
cheat_use = true;
pausescreen._visible = false;
pausescreen.cheat._visible = false;
pausescreen.cheat.display_cheat = "";
player_win();
}
if (pausescreen.cheat.display_cheat == "easymoney") {
cheat_use = true;
money = 99999 /* 0x01869F */;
}
}
function create_infoscreen() {
infoscreen = attachMovie("mc_infoscreen", "infoscreen", getNextHighestDepth());
infoscreen._visible = false;
infoscreen._alpha = 0;
infoscreen.info._visible = true;
if (this_level == "LEVEL 1") {
infoscreen.info.gotoAndStop(1);
} else if (this_level == "LEVEL 2") {
infoscreen.info.gotoAndStop(2);
} else if (this_level == "LEVEL 3") {
infoscreen.info.gotoAndStop(3);
} else if (this_level == "LEVEL 4") {
infoscreen.info.gotoAndStop(4);
} else if (this_level == "LEVEL 5") {
infoscreen.info.gotoAndStop(5);
} else if (this_level == "LEVEL 10") {
infoscreen.info.gotoAndStop(5);
} else if (this_level == "LEVEL 15") {
infoscreen.info.gotoAndStop(5);
} else {
infoscreen.info.gotoAndStop(6 + random(7));
}
infoscreen.onEnterFrame = function () {
if (info_timer == 20) {
infoscreen._visible = true;
pause = true;
infoscreen.bt_start.onRelease = function () {
infoscreen._visible = false;
pause = false;
if (((this_level == "LEVEL 5") || (this_level == "LEVEL 10")) || (this_level == "LEVEL 15")) {
if (!mute_sound) {
copper.start(0, 10000);
}
}
};
}
if (infoscreen._visible == true) {
if (Key.isDown(13)) {
infoscreen._visible = false;
pause = false;
}
if (infoscreen._alpha < 100) {
infoscreen._alpha = infoscreen._alpha + 5;
} else {
infoscreen._alpha = 100;
}
}
};
}
function play_game(game_status) {
switch (game_status) {
case "title" :
attachMovie("mc_titlescreen", "titlescreen", 1);
attachMovie("mc_oldgrain-01", "oldgrain1", 2);
attachMovie("mc_oldgrain-02", "oldgrain2", 3);
titlescreen._alpha = 100;
titlescreen.onEnterFrame = function () {
total_score = 0;
titlescreen.bg._x = Math.random() + (stage_width / 2);
titlescreen.bg._y = Math.random() + (stage_height / 2);
titlescreen.bg._alpha = (Math.random() * 20) + 80;
};
titlescreen.bt_play.onRelease = function () {
play_game("instruction");
reset_parameter();
titlescreen.removeMovieClip();
};
titlescreen.bt_achievement.onRelease = function () {
play_game("achievement");
titlescreen.removeMovieClip();
};
titlescreen.bt_option.onRelease = function () {
play_game("option");
titlescreen.removeMovieClip();
};
titlescreen.bt_credit.onRelease = function () {
play_game("credit");
titlescreen.removeMovieClip();
};
titlescreen.bt_more.onRelease = function () {
getURL ("http://www.blitzgamer.com/?gameref=savethefallen", "_blank");
};
titlescreen.bt_add.onRelease = function () {
getURL ("http://www.blitzgamer.com/free_games.html", "_blank");
};
titlescreen.bt_hiscore.onRelease = function () {
getURL ("http://www.blitzgamer.com/sfallen_highscores.php", "_blank");
};
oldgrain1.onEnterFrame = function () {
oldgrain1._x = random(stage_width);
oldgrain1._y = random(stage_height);
oldgrain1._rotation = random(360);
oldgrain1._alpha = random(100);
oldgrain1._xscale = random(100);
oldgrain1._yscale = random(100);
};
oldgrain2.onEnterFrame = function () {
oldgrain2._x = random(stage_width);
oldgrain2._alpha = random(30);
};
break;
case "instruction" :
attachMovie("mc_instruction", "instruction", 1);
attachMovie("mc_oldgrain-01", "oldgrain1", 2);
attachMovie("mc_oldgrain-02", "oldgrain2", 3);
instruction._alpha = 0;
if (!mute_music) {
title.stop();
bgm01.start(0, 10000);
}
instruction.onEnterFrame = function () {
if (instruction._alpha < 100) {
instruction._alpha = instruction._alpha + 5;
} else {
instruction._alpha = 100;
}
};
instruction.bt_menu.onRelease = function () {
play_game("title");
instruction.removeMovieClip();
};
instruction.bt_start.onRelease = function () {
load_level("LEVEL 1");
instruction.removeMovieClip();
rampage = false;
};
instruction.bt_rampage.onRelease = function () {
load_level("LEVEL 1");
instruction.removeMovieClip();
rampage = true;
};
if (cookie.data.level_complete == undefined) {
instruction.bt_continue._visible = false;
} else {
instruction.bt_continue._visible = true;
}
instruction.bt_continue.onRelease = function () {
if (cookie.data.level_complete != undefined) {
save_parameter();
if (((cookie.data.level_complete == "LEVEL 6") || (cookie.data.level_complete == "LEVEL 11")) || (cookie.data.level_complete == "RAMPAGE")) {
bgm01.stop();
}
load_level(cookie.data.level_complete);
instruction.removeMovieClip();
}
};
oldgrain1.onEnterFrame = function () {
oldgrain1._x = random(stage_width);
oldgrain1._y = random(stage_height);
oldgrain1._rotation = random(360);
oldgrain1._alpha = random(100);
oldgrain1._xscale = random(100);
oldgrain1._yscale = random(100);
};
oldgrain2.onEnterFrame = function () {
oldgrain2._x = random(stage_width);
oldgrain2._alpha = random(30);
};
break;
case "achievement" :
attachMovie("mc_achievementscreen", "achievementscreen", 1);
attachMovie("mc_oldgrain-01", "oldgrain1", 2);
attachMovie("mc_oldgrain-02", "oldgrain2", 3);
achievementscreen._alpha = 0;
info_achievement();
achievementscreen.onEnterFrame = function () {
if (achievementscreen._alpha < 100) {
achievementscreen._alpha = achievementscreen._alpha + 5;
} else {
achievementscreen._alpha = 100;
}
};
achievementscreen.bt_menu.onRelease = function () {
play_game("title");
achievementscreen.removeMovieClip();
};
achievementscreen.bt_play.onRelease = function () {
play_game("instruction");
reset_parameter();
achievementscreen.removeMovieClip();
};
oldgrain1.onEnterFrame = function () {
oldgrain1._x = random(stage_width);
oldgrain1._y = random(stage_height);
oldgrain1._rotation = random(360);
oldgrain1._alpha = random(100);
oldgrain1._xscale = random(100);
oldgrain1._yscale = random(100);
};
oldgrain2.onEnterFrame = function () {
oldgrain2._x = random(stage_width);
oldgrain2._alpha = random(30);
};
break;
case "option" :
attachMovie("mc_optionscreen", "optionscreen", 1);
attachMovie("mc_oldgrain-01", "oldgrain1", 2);
attachMovie("mc_oldgrain-02", "oldgrain2", 3);
optionscreen._alpha = 0;
optionscreen.onEnterFrame = function () {
if (optionscreen._alpha < 100) {
optionscreen._alpha = optionscreen._alpha + 5;
} else {
optionscreen._alpha = 100;
}
};
optionscreen.bt_menu.onRelease = function () {
play_game("title");
optionscreen.removeMovieClip();
};
optionscreen.bt_play.onRelease = function () {
play_game("instruction");
reset_parameter();
optionscreen.removeMovieClip();
};
optionscreen.bt_soundon._visible = false;
optionscreen.bt_soundon.onRelease = function () {
optionscreen.bt_soundoff._visible = true;
optionscreen.bt_soundon._visible = false;
mute_sound = false;
};
optionscreen.bt_soundoff.onRelease = function () {
optionscreen.bt_soundoff._visible = false;
optionscreen.bt_soundon._visible = true;
mute_sound = true;
};
optionscreen.bt_musicon._visible = false;
optionscreen.bt_musicon.onRelease = function () {
optionscreen.bt_musicoff._visible = true;
optionscreen.bt_musicon._visible = false;
mute_music = false;
title.start(0, 10000);
};
optionscreen.bt_musicoff.onRelease = function () {
optionscreen.bt_musicoff._visible = false;
optionscreen.bt_musicon._visible = true;
mute_music = true;
title.stop();
};
oldgrain1.onEnterFrame = function () {
oldgrain1._x = random(stage_width);
oldgrain1._y = random(stage_height);
oldgrain1._rotation = random(360);
oldgrain1._alpha = random(100);
oldgrain1._xscale = random(100);
oldgrain1._yscale = random(100);
};
oldgrain2.onEnterFrame = function () {
oldgrain2._x = random(stage_width);
oldgrain2._alpha = random(30);
};
break;
case "credit" :
attachMovie("mc_creditscreen", "creditscreen", 1);
attachMovie("mc_oldgrain-01", "oldgrain1", 2);
attachMovie("mc_oldgrain-02", "oldgrain2", 3);
creditscreen._alpha = 0;
creditscreen.onEnterFrame = function () {
if (creditscreen._alpha < 100) {
creditscreen._alpha = creditscreen._alpha + 5;
} else {
creditscreen._alpha = 100;
}
};
creditscreen.bt_menu.onRelease = function () {
play_game("title");
getURL ("http://www.blitzgamer.com/save-the-fallen-cheats.html", "_blank");
creditscreen.removeMovieClip();
};
oldgrain1.onEnterFrame = function () {
oldgrain1._x = random(stage_width);
oldgrain1._y = random(stage_height);
oldgrain1._rotation = random(360);
oldgrain1._alpha = random(100);
oldgrain1._xscale = random(100);
oldgrain1._yscale = random(100);
};
oldgrain2.onEnterFrame = function () {
oldgrain2._x = random(stage_width);
oldgrain2._alpha = random(30);
};
}
}
function reset_parameter() {
weapona_type = "weapona0";
weaponb_type = "none";
weaponc_type = "none";
health_total = 100;
health = health_total;
health_hit = 20;
regen = 0;
teleport_delaytime = 0.1;
money = 0;
total_score = 0;
temp_total_score = 0;
destroy_bombs = 0;
cheat_use = false;
}
function save_parameter() {
weapona_type = cookie.data.weapona_type;
weaponb_type = cookie.data.weaponb_type;
weaponc_type = cookie.data.weaponc_type;
health_total = cookie.data.health_total;
health_hit = cookie.data.health_hit;
regen = cookie.data.regen;
teleport_delaytime = cookie.data.teleport_delaytime;
money = cookie.data.money;
cheat_use = cookie.data.cheat_use;
total_score = cookie.data.total_score;
rampage = cookie.data.rampage;
if (rampage) {
health = cookie.data.health;
} else {
health = health_total;
}
}
function load_achievement() {
daydie = cookie.data.daydie;
if (daydie == undefined) {
daydie = false;
} else {
daydie = cookie.data.daydie;
}
victory = cookie.data.victory;
if (victory == undefined) {
victory = false;
} else {
victory = cookie.data.victory;
}
shotthem = cookie.data.shotthem;
if (shotthem == undefined) {
shotthem = false;
} else {
shotthem = cookie.data.shotthem;
}
killthem = cookie.data.killthem;
if (killthem == undefined) {
killthem = false;
} else {
killthem = cookie.data.killthem;
}
killthisbadboy = cookie.data.killthisbadboy;
if (killthisbadboy == undefined) {
killthisbadboy = false;
} else {
killthisbadboy = cookie.data.killthisbadboy;
}
fastkill = cookie.data.fastkill;
if (fastkill == undefined) {
fastkill = false;
} else {
fastkill = cookie.data.fastkill;
}
superfastkill = cookie.data.superfastkill;
if (superfastkill == undefined) {
superfastkill = false;
} else {
superfastkill = cookie.data.superfastkill;
}
hyperfastkill = cookie.data.hyperfastkill;
if (hyperfastkill == undefined) {
hyperfastkill = false;
} else {
hyperfastkill = cookie.data.hyperfastkill;
}
rampages = cookie.data.rampages;
if (rampages == undefined) {
rampages = false;
} else {
rampages = cookie.data.rampages;
}
finallydone = cookie.data.finallydone;
if (finallydone == undefined) {
finallydone = false;
} else {
finallydone = cookie.data.finallydone;
}
}
function info_achievement() {
if (!daydie) {
achievementscreen.mc_achieve01._alpha = 0;
} else {
achievementscreen.mc_achieve01._alpha = 100;
}
if (!victory) {
achievementscreen.mc_achieve02._alpha = 0;
} else {
achievementscreen.mc_achieve02._alpha = 100;
}
if (!shotthem) {
achievementscreen.mc_achieve03._alpha = 0;
} else {
achievementscreen.mc_achieve03._alpha = 100;
}
if (!killthem) {
achievementscreen.mc_achieve04._alpha = 0;
} else {
achievementscreen.mc_achieve04._alpha = 100;
}
if (!killthisbadboy) {
achievementscreen.mc_achieve05._alpha = 0;
} else {
achievementscreen.mc_achieve05._alpha = 100;
}
if (!fastkill) {
achievementscreen.mc_achieve06._alpha = 0;
} else {
achievementscreen.mc_achieve06._alpha = 100;
}
if (!superfastkill) {
achievementscreen.mc_achieve07._alpha = 0;
} else {
achievementscreen.mc_achieve07._alpha = 100;
}
if (!hyperfastkill) {
achievementscreen.mc_achieve08._alpha = 0;
} else {
achievementscreen.mc_achieve08._alpha = 100;
}
if (!rampages) {
achievementscreen.mc_achieve09._alpha = 0;
} else {
achievementscreen.mc_achieve09._alpha = 100;
}
if (!finallydone) {
achievementscreen.mc_achieve10._alpha = 0;
} else {
achievementscreen.mc_achieve10._alpha = 100;
}
achievementscreen.mc_info.gotoAndStop(11);
achievementscreen.mc_achieve01.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(1);
};
achievementscreen.mc_achieve01.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve02.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(2);
};
achievementscreen.mc_achieve02.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve03.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(3);
};
achievementscreen.mc_achieve03.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve04.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(4);
};
achievementscreen.mc_achieve04.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve05.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(5);
};
achievementscreen.mc_achieve05.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve06.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(6);
};
achievementscreen.mc_achieve06.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve07.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(7);
};
achievementscreen.mc_achieve07.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve08.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(8);
};
achievementscreen.mc_achieve08.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve09.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(9);
};
achievementscreen.mc_achieve09.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
achievementscreen.mc_achieve10.onRollOver = function () {
achievementscreen.mc_info.gotoAndStop(10);
};
achievementscreen.mc_achieve10.onRollOut = function () {
achievementscreen.mc_info.gotoAndStop(11);
};
}
function make_sound(mc_name, depth, volume, name) {
var _local2 = sound_container.createEmptyMovieClip(mc_name, depth);
var _local1 = new Sound(_local2);
_local1.setVolume(volume);
_local1.attachSound(name);
return(_local1);
}
mouse_listener = new Object();
mouse_listener.onMouseDown = function () {
mouse_down = true;
};
mouse_listener.onMouseUp = function () {
mouse_down = false;
};
Mouse.addListener(mouse_listener);
current_status = "title";
play_game(current_status);
load_achievement();
var copper = make_sound("copper", 17, 100, "copper");
var explode01 = make_sound("explode01", 16, 100, "explode01");
var explode02 = make_sound("explode02", 15, 100, "explode02");
var explode03 = make_sound("explode03", 14, 100, "explode03");
var shoot01 = make_sound("shoot01", 13, 100, "shoot01");
var shoot02 = make_sound("shoot02", 12, 100, "shoot02");
var shoot03 = make_sound("shoot03", 11, 100, "shoot03");
var hit01 = make_sound("hit01", 10, 100, "hit01");
var teleport01 = make_sound("teleport01", 7, 100, "teleport01");
var title = make_sound("title", 2, 100, "title");
var bgm01 = make_sound("bgm01", 1, 100, "bgm01");
var bgm02 = make_sound("bgm02", 1, 100, "bgm02");
title.start(0, 10000);
Frame 10
onEnterFrame = function () {
remove_stage();
};
stop();
Frame 12
gotoAndStop ("game");
Symbol 156 Button
on (release) {
getURL ("http://www.blitzgamer.com", "_blank");
}
Symbol 195 MovieClip Frame 6
stop();
Symbol 203 Button
on (release) {
getURL ("http://www.blitzgamer.com", "_blank");
}
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 20
stop();
Symbol 266 MovieClip Frame 1
this._visible = false;
_parent.stop();
Symbol 266 MovieClip Frame 2
this._visible = true;
Symbol 266 MovieClip Frame 52
Symbol 266 MovieClip Frame 131
tank.play();
Symbol 266 MovieClip Frame 162
_parent.gotoAndStop("game");
Symbol 266 MovieClip Frame 174
stop();
_parent.play();
Symbol 580 MovieClip Frame 45
stop();
Symbol 581 MovieClip Frame 1
stop();
Symbol 583 MovieClip Frame 1
stop();
Symbol 585 MovieClip Frame 1
stop();
Symbol 674 MovieClip Frame 12
stop();
Symbol 675 MovieClip Frame 12
stop();
Symbol 708 MovieClip Frame 32
stop();
Symbol 744 MovieClip Frame 12
stop();
Symbol 748 MovieClip Frame 1
stop();
Symbol 751 MovieClip Frame 1
stop();
Symbol 754 MovieClip Frame 1
stop();