Frame 1
function zn(a) {
if (isNaN(a) || (undefined == a)) {
return(0);
}
return(a);
}
function firtim() {
totalseconds = totalseconds + 1;
waitfor = Math.round((totalseconds / (_root.getBytesLoaded() + (((((zn(main_music1.getBytesLoaded()) + zn(main_music2.getBytesLoaded())) + zn(main_music3.getBytesLoaded())) + zn(main_music4.getBytesLoaded())) + zn(main_music5.getBytesLoaded())) + zn(main_music.getBytesLoaded())))) * ((_root.getBytesTotal() + (((((zn(main_music1.getBytesTotal()) + zn(main_music2.getBytesTotal())) + zn(main_music3.getBytesTotal())) + zn(main_music4.getBytesTotal())) + zn(main_music5.getBytesTotal())) + zn(main_music.getBytesTotal()))) - (_root.getBytesLoaded() + (((((zn(main_music1.getBytesLoaded()) + zn(main_music2.getBytesLoaded())) + zn(main_music3.getBytesLoaded())) + zn(main_music4.getBytesLoaded())) + zn(main_music5.getBytesLoaded())) + zn(main_music.getBytesLoaded())))));
if (waitfor < 60) {
_root.loa2.htmlText = waitfor + " seconds";
} else if ((waitfor / 60) < 60) {
_root.loa2.htmlText = ((Math.floor(waitfor / 60) + " minutes ") + (waitfor - (Math.floor(waitfor / 60) * 60))) + " seconds";
}
}
_lockroot = true;
_root.fg2._alpha = 0;
_root.gotoAndStop(1);
var my_so = SharedObject.getLocal("dead_drunk_14");
if (_root.my_so.data.snd == undefined) {
_root.my_so.data.snd = 1;
}
_root.kongregateServices.connect();
lasts = 0;
times = 0;
someListener = new Object();
Mouse.addListener(someListener);
totalseconds = 0;
fir = setInterval(firtim, 1000);
_root.onEnterFrame = function () {
cur = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (cur != lasts) {
times = 10;
} else {
times = times - 1;
}
if (times > 0) {
_root.loa.htmlText = ("<font color=\"#AAAAAA\"><B>.:</B></font> " + cur) + " <font color=\"#AAAAAA\"><B>:.</B></font>";
} else if (times > -5) {
_root.loa.htmlText = ("<font color=\"#CCCCCC\"><B>.:</B></font> " + cur) + " <font color=\"#CCCCCC\"><B>:.</B></font>";
} else if (times > -40) {
_root.loa.htmlText = ("<B>.:</B> " + cur) + " <B>:.</B>";
} else {
_root.loa.htmlText = ("<font color=\"#FF0000\"><B>.:</B></font> " + cur) + " <font color=\"#FF0000\"><B>:.</B></font>";
}
lasts = cur;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
clearInterval(fir);
_root.fg2._alpha = _root.fg2._alpha + 2;
if (_root.fg2._alpha > 100) {
_root.gotoAndStop(2);
}
}
};
Frame 2
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
_root.gotoAndStop(1);
}
_root.stop();
gaction = 0;
_root.muz.onRelease = function () {
if (_root.muz._currentframe == 3) {
_root.muz.gotoAndStop(2);
} else {
_root.muz.gotoAndStop(3);
}
};
_root.onEnterFrame = function () {
if (gaction == 0) {
if (_root.fg2._alpha > 0) {
_root.fg2._alpha = _root.fg2._alpha - 2;
_root.fg2._visible = true;
} else {
_root.fg2._visible = false;
gaction = -1;
}
}
if (gaction == 1) {
if (_root.fg2._alpha < 100) {
_root.fg2._alpha = _root.fg2._alpha + 2;
_root.fg2._visible = true;
} else {
_root.gotoAndStop(3);
gaction = -1;
}
}
_root.start.onRelease = function () {
gaction = 1;
};
_root.start2.onRelease = function () {
_root.my_so.clear();
gaction = 1;
};
_root.loa.text = ("Loading: " + Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100)) + "%";
};
Frame 3
_root.stop();
_root.onEnterFrame = function () {
};
_root.mmm.start.onRelease = function () {
if (_root.mmm._currentframe < 280) {
_root.mmm.gotoAndPlay(280);
}
};
Frame 4
function LinkMcTo(mc, ch, pan, flip, scale) {
mcto_mc[mcto_tot] = mc;
mcto_ch[mcto_tot] = ch;
mcto_an[mcto_tot] = pan;
mcto_filp[mcto_tot] = flip;
mcto_scale[mcto_tot] = scale;
mcto_tot++;
}
function Dist2D(p1x, p1y, p2x, p2y) {
return(Math.sqrt(Math.pow(p1x - p2x, 2) + Math.pow(p1y - p2y, 2)));
}
function Effect(x, y, type, param1, param2) {
if (type == 0) {
duplicateMovieClip (_root.game.blood, "bl" + eff, 100 + eff);
}
if (type == 1) {
duplicateMovieClip (_root.game.drop, "bl" + eff, 100 + eff);
}
_root.game["bl" + eff]._x = x;
_root.game["bl" + eff]._y = y;
if (type == 0) {
_root.game["bl" + eff]._rotation = param1;
_root.game["bl" + eff]._xscale = 100 + (param2 * 10);
}
if (type == 1) {
_root.game["bl" + eff].power = param1;
}
eff++;
if (eff > 128) {
eff = 0;
}
}
function Draw() {
_root.game.player._x = 0;
_root.game.player._y = 0;
i = 0;
while (i < mcto_tot) {
if ((aio[chP[mcto_ch[i]]] == true) || (aio[chC[mcto_ch[i]]] == true)) {
mcto_mc[i]._xscale = Math.abs(mcto_mc[i]._xscale) * mcto_filp[i];
mcto_mc[i]._x = ax[chP[mcto_ch[i]]];
mcto_mc[i]._y = ay[chP[mcto_ch[i]]];
an = mcto_an[i] - ((Math.atan2(ax[chP[mcto_ch[i]]] - ax[chC[mcto_ch[i]]], ay[chP[mcto_ch[i]]] - ay[chC[mcto_ch[i]]]) / Math.PI) * 180);
mcto_mc[i]._rotation = an;
if (mcto_scale[i]) {
mcto_mc[i]._yscale = Dist2D(ax[chP[mcto_ch[i]]], ay[chP[mcto_ch[i]]], ax[chC[mcto_ch[i]]], ay[chC[mcto_ch[i]]]);
}
}
i++;
}
}
function CreatePoint(x, y, sx, sy, rad) {
ax[atotal] = x;
ay[atotal] = y;
atox[atotal] = sx;
atoy[atotal] = sy;
aio[atotal] = true;
if (rad != undefined) {
arad[atotal] = rad;
} else {
arad[atotal] = 0;
}
atotal++;
return(atotal - 1);
}
function Connect(a, a2, type, di, power) {
chP[chtotal] = a;
chC[chtotal] = a2;
if (di != undefined) {
chdef[chtotal] = di;
} else {
chdef[chtotal] = Dist2D(ax[a], ay[a], ax[a2], ay[a2]);
}
if (power == undefined) {
chdamp[chtotal] = 0.1;
} else {
chdamp[chtotal] = power * 0.1;
}
chtypa[chtotal] = type;
chio[chtotal] = true;
chtotal++;
return(chtotal - 1);
}
function RQ_Prepare() {
_root.lastreq = _root.score_server;
_root.tasks = 0;
}
function RQ_Set(a, b) {
_root.lastreq = _root.lastreq + (((((((((("op" + _root.tasks) + "=set&var") + _root.tasks) + "=") + a) + "&val") + _root.tasks) + "=") + b) + "&");
_root.tasks++;
}
function RQ_Get(a, b) {
_root.lastreq = _root.lastreq + (((((((((("op" + _root.tasks) + "=get&var") + _root.tasks) + "=") + a) + "&val") + _root.tasks) + "=") + b) + "&");
_root.tasks++;
}
function RQ_Send(a) {
_root.lastreq = _root.lastreq + ("tot=" + _root.tasks);
callafter = a;
}
_root._quality = "MEDIUM";
ax = new Array();
ay = new Array();
atox = new Array();
atoy = new Array();
aio = new Array();
aof = new Array();
arad = new Array();
if (_root.my_so.data.lsteps != undefined) {
steps = _root.my_so.data.lsteps;
} else {
steps = 2;
}
_root.totaldrunk = 0;
gravity = 0.03;
bounce = 0.5;
friction = 0.6;
trytim = 0;
chtypa = new Array();
chP = new Array();
chC = new Array();
chdef = new Array();
chdamp = new Array();
chio = new Array();
chtsilp = new Array();
atotal = 0;
chtotal = 0;
antotal = 0;
mcto_tot = 0;
mcto_ch = new Array();
mcto_mc = new Array();
mcto_an = new Array();
mcto_scale = new Array();
mcto_filp = new Array();
_root.game.blood._visible = false;
_root.game.drop._visible = false;
_root.game.finzone._visible = false;
eff = 0;
_root.rise.onRelease = function () {
gaction = 1;
};
_root.rise2.onRelease = function () {
gaction = 2;
};
_root.speeds1.onRelease = function () {
steps = 1;
_root.my_so.data.lsteps = 1;
};
_root.speeds2.onRelease = function () {
steps = 2;
_root.my_so.data.lsteps = 2;
};
_root.speeds3.onRelease = function () {
steps = 3;
_root.my_so.data.lsteps = 3;
};
_root.speeds4.onRelease = function () {
steps = 4;
_root.my_so.data.lsteps = 4;
};
_root.game.colmap.lift.gotoAndPlay(140);
_root.game.killzone._visible = false;
hea = 100;
_root.game.spawn._visible = false;
smx = _root.game.spawn._x;
smy = _root.game.spawn._y;
if ((_root.my_so.data.hea != undefined) && (!isNaN(_root.my_so.data.hea))) {
_root.hea = _root.my_so.data.hea;
smx = _root.my_so.data.x;
smy = _root.my_so.data.y;
_root.totaldrunk = _root.my_so.data.totaldrunk;
i = 0;
while (i < 100) {
trace(_root.my_so.data["m" + i]);
if (_root.my_so.data["m" + i]) {
_root.game["med" + i].gotoAndStop(1);
} else {
_root.game["med" + i].isnue = false;
_root.game["med" + i].gotoAndStop(4);
}
i++;
}
}
CreatePoint(smx, smy, 0, 0);
CreatePoint(smx - 2, smy + 7, 0, 0);
CreatePoint(smx + 2, smy + 7, 0, 0);
CreatePoint(smx - 4, smy + 12, 0, 0);
CreatePoint(smx + 4, smy + 12, 0, 0);
CreatePoint(smx, smy - 5, 0, 0);
CreatePoint(smx, smy - 10, 0, 0);
CreatePoint(smx - 5, smy - 5, 0, 0);
CreatePoint(smx + 5, smy - 5, 0, 0);
CreatePoint(smx - 10, smy - 5, 0, 0);
CreatePoint(smx + 10, smy - 5, 0, 0);
leg1 = Connect(0, 1, 0);
leg2 = Connect(0, 2, 0);
subleg1 = Connect(1, 3, 0);
subleg2 = Connect(2, 4, 0);
spine1 = Connect(0, 5, 0);
spine2 = Connect(6, 5, 0);
arm1 = Connect(5, 7, 0);
arm2 = Connect(5, 8, 0);
subarm1 = Connect(7, 9, 0);
subarm2 = Connect(8, 10, 0);
allleg1 = Connect(0, 4, 1, undefined, 0.5);
allleg2 = Connect(0, 3, 1, undefined, 0.5);
legs = chdef[allleg1];
curlegs = legs;
Connect(0, 6, 1, undefined, 1);
Connect(1, 2, 1, 2, 2);
Connect(1, 2, 2, 10, 1);
Connect(3, 4, 2, 10, 1);
Connect(1, 5, 1, 10, 1);
Connect(2, 5, 1, 10, 1);
Connect(7, 8, 1, 5, 1);
LinkMcTo(_root.game.player.leg1, leg1, 180, 1, true);
LinkMcTo(_root.game.player.leg2, leg2, 180, 1, true);
LinkMcTo(_root.game.player.arm1, arm1, 180, 1, true);
LinkMcTo(_root.game.player.arm2, arm2, 180, 1, true);
LinkMcTo(_root.game.player.subleg1, subleg1, 180, 1, true);
LinkMcTo(_root.game.player.subleg2, subleg2, 180, 1, true);
LinkMcTo(_root.game.player.subarm1, subarm1, 180, 1, true);
LinkMcTo(_root.game.player.subarm2, subarm2, 180, 1, true);
LinkMcTo(_root.game.player.spine1, spine1, 180, 1, true);
LinkMcTo(_root.game.player.spine2, spine2, 180, 1, true);
LinkMcTo(_root.game.player.head, spine2, 0, 1);
hscreenX = 200;
hscreenY = 100;
gaction = 0;
_root.game._x = Math.round((-ax[0]) + hscreenX);
_root.game._y = Math.round((-ay[0]) + hscreenY);
datasend = 0;
_root.score_server = "http://www.gevanni.com/projects/net_api/index.php?";
var my_xml2 = new XML();
System.useCodepage = true;
my_xml2.ignoreWhite = true;
_root.busy = false;
_root.lastreq = "";
_root.tasks = 0;
callafter = function () {
};
my_xml2.onLoad = function (success) {
if (success) {
i = 0;
while (i < my_xml2.childNodes.length) {
if (my_xml2.childNodes[i].nodeName == "getset") {
Set(my_xml2.childNodes[i].attributes.varr, my_xml2.childNodes[i].attributes.val);
}
i++;
}
callafter.call();
} else {
my_xml2.load(_root.lastreq);
}
};
RQ_Prepare();
RQ_Get("totalplayers", "_root.myid");
RQ_Send(function () {
RQ_Prepare();
RQ_Set("totalplayers", Math.floor(_root.myid) + 1);
RQ_Send(function () {
});
});
_root.onEnterFrame = function () {
datasend = datasend + 1;
if ((myid != undefined) && (!isNaN(myid))) {
if (datasend > 30) {
datasend = 0;
RQ_Prepare();
i = 0;
while (i < 11) {
RQ_Set((myid + "_p_ax") + i, Math.round(ax[i]));
RQ_Set((myid + "_p_ay") + i, Math.round(ay[i]));
if ((i < 5) || (i == 6)) {
RQ_Set((myid + "_p_atox") + i, Math.round(atox[i] * 100) / 100);
RQ_Set((myid + "_p_atoy") + i, Math.round(atoy[i] * 100) / 100);
}
i++;
}
_root.console.text = _root.console.text + "[";
_root.console.text = _root.console.text + "]";
RQ_Send();
}
}
if (gaction == -1) {
if (Key.isDown(13)) {
gaction = 2;
}
}
if (gaction == 0) {
if (_root.fg._alpha > 0) {
_root.fg._alpha = _root.fg._alpha - 2;
_root.fg._visible = true;
} else {
_root.fg._visible = false;
gaction = -1;
}
}
if (gaction == 2) {
if (_root.fg._alpha < 100) {
_root.fg._alpha = _root.fg._alpha + 2;
_root.fg._visible = true;
} else {
_root.gotoAndStop(2);
_root.gotoAndStop(4);
gaction = -1;
}
}
if (gaction == 1) {
if (_root.fg._alpha < 100) {
_root.fg._alpha = _root.fg._alpha + 2;
_root.fg._visible = true;
} else {
_root.gotoAndStop(2);
gaction = -1;
}
}
if (gaction == 3) {
if (_root.fg._alpha < 100) {
_root.fg._alpha = _root.fg._alpha + 2;
_root.fg._visible = true;
} else {
_root.totaldrunk = _root.totaldrunk + 1000;
_root.kongregateScores.submit(_root.totaldrunk);
_root.gotoAndStop(5);
gaction = -1;
}
}
if (hea > 0) {
_root.thea.text = Math.ceil(hea) + " HP";
} else if (hea > -100) {
_root.thea.text = "Unconscious";
} else {
_root.thea.text = "Dead";
gaction = 2;
}
_root.game._x = Math.round((((-ax[0]) + hscreenX) + (_root.game._x * 10)) / 11);
_root.game._y = Math.round((((-ay[0]) + hscreenY) + (_root.game._y * 10)) / 11);
iter = 0;
while (iter < steps) {
stand = false;
if (_root.game.colmap.hitTest(_root.game._x + ax[3], (_root.game._y + ay[3]) + 2, true) || (_root.game.colmap.hitTest(_root.game._x + ax[4], (_root.game._y + ay[4]) + 2, true))) {
stand = true;
}
if (atox[0] > 1) {
stand = false;
}
if (trytim >= 20) {
trytim++;
if (trytim > 30) {
trytim = 0;
}
}
if ((hea > 0) && (stand)) {
if ((Math.abs(((ax[3] + ax[4]) / 2) - ax[0]) > 3) && (trytim < 20)) {
if (Math.abs(((ax[3] + ax[4]) / 2) - ax[0]) > 6) {
stand = false;
}
if (!stand) {
trytim++;
}
if (ax[0] < ((ax[3] + ax[4]) / 2)) {
side = -1;
} else {
side = 1;
}
koncur = 3;
sybdister = 2;
dister = 4;
if (Math.abs(ax[0] - ax[3]) > Math.abs(ax[0] - ax[4])) {
koncur = 4;
dister = 3;
sybdister = 1;
}
atox[dister] = atox[dister] + (side * 0.5);
atox[sybdister] = atox[sybdister] - (side * 0.5);
atoy[6] = atoy[6] - 0.2;
atoy[5] = atoy[5] - 0.2;
atoy[0] = atoy[0] + 0.2;
if (ay[0] > ay[5]) {
atox[0] = atox[0] - ((ax[0] - ax[5]) * 0.2);
atox[5] = atox[5] + ((ax[0] - ax[5]) * 0.2);
}
if (ay[dister] > (ay[koncur] - 2)) {
astoy[dister] = astoy[dister] - 0.2;
astoy[sybdister] = astoy[sybdister] + 0.2;
} else {
astoy[dister] = astoy[dister] + 0.2;
astoy[sybdister] = astoy[sybdister] - 0.2;
}
}
}
if (hea > 0) {
if (Key.isDown(40)) {
curlegs = legs / 4;
} else {
curlegs = legs;
}
} else {
curlegs = legs;
}
chdef[allleg1] = curlegs;
chdef[allleg2] = curlegs;
if (ay[0] > ay[5]) {
if (hea > 0) {
if (stand) {
atox[0] = atox[0] - ((ax[0] - ax[5]) * 0.3);
atox[5] = atox[5] + ((ax[0] - ax[5]) * 0.3);
atoy[3] = atoy[3] + 0.2;
atoy[4] = atoy[4] + 0.2;
atoy[1] = atoy[1] - 0.15;
atoy[2] = atoy[2] - 0.15;
atoy[0] = atoy[0] - 0.1;
if (Key.isDown(39)) {
atox[5] = atox[5] + 0.1;
atoy[0] = atoy[0] - 0.1;
}
if (Key.isDown(37)) {
atox[5] = atox[5] - 0.1;
atoy[0] = atoy[0] - 0.1;
}
if (Key.isDown(32)) {
if (lpressed) {
atoy[0] = atoy[0] - 4;
atoy[6] = atoy[6] - 4;
atoy[5] = atoy[5] - 4;
lpressed = false;
}
} else {
lpressed = true;
}
} else {
spx = 0;
spy = 0;
if (Key.isDown(38)) {
spy = -1;
}
if (Key.isDown(40)) {
spy = 1;
}
if (Key.isDown(37)) {
spx = -1;
}
if (Key.isDown(39)) {
spx = 1;
}
atox[0] = atox[0] - (spx * 0.1);
atoy[0] = atoy[0] - (spy * 0.1);
atox[5] = atox[5] + (spx * 0.1);
atoy[5] = atoy[5] + (spy * 0.1);
}
}
}
if ((hea <= 0) && (hea > -100)) {
if (Math.random() > 0.95) {
atoy[5] = atoy[5] - 1;
}
}
a = 0;
while (a < atotal) {
if (aio[a] == true) {
ax[a] = ax[a] + atox[a];
ay[a] = ay[a] + atoy[a];
if (_root.game.killzone.hitTest(_root.game._x + ax[a], _root.game._y + ay[a], true)) {
hea = -200;
}
if (_root.game.finzone.hitTest(_root.game._x + ax[a], _root.game._y + ay[a], true)) {
hea = 100;
gaction = 3;
}
di = Dist2D(atox[a], atoy[a], 0, 0);
if (di > collision_tolerance) {
atox[a] = atox[a] / (di * collision_tolerance);
atoy[a] = atoy[a] / (di * collision_tolerance);
}
if (di > 30) {
atox[a] = (atox[a] / di) * 30;
atoy[a] = (atoy[a] / di) * 30;
}
atoy[a] = atoy[a] + gravity;
if (arad[a] > 0) {
arad[a] = 0;
}
if (_root.game.colmap.hitTest(_root.game._x + ax[a], _root.game._y + ay[a], true)) {
dd = 5;
acy = 0;
acx = 0;
x = -1;
while (x <= 1) {
y = -1;
while (y <= 1) {
if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) + (Math.abs(atox[a]) * x), (_root.game._y + ay[a]) + (Math.abs(atoy[a]) * y), true)) {
acx = acx + x;
acy = acy + y;
}
y = y + 1;
}
x = x + 1;
}
speed = 0.05;
nostop = 0.75;
lasttox = atox[a];
lasttoy = atoy[a];
d = 0.05;
while (d < 10) {
if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) + d, _root.game._y + ay[a], true)) {
atox[a] = atox[a] + (d / nostop);
ax[a] = ax[a] + (d * nostop);
d = 10;
normx = 1;
normy = 0;
} else if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) - d, _root.game._y + ay[a], true)) {
atox[a] = atox[a] - (d / nostop);
ax[a] = ax[a] - (d * nostop);
d = 10;
normx = -1;
normy = 0;
} else if (!_root.game.colmap.hitTest(_root.game._x + ax[a], (_root.game._y + ay[a]) + d, true)) {
atoy[a] = atoy[a] + (d / nostop);
ay[a] = ay[a] + (d * nostop);
d = 10;
normx = 0;
normy = 1;
} else if (!_root.game.colmap.hitTest(_root.game._x + ax[a], (_root.game._y + ay[a]) - d, true)) {
atoy[a] = atoy[a] - (d / nostop);
ay[a] = ay[a] - (d * nostop);
d = 10;
normx = 0;
normy = -1;
} else if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) + d, (_root.game._y + ay[a]) + d, true)) {
atox[a] = atox[a] + (d / nostop);
atoy[a] = atoy[a] + (d / nostop);
ax[a] = ax[a] + (d * nostop);
ay[a] = ay[a] + (d * nostop);
d = 10;
normx = 1;
normy = 1;
} else if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) - d, (_root.game._y + ay[a]) + d, true)) {
atox[a] = atox[a] - (d / nostop);
atoy[a] = atoy[a] + (d / nostop);
ax[a] = ax[a] - (d * nostop);
ay[a] = ay[a] + (d * nostop);
d = 10;
normx = -1;
normy = 1;
} else if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) + d, (_root.game._y + ay[a]) - d, true)) {
atox[a] = atox[a] + (d / nostop);
atoy[a] = atoy[a] - (d / nostop);
ax[a] = ax[a] + (d * nostop);
ay[a] = ay[a] - (d * nostop);
d = 10;
normx = 1;
normy = -1;
} else if (!_root.game.colmap.hitTest((_root.game._x + ax[a]) - d, (_root.game._y + ay[a]) - d, true)) {
atox[a] = atox[a] - (d / nostop);
atoy[a] = atoy[a] - (d / nostop);
ax[a] = ax[a] - (d * nostop);
ay[a] = ay[a] - (d * nostop);
d = 10;
normx = -1;
normy = -1;
}
d = d + speed;
}
if (a < 11) {
mnoj = 1;
if ((a == 3) || (a == 4)) {
mnoj = 0.4;
}
if (a == 6) {
mnoj = 5;
}
lhea = hea;
if (Math.abs(normx) > Math.abs(normy)) {
hea = hea - (Math.floor(((Math.abs(lasttox) * 0.6) * mnoj) * nostop) * 10);
} else {
hea = hea - (Math.floor(((Math.abs(lasttoy) * 0.6) * mnoj) * nostop) * 10);
}
if ((lhea - hea) < mnoj) {
hea = lhea;
}
if (Math.abs(normx) > Math.abs(normy)) {
pwr = Math.abs(lasttox);
} else {
pwr = Math.abs(lasttoy);
}
if (pwr > 2) {
if (Math.random() > 0.5) {
_root.sou.gotoAndStop(2);
} else {
_root.sou.gotoAndStop(3);
}
} else if (pwr > 1.2) {
if (Math.random() > 0.5) {
_root.sou.gotoAndStop(4);
} else {
_root.sou.gotoAndStop(5);
}
} else if ((pwr > 1.1) || (lhea > hea)) {
_root.sou.gotoAndStop(6);
}
if (lhea > hea) {
if (Math.abs(normx) > Math.abs(normy)) {
Effect(ax[a], ay[a], 0, 90, lhea - hea);
} else {
Effect(ax[a], ay[a], 0, 0, lhea - hea);
}
}
}
if (Math.abs(normx) > Math.abs(normy)) {
atox[a] = atox[a] * 0.75;
if (atoy[a] > 0) {
atoy[a] = Math.max(atoy[a] - (friction * Math.abs(atox[a])), 0);
} else {
atoy[a] = Math.min(atoy[a] + (friction * Math.abs(atox[a])), 0);
}
} else if (Math.abs(normx) < Math.abs(normy)) {
if (atox[a] > 0) {
atox[a] = Math.max(atox[a] - (friction * Math.abs(atoy[a])), 0);
} else {
atox[a] = Math.min(atox[a] + (friction * Math.abs(atoy[a])), 0);
}
atoy[a] = atoy[a] * 0.75;
}
}
}
a++;
}
ch = 0;
while (ch < chtotal) {
if ((aio[chP[ch]] == false) && (aio[chC[ch]] == false)) {
chio[ch] = false;
} else {
chio[ch] = true;
}
if (chio[ch] == true) {
if ((((Math.abs(atox[chP[ch]]) + Math.abs(atoy[chP[ch]])) + Math.abs(atox[chC[ch]])) + Math.abs(atoy[chC[ch]])) < (1.4 + (gravity * 1.5))) {
chtsilp[ch] = chtsilp[ch] + 1;
if (chtsilp[ch] > 6) {
}
}
dis = Dist2D(ax[chP[ch]], ay[chP[ch]], ax[chC[ch]], ay[chC[ch]]);
bounce = 5 * chdamp[ch];
bnc = bounce * Math.abs(dis - chdef[ch]);
if (dis < 1) {
dis = 1;
}
if (chtypa[ch] == 3) {
if ((dis > (chdef[ch] + 5)) || (dis < (chdef[ch] - 5))) {
chtypa[ch] = 1;
chdef[ch] = 0;
}
}
if (chtypa[ch] == 4) {
if ((dis > (chdef[ch] + 7)) || (dis < (chdef[ch] - 7))) {
chtypa[ch] = 1;
chdef[ch] = 0;
}
}
if ((dis > chdef[ch]) && ((((chtypa[ch] == 0) || (chtypa[ch] == 3)) || (chtypa[ch] == 4)) || (chtypa[ch] == 2))) {
atox[chC[ch]] = atox[chC[ch]] + (((ax[chP[ch]] - ax[chC[ch]]) / dis) * bnc);
atoy[chC[ch]] = atoy[chC[ch]] + (((ay[chP[ch]] - ay[chC[ch]]) / dis) * bnc);
atox[chP[ch]] = atox[chP[ch]] - (((ax[chP[ch]] - ax[chC[ch]]) / dis) * bnc);
atoy[chP[ch]] = atoy[chP[ch]] - (((ay[chP[ch]] - ay[chC[ch]]) / dis) * bnc);
}
if ((dis < chdef[ch]) && ((((chtypa[ch] == 0) || (chtypa[ch] == 3)) || (chtypa[ch] == 4)) || (chtypa[ch] == 1))) {
atox[chC[ch]] = atox[chC[ch]] - (((ax[chP[ch]] - ax[chC[ch]]) / dis) * bnc);
atoy[chC[ch]] = atoy[chC[ch]] - (((ay[chP[ch]] - ay[chC[ch]]) / dis) * bnc);
atox[chP[ch]] = atox[chP[ch]] + (((ax[chP[ch]] - ax[chC[ch]]) / dis) * bnc);
atoy[chP[ch]] = atoy[chP[ch]] + (((ay[chP[ch]] - ay[chC[ch]]) / dis) * bnc);
}
if ((((chtypa[ch] == 0) || (chtypa[ch] == 3)) || (chtypa[ch] == 4)) && (chdamp[ch] >= 0.1)) {
tarx = (ax[chP[ch]] + ax[chC[ch]]) / 2;
tary = (ay[chP[ch]] + ay[chC[ch]]) / 2;
ax[chP[ch]] = tarx + (((ax[chP[ch]] - tarx) * chdef[ch]) / dis);
ay[chP[ch]] = tary + (((ay[chP[ch]] - tary) * chdef[ch]) / dis);
ax[chC[ch]] = tarx + (((ax[chC[ch]] - tarx) * chdef[ch]) / dis);
ay[chC[ch]] = tary + (((ay[chC[ch]] - tary) * chdef[ch]) / dis);
}
}
ch++;
}
iter++;
}
Draw();
};
Frame 5
gaction = 0;
_root.rise.onRelease = function () {
gaction = 1;
};
_root.onEnterFrame = function () {
if (gaction == 0) {
if (_root.fg2._alpha > 0) {
_root.fg2._alpha = _root.fg2._alpha - 2;
_root.fg2._visible = true;
} else {
_root.fg2._visible = false;
gaction = -1;
}
}
if (gaction == 1) {
if (_root.fg2._alpha < 100) {
_root.fg2._alpha = _root.fg2._alpha + 2;
_root.fg2._visible = true;
} else {
_root.gotoAndStop(2);
gaction = -1;
}
}
};
Symbol 23 MovieClip Frame 1
this.stop();
if (_root.my_so.data.snd == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
Symbol 23 MovieClip Frame 2
_root.my_so.data.snd = 1;
Symbol 23 MovieClip Frame 3
_root.my_so.data.snd = 2;
Symbol 33 MovieClip Frame 310
_root.gotoAndStop(4);
Symbol 50 MovieClip Frame 1
this.gotoAndStop(1);
this.frm = 1;
this.onEnterFrame = function () {
this.frm = this.frm + (_root.steps / 2);
this.gotoAndStop(Math.round(this.frm));
};
Symbol 50 MovieClip Frame 633
this.frm = 1;
Symbol 62 MovieClip Frame 1
if ((this + "") != "_level0.game.blood") {
_root.Effect(this._x, this._y, 1, this._xscale);
_root.Effect(this._x, this._y, 1, this._xscale);
_root.Effect(this._x, this._y, 1, this._xscale);
_root.Effect(this._x, this._y, 1, this._xscale);
_root.Effect(this._x, this._y, 1, this._xscale);
this.onEnterFrame = function () {
if (!_root.game.colmap.hitTest(this._x + _root.game._x, this._y + _root.game._y, true)) {
this.gotoAndStop(41);
}
};
} else {
this.stop();
}
Symbol 62 MovieClip Frame 40
this.stop();
Symbol 62 MovieClip Frame 41
this.stop();
this.onEnterFrame = function () {
};
Symbol 67 MovieClip Frame 1
this.stop();
this.picked = false;
this.bstate = 0;
this.power = 0;
this.vikid = false;
this.isnue = true;
this.onEnterFrame = function () {
if (!picked) {
if (((_root.Dist2D(_root.ax[0], _root.ay[0], this._x, this._y) < 15) && (_root.hea > 0)) || (((_root.Dist2D(_root.ax[0], _root.ay[0], this._x, this._y) < 20) && (_root.hea <= 0)) && (_root.hea > -100))) {
if ((_root.Dist2D(_root.ax[9], _root.ay[9], this._x, this._y) < 3) || (_root.Dist2D(_root.ax[10], _root.ay[10], this._x, this._y) < 3)) {
this.picked = true;
this.isnue = false;
_root.totaldrunk++;
_root.kongregateScores.submit(_root.totaldrunk);
} else {
this.nearer = 9;
if (_root.Dist2D(_root.ax[10], _root.ay[10], this._x, this._y) < _root.Dist2D(_root.ax[9], _root.ay[9], this._x, this._y)) {
this.nearer = 10;
}
this.power = 2;
dis = _root.Dist2D(_root.ax[this.nearer], _root.ay[this.nearer], this._x, this._y);
if (dis < 1) {
dis = 1;
}
if (_root.hea > -100) {
_root.atox[this.nearer] = _root.atox[this.nearer] + (((((this._x - _root.ax[this.nearer]) / dis) * this.power) * _root.steps) / 2);
_root.atoy[this.nearer] = _root.atoy[this.nearer] + (((((this._y - _root.ay[this.nearer]) / dis) * this.power) * _root.steps) / 2);
}
}
}
} else {
this.lx = this._x;
this.ly = this._y;
this.lr = this._rotation;
this.bstate = this.bstate + (_root.steps / 2);
if (!this.vikid) {
this._x = _root.ax[this.nearer] + (_root.atox[this.nearer] * _root.steps);
this._y = _root.ay[this.nearer] + (_root.atoy[this.nearer] * _root.steps);
this._rotation = (((-Math.atan2(_root.ax[this.nearer] - _root.ax[this.nearer - 2], _root.ay[this.nearer] - _root.ay[this.nearer - 2])) / Math.PI) * 180) + 90;
} else {
this._x = this._x + this.tox;
this._y = this._y + this.toy;
this._rotation = this._rotation + this.rot;
this.toy = this.toy + (_root.gravity * _root.steps);
}
if (this.bstate > 10) {
if (this.bstate < 110) {
if (this.bstate < 100) {
this.power = 0.5;
} else {
this.power = -1;
}
if (this.bstate < 100) {
this.power = 0.25;
} else {
this.power = -0.5;
}
this.power = this.power * 0.5;
dis = _root.Dist2D(_root.ax[this.nearer], _root.ay[this.nearer], _root.ax[6], _root.ay[6]);
if (dis < 1) {
dis = 1;
}
if (_root.hea > -100) {
_root.atox[this.nearer] = _root.atox[this.nearer] + (((((_root.ax[6] - _root.ax[this.nearer]) / dis) * this.power) * _root.steps) / 2);
_root.atoy[this.nearer] = _root.atoy[this.nearer] + (((((_root.ay[6] - _root.ay[this.nearer]) / dis) * this.power) * _root.steps) / 2);
_root.atox[6] = _root.atox[6] - (((((_root.ax[6] - _root.ax[this.nearer]) / dis) * this.power) * _root.steps) / 2);
_root.atoy[6] = _root.atoy[6] - (((((_root.ay[6] - _root.ay[this.nearer]) / dis) * this.power) * _root.steps) / 2);
}
}
}
if (this.bstate > 50) {
if (this.bstate < 100) {
if (_root.hea > -100) {
if (_root.hea <= 0) {
_root.hea = 1;
}
_root.hea = Math.min(_root.hea + (_root.steps / 2), 100);
}
}
}
if (this.bstate > 102) {
if (!this.vikid) {
this.tox = (-this.lx) + this._x;
this.toy = (-this.ly) + this._y;
this.rot = (-this.lr) + this._rotation;
this.vikid = true;
this.gotoAndStop(2);
}
}
if (this.bstate > 200) {
this.gotoAndStop(3);
}
}
};
Symbol 67 MovieClip Frame 3
this.onEnterFrame = function () {
};
this.gotoAndStop(4);
Symbol 69 MovieClip Frame 1
if ((this + "") != "_level0.game.drop") {
power = (power - 100) * 0.004;
this.tox = (-1 * power) + ((Math.random() * 2) * power);
this.toy = (-1 * power) + ((Math.random() * 2) * power);
if (!_root.game.colmap.hitTest(this._x + _root.game._x, (this._y + _root.game._y) - 5, true)) {
this.toy = this.toy - (1 * power);
}
if (!_root.game.colmap.hitTest(this._x + _root.game._x, (this._y + _root.game._y) + 5, true)) {
this.toy = this.toy + (1 * power);
}
if (!_root.game.colmap.hitTest((this._x + _root.game._x) + 5, this._y + _root.game._y, true)) {
this.tox = this.tox + (1 * power);
}
if (!_root.game.colmap.hitTest((this._x + _root.game._x) - 5, this._y + _root.game._y, true)) {
this.tox = this.tox - (1 * power);
}
this.spawned = false;
this.undertime = 0;
this._alpha = 100;
this.onEnterFrame = function () {
this._x = this._x + ((this.tox * _root.steps) / 2);
this._y = this._y + ((this.toy * _root.steps) / 2);
this.toy = this.toy + (_root.gravity * _root.steps);
this._xscale = (_root.Dist2D(this.tox, this.toy, 0, 0) * 200) + 100;
this._rotation = (((-Math.atan2(this.tox, this.toy)) / Math.PI) * 180) + 90;
if (this.spawned) {
if (_root.game.colmap.hitTest(this._x + _root.game._x, this._y + _root.game._y, true)) {
this._xscale = 200;
this._yscale = 200;
this.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
} else {
this.onEnterFrame = function () {
};
}
};
}
} else if ((!_root.game.colmap.hitTest(this._x + _root.game._x, this._y + _root.game._y, true)) || (this.undertime > 5)) {
this.spawned = true;
} else {
this.undertime++;
}
};
}
Symbol 77 MovieClip Frame 1
this._visible = false;
this.stop();
this.onEnterFrame = function () {
if (this.hitTest(_root.ax[0] + _root.game._x, _root.ay[0] + _root.game._y, false) && (_root.hea > 0)) {
if ((_root.my_so.data.x != this._x) || (_root.my_so.data.y != this._y)) {
_root.my_so.data.hea = _root.hea;
_root.my_so.data.x = this._x;
_root.my_so.data.y = this._y;
_root.my_so.data.totaldrunk = _root.totaldrunk;
i = 0;
while (i < 100) {
trace(_root.game["med" + i].isnue);
_root.my_so.data["m" + i] = _root.game["med" + i].isnue;
i++;
}
trace(_root.ax[0]);
this._visible = true;
this.gotoAndPlay(2);
}
}
};
Symbol 77 MovieClip Frame 2
this._visible = true;
this.onEnterFrame = 0;
Symbol 77 MovieClip Frame 61
this.stop();
Symbol 87 MovieClip Frame 1
this.stop();
Symbol 87 MovieClip Frame 2
this.gotoAndStop(1);
Symbol 87 MovieClip Frame 3
this.gotoAndStop(1);
Symbol 87 MovieClip Frame 4
this.gotoAndStop(1);
Symbol 87 MovieClip Frame 5
this.gotoAndStop(1);
Symbol 87 MovieClip Frame 6
this.gotoAndStop(1);