Frame 1
stop();
Instance of Symbol 14 MovieClip in Frame 1
onClipEvent (load) {
Y = 0;
}
onClipEvent (enterFrame) {
X = (_root.getBytesLoaded() * 5) / _root.getBytesTotal();
X = Math.round(X);
if (Y == 0) {
this.gotoAndPlay(X + 1);
if (X == 5) {
Y = 1;
}
}
}
Frame 2
cntr = 1;
blnum = 1;
blname = 1;
stop();
Instance of Symbol 22 MovieClip "ksc" in Frame 2
onClipEvent (enterFrame) {
if (_root.blnum == _root.blname) {
if (_root.cntr < 9) {
_root.cntr++;
}
if (_root.cntr < 8) {
this._alpha = 10 + (_root.cntr * 10);
} else if (_root.cntr == 8) {
this._alpha = 100;
}
} else if (1 < _root.cntr) {
_root.cntr = _root.cntr - 2;
this._alpha = 10 + (_root.cntr * 10);
} else {
gotoAndStop(_root.blname);
_root.blnum = _root.blname;
this.alpha = 10;
}
}
Frame 3
bcnt = 1;
while (0 < getProperty(bcnt + "_1sq", _width)) {
cntr = 1;
while (0 < getProperty(((bcnt + "_") + cntr) + "sq", _width)) {
setProperty(((bcnt + "_") + cntr) + "sq", _width , 38);
setProperty(((bcnt + "_") + cntr) + "sq", _height , 38);
cntr++;
}
bcnt++;
}
setProperty("10sq", _width , 38);
setProperty("10sq", _height , 38);
setProperty("11sq", _width , 38);
setProperty("11sq", _height , 38);
XPos = new Array(0, 30, 70, 110, 150, 190, 230, 270, 310, 350, 390);
XPmin = new Array(0, 30, 45, 85, 125, 165, 205, 245, 285, 325, 365);
XPmax = new Array(0, 55, 95, 135, 175, 215, 255, 295, 335, 375, 390);
HardBlock = new Array();
HardBlock[0] = new Array();
HardBlock[0][0] = new Array();
HardBlock[0][0][0] = 1;
HardBlock[0][1] = new Array();
HardBlock[0][1][0] = 2;
HardBlock[1] = new Array();
HardBlock[1][0] = new Array(0, 1);
HardBlock[1][1] = new Array(1, 2);
HardBlock[2] = new Array();
HardBlock[2][0] = new Array(0, 1, 0);
HardBlock[2][1] = new Array(1, 2, 1);
HardBlock[2][2] = new Array(0, 1, 0);
HardBlock[3] = new Array();
HardBlock[3][0] = new Array(0, 0, 1, 0, 0);
HardBlock[3][1] = new Array(0, 0, 1, 0, 0);
HardBlock[3][2] = new Array(1, 1, 2, 1, 1);
HardBlock[3][3] = new Array(0, 0, 1, 0, 0);
HardBlock[3][4] = new Array(0, 0, 1, 0, 0);
HardBlock[4] = new Array();
HardBlock[4][0] = new Array(1, 1, 1, 0);
HardBlock[4][1] = new Array(1, 2, 0, 1);
HardBlock[4][2] = new Array(0, 1, 1, 1);
HardBlock[5] = new Array();
HardBlock[5][0] = new Array(1, 1, 1);
HardBlock[5][1] = new Array(0, 2, 0);
HardBlock[6] = new Array();
HardBlock[6][0] = new Array(1, 1, 1);
HardBlock[6][1] = new Array(1, 2, 1);
HardBlock[6][2] = new Array(0, 1, 0);
HardBlock[7] = new Array();
HardBlock[7][0] = new Array(0, 1, 1, 0);
HardBlock[7][1] = new Array(1, 2, 0, 1);
HardBlock[7][2] = new Array(1, 0, 1, 1);
HardBlock[7][3] = new Array(1, 1, 0, 0);
HardBlock[8] = new Array();
HardBlock[8][0] = new Array(0, 1, 1, 0);
HardBlock[8][1] = new Array(0, 1, 1, 0);
HardBlock[8][2] = new Array(1, 0, 2, 1);
HardBlock[8][3] = new Array(1, 1, 1, 1);
HardBlock[9] = new Array();
HardBlock[9][0] = new Array(0, 1, 1, 1, 1, 0);
HardBlock[9][1] = new Array(1, 1, 0, 2, 0, 1);
HardBlock[9][2] = new Array(0, 0, 0, 1, 1, 1);
HBlock = new Array();
HBlock[0] = new Array();
HBlock[0][0] = new Array();
HBlock[0][0][0] = 1;
HBlock[1] = new Array();
HBlock[1][0] = new Array();
HBlock[1][0][0] = 1;
HBlock[1][1] = new Array();
HBlock[1][1][0] = 1;
HBlock[2] = new Array();
HBlock[2][0] = new Array(1, 1);
HBlock[3] = new Array();
HBlock[3][0] = new Array(1, 1, 1);
HBlock[4] = new Array();
HBlock[4][0] = new Array(1, 1, 1);
HBlock[4][1] = new Array(1, 0, 0);
HBlock[5] = new Array();
HBlock[5][0] = new Array(1, 1, 0);
HBlock[5][1] = new Array(0, 1, 1);
HBlock[6] = new Array();
HBlock[6][0] = new Array(1, 1);
HBlock[6][1] = new Array(1, 0);
HBlock[7] = new Array();
HBlock[7][0] = new Array(1, 1);
HBlock[7][1] = new Array(1, 1);
HBlock[8] = new Array();
HBlock[8][0] = new Array(1, 1);
HBlock[8][1] = new Array(1, 0);
HBlock[8][2] = new Array(1, 0);
HBlock[9] = new Array();
HBlock[9][0] = new Array(1, 1, 1);
HBlock[9][1] = new Array(0, 1, 0);
HBlock[10] = new Array();
HBlock[10][0] = new Array(1, 1, 1);
HBlock[10][1] = new Array(0, 1, 0);
HBlock[10][2] = new Array(0, 1, 0);
HBlock[11] = new Array();
HBlock[11][0] = new Array(0, 1, 0);
HBlock[11][1] = new Array(0, 1, 0);
HBlock[11][2] = new Array(1, 1, 1);
HBlock[12] = new Array();
HBlock[12][0] = new Array(1, 1, 1, 0, 1, 1);
HBlock[12][1] = new Array(0, 0, 0, 0, 0, 0);
HBlock[13] = new Array();
HBlock[13][0] = new Array(0, 0, 1, 0);
HBlock[13][1] = new Array(0, 0, 1, 1);
HBlock[13][2] = new Array(1, 1, 1, 1);
HBlock[14] = new Array();
HBlock[14][0] = new Array(0, 0, 1);
HBlock[14][1] = new Array(1, 1, 1);
movespeed = NLev[0][0];
delcnt = NLev[0][1];
curlev = 1;
nlevl = new Boolean(0);
duplicateMovieClip ("dr1", "dr", 251);
setProperty("dr", _y , 200);
setProperty("dr", _x , 230);
duplicateMovieClip ("pauz1", "pauz", 253);
pauz._x = -300;
pauz._y = 200;
duplicateMovieClip ("inf", "infom", 252);
infom._y = 160;
drX = 6;
drF = 0;
nair = 100;
airplus = 0;
clife = 3;
drH = dr._height;
nl.nextlev = 100;
Frame 4
function findBlocks(Yf, Xf, bnum) {
var bcol = Map[Yf][Xf];
Block[bnum][0] = 0;
Block[bnum][1] = bcol;
Block[bnum][2] = 0;
Block[bnum][3] = 0;
Block[bnum][4] = 0;
if (bcol != 10) {
BfindY.push(Yf);
BfindX.push(Xf);
scntr = 0;
while (scntr < BfindY.length) {
Yf = BfindY[scntr];
Xf = BfindX[scntr];
if (Map[Yf][Xf] != bnum) {
Map[Yf][Xf] = bnum;
Blocks[bnum][1].push(Yf);
Blocks[bnum][2].push(Xf);
}
if (Map[Yf - 1][Xf] == bcol) {
BfindY.push(Yf - 1);
BfindX.push(Xf);
}
if (Map[Yf + 1][Xf] == bcol) {
BfindY.push(Yf + 1);
BfindX.push(Xf);
}
if (Map[Yf][Xf - 1] == bcol) {
BfindY.push(Yf);
BfindX.push(Xf - 1);
}
if (Map[Yf][Xf + 1] == bcol) {
BfindY.push(Yf);
BfindX.push(Xf + 1);
}
scntr++;
}
} else {
Map[Yf][Xf] = bnum;
Blocks[bnum][1].push(Yf);
Blocks[bnum][2].push(Xf);
}
}
paused = 0;
bfreq = NLev[curlev][1][1];
hfreq = NLev[curlev][1][2];
typeb = NLev[curlev][1][3] + "_";
Map = new Array();
MapN = new Array();
MapL = new Array();
movecnt = Math.ceil(40 / movespeed);
drilcnt = Math.ceil((movecnt * 2) / 3);
delcntu = Math.ceil((delcnt * 2) / 3);
delcntr = ((delcnt * 3) + (delcntu * 3)) + 1;
delcnt1 = 2;
delcnt2 = 2 + delcntu;
delcnt3 = (2 + delcntu) + delcnt;
delcnt4 = (2 + (delcntu * 2)) + delcnt;
delcnt5 = (2 + (delcntu * 2)) + (delcnt * 2);
delcnt6 = (2 + (delcntu * 3)) + (delcnt * 2);
movestp = delcnt + 1;
movecntr = movestp * 4;
RotateArr = new Array();
cntr = 1;
sparam = 0;
scntr = 1;
while (movecntr >= cntr) {
if ((sparam == movestp) || (sparam == (-movestp))) {
scntr = -scntr;
}
if (0 < scntr) {
sparam++;
} else {
sparam--;
}
RotateArr[cntr] = sparam * delcnt;
cntr++;
}
FreeLev = new Array();
cntr = 100;
while (250 >= cntr) {
FreeLev.push(cntr);
cntr++;
}
Y = 1;
MapH = new Array();
while (100 >= Y) {
Map[Y] = new Array();
MapN[Y] = new Array();
MapH[Y] = new Array();
X = 1;
while (10 >= X) {
brtype = NLev[curlev][3][random(NLev[curlev][3].length)];
dstname = ((Y * 10) + X) - 1;
MapL[dstname] = 0;
Map[Y][X] = brtype;
MapN[Y][X] = dstname;
MapH[Y][X] = 0;
if (((((Map[Y - 1][X - 1] == brtype) && (Map[Y][X - 1] == brtype)) && (Map[Y - 2][X - 1] == brtype)) && (Map[Y - 1][X] != brtype)) || ((((Map[Y - 1][X] == brtype) && (Map[Y][X - 1] == brtype)) && (Map[Y - 2][X] == brtype)) && (Map[Y - 1][X - 1] != brtype))) {
} else {
X++;
}
}
Y++;
}
cntr = random(bfreq) + 1;
sparam = NLev[curlev][1][0];
Yf = HardBlock[sparam].length;
Xf = HardBlock[sparam][0].length;
while (cntr < 100) {
if (100 >= (cntr + Yf)) {
bcnt = random(11 - Xf) + 1;
Y = 0;
if (random(2) == 1) {
while (Y < Yf) {
X = 0;
while (X < Xf) {
if (HardBlock[sparam][Y][X] == 1) {
Map[cntr + Y][bcnt + X] = 11;
} else if (HardBlock[sparam][Y][X] == 2) {
Map[cntr + Y][bcnt + X] = 10;
}
X++;
}
Y++;
}
} else {
while (Y < Yf) {
X = 0;
while (X < Xf) {
if (HardBlock[sparam][Y][X] == 1) {
Map[cntr + Y][((bcnt - 1) + Xf) - X] = 11;
} else if (HardBlock[sparam][Y][X] == 2) {
Map[cntr + Y][((bcnt - 1) + Xf) - X] = 10;
}
X++;
}
Y++;
}
}
}
cntr = cntr + bfreq;
}
cntr = 1;
dstname = 1;
while (cntr < 100) {
sparam = NLev[curlev][2][random(NLev[curlev][2].length)];
Yf = HBlock[sparam].length;
Xf = HBlock[sparam][0].length;
if ((cntr + Yf) < 100) {
bcnt = random(11 - Xf) + 1;
Y = 0;
while (Y < Yf) {
X = 0;
while (X < Xf) {
if (HBlock[sparam][Y][X] == 1) {
if ((Map[cntr + Y][(bcnt + X) - 1] == 11) && (MapH[cntr + Y][(bcnt + X) - 1] != dstname)) {
} else if ((Map[cntr + Y][(bcnt + X) + 1] == 11) && (MapH[cntr + Y][(bcnt + X) + 1] != dstname)) {
} else if ((Map[(cntr + Y) + 1][bcnt + X] == 11) && (MapH[(cntr + Y) + 1][bcnt + X] != dstname)) {
} else if ((Map[(cntr + Y) - 1][bcnt + X] == 11) && (MapH[(cntr + Y) - 1][bcnt + X] != dstname)) {
} else if (Map[(cntr + Y) - 1][bcnt + X] == Map[(cntr + Y) + 1][bcnt + X]) {
} else if (9 < Map[cntr + Y][bcnt + X]) {
} else {
Map[cntr + Y][bcnt + X] = 11;
MapH[cntr + Y][bcnt + X] = dstname;
}
}
X++;
}
Y++;
}
}
dstname++;
cntr = cntr + hfreq;
}
Block = new Array();
Blocks = new Array();
cntr = 20;
Y = 1;
while (100 >= Y) {
X = 1;
while (10 >= X) {
if (Map[Y][X] < 20) {
Block[cntr] = new Array();
Blocks[cntr] = new Array();
Blocks[cntr][1] = new Array();
Blocks[cntr][2] = new Array();
BfindY = new Array();
BfindX = new Array();
findBlocks(Y, X, cntr);
cntr++;
}
X++;
}
Y++;
}
drY = -6;
drst = 0;
dmflag = 1;
spready = 1;
rjump = 0;
ljump = 0;
DelArr = new Array();
MoveArr = new Array();
acnt = 0;
if (0 < NLev[curlev][1][4]) {
infom.infom.infom = "+++";
infom._x = dr._x;
with (infom) {
gotoAndPlay("go");
}
clife++;
}
Frame 5
function SetVisibl(blnum, sparam) {
scntr = 0;
blength = Blocks[blnum][1].length;
while (scntr < blength) {
blname = MapN[Blocks[blnum][1][scntr]][Blocks[blnum][2][scntr]];
setProperty(blname, _visible , sparam);
scntr++;
}
}
function SetRotation(bnum, spar) {
stcntr = 0;
blength = Blocks[bnum][1].length;
while (stcntr < blength) {
blname = MapN[Blocks[bnum][1][stcntr]][Blocks[bnum][2][stcntr]];
setProperty(blname, _rotation , spar);
stcntr++;
}
}
function SetSize(blnum, sparam) {
scntr = 0;
blength = Blocks[blnum][1].length;
sparam = 38 - sparam;
while (scntr < blength) {
blname = MapN[Blocks[blnum][1][scntr]][Blocks[blnum][2][scntr]];
setProperty(blname, _width , sparam);
setProperty(blname, _height , sparam);
scntr++;
}
}
function RemoveBl(blnum, sparam) {
scntr = 0;
blength = Blocks[blnum][1].length;
Block[blnum][1] = 0;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
dstname = MapN[Y][X];
if (0 < MapL[dstname]) {
FreeLev.push(MapL[dstname]);
MapL[dstname] = 0;
}
removeMovieClip(dstname);
Map[Y][X] = 0;
MapN[Y][X] = "";
upbl = Map[Y - 1][X];
if (((upbl != blnum) && (upbl != 0)) && ((Block[upbl][2] == 0) || (((Block[upbl][2] == 4) || (Block[upbl][2] == 3)) && (Block[upbl][0] == 0)))) {
MoveArr.push(upbl);
Block[upbl][0] = 0;
Block[upbl][2] = sparam;
Block[upbl][3] = 0;
}
scntr++;
}
}
function CheckFall(blnum) {
scntr = 0;
blength = Blocks[blnum][1].length;
possib = 1;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
dnbl = Map[Y + 1][X];
if (((dnbl == blnum) || (dnbl == 0)) || ((Block[dnbl][2] == 4) && (0 < Block[dnbl][0]))) {
} else if (((Block[dnbl][2] == 3) && (0 < Block[dnbl][0])) && (0 < possib)) {
possib = 2;
} else {
possib = 0;
return(possib);
}
scntr++;
}
return(possib);
}
function SetUpperFall(blnum, sparam) {
scntr = 0;
blength = Blocks[blnum][1].length;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
upbl = Map[Y - 1][X];
if (((upbl != blnum) && (upbl != 0)) && ((Block[upbl][2] == 0) || (((Block[upbl][2] == 4) || (Block[upbl][2] == 3)) && (Block[upbl][0] == 0)))) {
MoveArr.push(upbl);
Block[upbl][0] = 0;
Block[upbl][2] = sparam;
Block[upbl][3] = 0;
}
scntr++;
}
}
function BlockDrop(blnum) {
scntr = 0;
blength = Blocks[blnum][1].length;
while (scntr < blength) {
blname = MapN[Blocks[blnum][1][scntr]][Blocks[blnum][2][scntr]];
sparam = getProperty(blname, _y) + movecnt;
setProperty(blname, _y , sparam);
scntr++;
}
}
function FinishFall(blnum, sparam) {
scntr = 0;
blength = Blocks[blnum][1].length;
var possib = 1;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
MapH[Y][X] = MapN[Y][X];
dnbl = Map[Y + 1][X];
if ((dnbl == blnum) || (dnbl == 0)) {
} else {
possib = 0;
return(0);
}
scntr++;
}
if (possib == 1) {
scntr = 0;
sparam = (movecnt + 40) - sparam;
var newy = 0;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
newy = getProperty(MapH[Y][X], _y) + sparam;
setProperty(MapH[Y][X], _y , newy);
Map[Y][X] = 0;
MapN[Y][X] = "";
scntr++;
}
scntr = 0;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
Map[Y + 1][X] = blnum;
MapN[Y + 1][X] = MapH[Y][X];
Blocks[blnum][1][scntr] = Y + 1;
scntr++;
}
}
return(possib);
}
function CheckAround(blnum, sparam) {
scntr = 0;
upbl = 0;
if ((10 < sparam) && (sparam < 15)) {
while (scntr < Blocks[blnum][1].length) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
dnbl = Map[Y - 1][X];
if (((((dnbl != blnum) && (10 < Block[dnbl][1])) && (Block[dnbl][1] < 15)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
if (Block[dnbl][1] < Block[blnum][1]) {
Block[blnum][1] = Block[dnbl][1];
}
JoinArrs(blnum, dnbl);
}
dnbl = Map[Y + 1][X];
if (((((dnbl != blnum) && (10 < Block[dnbl][1])) && (Block[dnbl][1] < 15)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
if (Block[dnbl][1] < Block[blnum][1]) {
Block[blnum][1] = Block[dnbl][1];
}
JoinArrs(blnum, dnbl);
}
dnbl = Map[Y][X - 1];
if ((((dnbl != blnum) && (10 < Block[dnbl][1])) && (Block[dnbl][1] < 15)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
if (Block[dnbl][1] < Block[blnum][1]) {
Block[blnum][1] = Block[dnbl][1];
}
JoinArrs(blnum, dnbl);
}
dnbl = Map[Y][X + 1];
if (((((dnbl != blnum) && (10 < Block[dnbl][1])) && (Block[dnbl][1] < 15)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
if (Block[dnbl][1] < Block[blnum][1]) {
Block[blnum][1] = Block[dnbl][1];
}
JoinArrs(blnum, dnbl);
}
scntr++;
}
} else if (sparam != 10) {
while (scntr < Blocks[blnum][1].length) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
dnbl = Map[Y - 1][X];
if ((((dnbl != blnum) && (Block[dnbl][1] == sparam)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
JoinArrs(blnum, dnbl);
}
dnbl = Map[Y + 1][X];
if ((((dnbl != blnum) && (Block[dnbl][1] == sparam)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
JoinArrs(blnum, dnbl);
}
dnbl = Map[Y][X - 1];
if ((((dnbl != blnum) && (Block[dnbl][1] == sparam)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
JoinArrs(blnum, dnbl);
}
dnbl = Map[Y][X + 1];
if ((((dnbl != blnum) && (Block[dnbl][1] == sparam)) && (Block[dnbl][2] != 2)) && ((Block[dnbl][2] != 4) || (Block[dnbl][0] == 0))) {
upbl = 1;
JoinArrs(blnum, dnbl);
}
scntr++;
}
}
if ((3 < Blocks[blnum][1].length) && (upbl == 1)) {
DelAfterFall(blnum);
} else if (3 < Blocks[blnum][1].length) {
if (CheckFall(blnum) == 1) {
Block[blnum][0] = 3;
Block[blnum][2] = 4;
Block[blnum][3] = 0;
} else {
DelAfterFall(blnum);
}
} else {
Block[blnum][0] = 0;
Block[blnum][2] = 4;
Block[blnum][3] = 0;
}
}
function JoinArrs(blnum, dnbl) {
if ((Block[dnbl][2] == 3) && (0 < Block[dnbl][3])) {
setRotation(dnbl, 0);
}
Blocks[blnum][1] = Blocks[blnum][1].concat(Blocks[dnbl][1]);
Blocks[blnum][2] = Blocks[blnum][2].concat(Blocks[dnbl][2]);
var stcntr = 0;
blength = Blocks[dnbl][1].length;
while (stcntr < blength) {
Yf = Blocks[dnbl][1][stcntr];
Xf = Blocks[dnbl][2][stcntr];
Map[Yf][Xf] = blnum;
stcntr++;
}
Block[dnbl][1] = 0;
}
function DelAfterFall(blnum) {
Block[blnum][0] = 0;
Block[blnum][2] = 1;
Block[blnum][3] = 0;
Block[blnum][4] = 1;
DelArr.push(blnum);
}
function TakeBottle(Y, X) {
blname = Map[Y][X];
dstname = MapN[Y][X];
FreeLev.push(MapL[dstname]);
MapL[dstname] = 0;
removeMovieClip(dstname);
MapN[Y][X] = "";
Map[Y][X] = 0;
Block[blname][1] = 0;
upbl = Map[Y - 1][X];
if ((0 < upbl) && (Block[upbl][2] == 0)) {
MoveArr.push(upbl);
Block[upbl][0] = 0;
Block[upbl][2] = 3;
Block[upbl][3] = 0;
}
airplus = airplus + 20;
infom.infom.infom = "+20";
infom._x = dr._x;
with (infom) {
gotoAndPlay("go");
}
}
function DestroyHB(blnum, sparam) {
_root.sparam = sparam + "st";
scntr = 0;
blength = Blocks[blnum][1].length;
while (scntr < blength) {
Yf = Blocks[blnum][1][scntr];
Xf = Blocks[blnum][2][scntr];
blname = MapN[Yf][Xf];
with (eval (blname)) {
gotoAndStop(_root.sparam);
}
scntr++;
}
}
function LooseLife() {
Y = drY;
while (Y >= (drY - 15)) {
blnum = Map[Y][drX];
if (((0 < blnum) && ((Block[blnum][2] == 0) || (Block[blnum][2] == 3))) && (Block[blnum][1] != 10)) {
DelArr.push(blnum);
Block[blnum][2] = 2;
Block[blnum][0] = 0;
}
Y--;
}
}
function FallDrill(sparam) {
if (nlevl == 1) {
if (sparam == 0) {
sparam = movecnt;
}
upbl = nl._y - sparam;
setProperty("nl", _y , upbl);
}
Y = drY - 7;
while ((drY + 7) >= Y) {
X = 1;
while (10 >= X) {
dstname = MapN[Y][X];
if (0 < MapL[dstname]) {
if (sparam == 0) {
sparam = movecnt;
}
upbl = getProperty(dstname, _y) - sparam;
setProperty(dstname, _y , upbl);
}
X++;
}
Y++;
}
}
function EraseMap(Y) {
if (0 < Y) {
X = 1;
while (10 >= X) {
blnum = Map[Y][X];
if (0 < blnum) {
Block[blnum][1] = 0;
scntr = 0;
blength = Blocks[blnum][1].length;
while (scntr < blength) {
Yf = Blocks[blnum][1][scntr];
Xf = Blocks[blnum][2][scntr];
dstname = MapN[Yf][Xf];
if (0 < MapL[dstname]) {
FreeLev.push(MapL[dstname]);
MapL[dstname] = 0;
removeMovieClip(dstname);
}
Map[Yf][Xf] = 0;
MapN[Yf][Xf] = 0;
scntr++;
}
}
X++;
}
}
}
function CheckMap() {
Y = drY - 7;
EraseBlocks(Y);
Y = drY + 7;
EraseBlocks(Y);
Y = drY - 6;
sparam = -40 + drF;
SetBlocks(Y, sparam);
Y = drY + 6;
sparam = 440 + drF;
SetBlocks(Y, sparam);
}
function EraseBlocks(Y) {
if ((Y == 101) && (nlevl == 1)) {
nlevl = 0;
setProperty("nl", _y , sparam + 40);
setProperty("nl", _x , -300);
} else {
X = 1;
while (10 >= X) {
dstname = MapN[Y][X];
if (0 < MapL[dstname]) {
FreeLev.push(MapL[dstname]);
MapL[dstname] = 0;
removeMovieClip(dstname);
}
X++;
}
}
}
function SetBlocks(Y, sparam) {
if ((Y == 101) && (nlevl == 0)) {
nlevl = 1;
setProperty("nl", _y , sparam + 40);
setProperty("nl", _x , 230);
} else {
X = 1;
while (10 >= X) {
dstname = MapN[Y][X];
if (MapL[dstname] == 0) {
blnum = Map[Y][X];
upbl = FreeLev.shift();
if ((11 < Block[blnum][1]) && (Block[blnum][1] < 15)) {
duplicateMovieClip ("11sq", dstname, upbl);
if (Block[blnum][1] == 12) {
_root.srcname = "2st";
} else if (Block[blnum][1] == 13) {
_root.srcname = "3st";
} else if (Block[blnum][1] == 14) {
_root.srcname = "4st";
} else {
_root.srcname = "1st";
}
with (eval (dstname)) {
gotoAndStop(_root.srcname);
}
} else {
if (Block[blnum][1] < 10) {
srcname = (typeb + Block[blnum][1]) + "sq";
} else {
srcname = Block[blnum][1] + "sq";
}
duplicateMovieClip (srcname, dstname, upbl);
}
if ((Block[blnum][2] == 4) && (0 < Block[blnum][3])) {
if (40 < Block[blnum][3]) {
dnbl = sparam + 40;
} else {
dnbl = sparam + Block[blnum][3];
}
} else {
dnbl = sparam;
}
setProperty(dstname, _y , dnbl);
setProperty(dstname, _x , XPos[X]);
MapL[dstname] = upbl;
}
X++;
}
}
}
function GameOver() {
Y = drY - 7;
while ((drY + 7) >= Y) {
X = 1;
while (10 >= X) {
dstname = MapN[Y][X];
if (0 < MapL[dstname]) {
removeMovieClip(dstname);
}
X++;
}
Y++;
}
}
if (dmflag == 1) {
dmflag = 2;
} else {
dmflag = 1;
}
cntr = 0;
dl = DelArr.length;
while (cntr < dl) {
blnum = DelArr[cntr];
stad = Block[blnum][2];
bcntr = Block[blnum][3];
if (((Block[blnum][0] == dmflag) || (Block[blnum][1] == 0)) || ((stad != 1) && (stad != 2))) {
DelArr.splice(cntr, 1);
dl--;
} else if ((stad == 1) && (Block[blnum][0] == 0)) {
Block[blnum][4] = 1;
Block[blnum][0] = dmflag;
cntr++;
} else if (stad == 1) {
if (((bcntr == delcnt1) || (bcntr == delcnt3)) || (bcntr == delcnt5)) {
setVisibl(blnum, 0);
} else if ((((bcntr == 0) || (bcntr == delcnt2)) || (bcntr == delcnt4)) || (bcntr == delcnt6)) {
setVisibl(blnum, 1);
}
if (bcntr >= delcntr) {
Block[blnum][2] = 2;
Block[blnum][3] = 0;
} else {
Block[blnum][3] = ++bcntr;
}
Block[blnum][0] = dmflag;
cntr++;
} else if (stad == 2) {
bcntr = bcntr + 7;
if (31 < bcntr) {
if (Block[blnum][4] == 1) {
RemoveBl(blnum, 4);
} else {
RemoveBl(blnum, 3);
}
DelArr.splice(cntr, 1);
dl--;
} else {
Block[blnum][3] = bcntr;
SetSize(blnum, bcntr);
cntr++;
}
Block[blnum][0] = dmflag;
}
}
cntr = 0;
dl = MoveArr.length;
while (cntr < dl) {
blnum = MoveArr[cntr];
bflag = Block[blnum][0];
stad = Block[blnum][2];
bcntr = Block[blnum][3];
if (((Block[blnum][0] == dmflag) || (Block[blnum][1] == 0)) || ((stad != 3) && (stad != 4))) {
MoveArr.splice(cntr, 1);
dl--;
} else if ((stad == 3) && (bflag == 0)) {
if (0 < CheckFall(blnum)) {
Block[blnum][0] = dmflag;
Block[blnum][3] = 0;
Block[blnum][4] = 0;
SetUpperFall(blnum, 3);
cntr++;
} else {
MoveArr.splice(cntr, 1);
Block[blnum][0] = 0;
Block[blnum][2] = 0;
dl--;
}
} else if (stad == 3) {
Block[blnum][0] = dmflag;
if (bcntr >= movecntr) {
SetUpperFall(blnum, 4);
Block[blnum][0] = 0;
Block[blnum][2] = 4;
Block[blnum][3] = 0;
} else {
Block[blnum][3] = ++bcntr;
sparam = RotateArr[bcntr];
SetRotation(blnum, sparam);
}
cntr++;
} else if ((stad == 4) && (bflag == 0)) {
if (CheckFall(blnum) == 1) {
Block[blnum][0] = dmflag;
Block[blnum][3] = 0;
SetUpperFall(blnum, 4);
cntr++;
} else {
MoveArr.splice(cntr, 1);
Block[blnum][0] = 0;
Block[blnum][2] = 0;
dl--;
}
} else if (stad == 4) {
if (bcntr >= 40) {
if (FinishFall(blnum, bcntr) == 1) {
CheckAround(blnum, Block[blnum][1]);
} else {
Block[blnum][0] = dmflag;
}
cntr++;
} else if ((bcntr + movecnt) >= 40) {
bcntr = bcntr + movecnt;
Block[blnum][3] = bcntr;
if (FinishFall(blnum, bcntr) == 1) {
CheckAround(blnum, Block[blnum][1]);
} else {
Block[blnum][0] = dmflag;
}
cntr++;
} else {
bcntr = bcntr + movecnt;
Block[blnum][3] = bcntr;
BlockDrop(blnum);
Block[blnum][0] = dmflag;
cntr++;
}
}
}
CheckMap();
if (((((drst == 0) || (drst == 2)) || (drst == 3)) || (drst == 6)) || (drst == 7)) {
if ((drst == 2) || (drst == 3)) {
drst = 0;
}
dnbl = Map[drY + 1][drX];
X = dr._x;
if ((X + 5) < XPos[drX]) {
Xf = drX - 1;
stad = 6;
} else if (XPos[drX] < (X - 5)) {
Xf = drX + 1;
stad = 7;
} else {
Xf = 0;
}
blnum = Map[drY - 1][drX];
bnum = Map[drY - 1][Xf];
dstname = Map[drY][Xf];
if ((drY < 100) && (((((Block[dnbl][2] == 4) && (0 < Block[dnbl][3])) || (0 < (!dnbl))) || (Block[dnbl][1] == 10)) || (Block[dnbl][2] == 2))) {
drst = 1;
if (X != XPos[drX]) {
if (X < XPos[drX]) {
upbl = Map[drY + 1][drX - 1];
} else {
upbl = Map[drY + 1][drX + 1];
}
if (((0 < upbl) && (!((Block[upbl][2] == 4) && (0 < Block[upbl][3])))) && (Block[upbl][1] != 10)) {
dr._x = XPos[drX];
}
}
} else if ((((0 < Map[drY - 1][drX]) && (Block[blnum][2] == 4)) && (0 < Block[blnum][3])) && (Block[blnum][1] != 10)) {
if (((Xf == 0) || ((((0 < Map[drY - 1][Xf]) && (Block[bnum][2] == 4)) && (0 < Block[bnum][3])) && (Block[bnum][1] != 10))) || ((dstname != 0) && (Block[dstname][1] != 10))) {
drst = 8;
} else {
if (stad == 6) {
drX--;
} else {
drX++;
}
dr._x = XPos[drX];
drst = stad;
}
dr._height = drH;
ljump = 0;
} else if (((((Xf != 0) && (0 < Map[drY - 1][Xf])) && (Block[bnum][2] == 4)) && (0 < Block[bnum][3])) && (Block[bnum][1] != 10)) {
dr._height = drH;
dr._x = XPos[drX];
if (10 < Math.abs(X - XPos[drX])) {
drst = stad;
}
}
if (10 < Math.abs(X - XPos[drX])) {
if (((Block[bnum][1] == 10) && (Block[bnum][2] == 4)) && (0 < Block[bnum][3])) {
TakeBottle(drY - 1, Xf);
}
if (Block[Map[drY][Xf]][1] == 10) {
TakeBottle(drY, Xf);
}
if ((drst == 1) && (Block[Map[drY + 1][Xf]][1] == 10)) {
TakeBottle(drY + 1, Xf);
}
}
if (((Block[blnum][1] == 10) && (Block[blnum][2] == 4)) && (0 < Block[blnum][3])) {
TakeBottle(drY - 1, drX);
}
if (Block[Map[drY][drX]][1] == 10) {
TakeBottle(drY, drX);
}
if ((drst == 1) && (Block[Map[drY + 1][drX]][1] == 10)) {
TakeBottle(drY + 1, drX);
}
}
if (((drst == 0) || (drst == 2)) || (drst == 3)) {
dnbl = 0;
upbl = 0;
if (Key.isDown(Key.SPACE)) {
rjump = 0;
ljump = 0;
if (spready == 1) {
dnbl = Map[drY + 1][drX];
upbl = "down";
if (Key.isDown(Key.LEFT)) {
dnbl = Map[drY][drX - 1];
upbl = "left";
} else if (Key.isDown(Key.RIGHT)) {
dnbl = Map[drY][drX + 1];
upbl = "right";
} else if (Key.isDown(Key.UP)) {
dnbl = Map[drY - 1][drX];
upbl = "up";
} else if ((drY + 1) == 101) {
drst = 9;
spready = 0;
}
}
} else if (Key.isDown(Key.LEFT)) {
rjump = 0;
ljump++;
dnbl = Map[drY][drX - 1];
drst = 2;
upbl = "step";
spready = 1;
} else if (Key.isDown(Key.RIGHT)) {
ljump = 0;
rjump++;
dnbl = Map[drY][drX + 1];
drst = 3;
upbl = "step";
spready = 1;
} else {
rjump = 0;
ljump = 0;
dr._height = drH;
dr._y = 200;
spready = 1;
}
if (upbl != "step") {
if ((((dnbl != 0) && (Block[dnbl][1] != 10)) && (((Block[dnbl][2] == 0) || (Block[dnbl][2] == 3)) || (Block[dnbl][2] == 1))) && ((dr._currentframe == 1) || (21 < dr._currentframe))) {
spready = 0;
if (9 < Block[dnbl][1]) {
if (Block[dnbl][1] == 11) {
DestroyHB(dnbl, 2);
Block[dnbl][1] = 12;
} else if (Block[dnbl][1] == 12) {
DestroyHB(dnbl, 3);
Block[dnbl][1] = 13;
} else if (Block[dnbl][1] == 13) {
DestroyHB(dnbl, 4);
Block[dnbl][1] = 14;
} else if (Block[dnbl][1] == 14) {
DelArr.push(dnbl);
Block[dnbl][2] = 2;
airplus = airplus - 20;
infom.infom.infom = "-20";
infom._x = dr._x;
with (infom) {
gotoAndPlay("go");
}
}
} else if ((dnbl != 0) && (Block[dnbl][2] != 4)) {
DelArr.push(dnbl);
Block[dnbl][0] = 0;
Block[dnbl][2] = 2;
Block[dnbl][3] = 0;
}
}
if (upbl != 0) {
with (_root.dr) {
gotoAndPlay(_root.upbl);
}
with (_root.dr.dr1) {
gotoAndPlay("nbeat");
}
}
}
X = dr._x;
if ((drst == 2) && (((0 < (!dnbl)) || (XPos[drX] < X)) || (Block[dnbl][1] == 10))) {
rjump = 0;
ljump = 0;
dr._height = drH;
dr._y = 200;
if (X < 30) {
} else if ((X - drilcnt) < 30) {
dr._x = 30;
} else {
dr._x = X - drilcnt;
if ((X - drilcnt) < XPmin[drX]) {
drX--;
}
if (dr._currentframe == 1) {
with (_root.dr) {
gotoAndPlay(_root.upbl);
}
}
}
} else if (drst == 2) {
if (5 < ljump) {
if ((((0 < (!Map[drY - 1][drX])) || (Block[Map[drY - 1][drX]][1] == 10)) && ((0 < (!Map[drY - 1][drX - 1])) || (Block[Map[drY - 1][drX - 1]][1] == 10))) && ((!(((0 < Map[drY - 2][drX - 1]) && (Block[Map[drY - 2][drX - 1]][2] == 4)) && (0 < Block[Map[drY - 2][drX - 1]][0]))) || (Block[Map[drY - 2][drX - 1]][1] == 10))) {
dr._height = drH;
dr._y = 200;
drst = 4;
ljump = 6;
}
} else {
dr._height = drH - (ljump * 2);
dr._y = 200 + ljump;
dr._x = XPos[drX];
}
} else if ((drst == 3) && (((0 < (!dnbl)) || (X < XPos[drX])) || (Block[dnbl][1] == 10))) {
rjump = 0;
ljump = 0;
dr._height = drH;
dr._y = 200;
if (390 < X) {
} else if (390 < (X + drilcnt)) {
dr._x = 390;
} else {
dr._x = X + drilcnt;
if (XPmax[drX] < (X + drilcnt)) {
drX++;
}
if (dr._currentframe == 1) {
with (_root.dr) {
gotoAndPlay(_root.upbl);
}
}
}
} else if (drst == 3) {
if (5 < rjump) {
if ((((0 < (!Map[drY - 1][drX])) || (Block[Map[drY - 1][drX]][1] == 10)) && ((0 < (!Map[drY - 1][drX + 1])) || (Block[Map[drY - 1][drX + 1]][1] == 10))) && ((!(((0 < Map[drY - 2][drX + 1]) && (Block[Map[drY - 2][drX + 1]][2] == 4)) && (0 < Block[Map[drY - 2][drX + 1]][0]))) || (Block[Map[drY - 2][drX + 1]][1] == 10))) {
dr._height = drH;
dr._y = 200;
drst = 5;
rjump = 6;
}
} else {
dr._height = drH - (rjump * 2);
dr._y = 200 + rjump;
dr._x = XPos[drX];
}
}
}
if (drst == 4) {
if (ljump < 7) {
FallDrill(-20);
drF = drF + 20;
ljump++;
} else {
FallDrill(-20);
drF = 0;
ljump = 0;
drY--;
drX--;
drst = 0;
X = dr._x;
dr._x = X - 18;
CheckMap();
clev--;
}
} else if (drst == 5) {
if (rjump < 7) {
FallDrill(-20);
drF = drF + 20;
rjump++;
} else {
FallDrill(-20);
drF = 0;
ljump = 0;
drY--;
drX++;
drst = 0;
X = dr._x;
dr._x = X + 18;
CheckMap();
clev--;
}
} else if (drst == 1) {
dr._height = drH;
dr._y = 200;
dnbl = Map[drY + 1][drX];
bcntr = Block[dnbl][3];
if ((((0 < (!dnbl)) || (Block[dnbl][1] == 10)) || (Block[dnbl][2] == 2)) || (((Block[dnbl][2] == 4) && (bcntr >= drF)) && (bcntr < 40))) {
if (-40 >= (drF - movecnt)) {
sparam = 40 + drF;
FallDrill(sparam);
drF = 0;
drst = 0;
drY++;
EraseMap(drY - 15);
CheckMap();
if (0 < drY) {
clev++;
}
} else {
drF = drF - movecnt;
FallDrill(0);
}
} else if ((0 < dnbl) && (Block[dnbl][2] != 4)) {
drst = 0;
}
} else if (drst == 6) {
if (ljump == 0) {
dr._height = 30;
dr._y = 205;
ljump++;
} else if (ljump == 5) {
dr._height = 35;
dr._y = 202.5;
ljump++;
} else if (ljump == 6) {
dr._height = drH;
dr._y = 200;
ljump++;
} else if (6 < ljump) {
drst = 0;
} else {
ljump++;
}
} else if (drst == 7) {
if (ljump == 0) {
dr._height = 30;
dr._y = 205;
ljump++;
} else if (ljump == 5) {
dr._height = 35;
dr._y = 202.5;
ljump++;
} else if (ljump == 6) {
dr._height = drH;
dr._y = 200;
ljump++;
} else if (6 < ljump) {
drst = 0;
} else {
ljump++;
}
} else if (drst == 8) {
if (ljump == 0) {
infom.infom.infom = ":(";
infom._x = dr._x;
with (infom) {
gotoAndPlay("go");
}
ljump++;
} else if (ljump < movespeed) {
dr._height = drH - (movecnt * ljump);
dr._y = 200 + ((ljump * movecnt) / 2);
ljump++;
} else if (40 < ljump) {
drst = 0;
dr._height = drH;
dr._y = 200;
dr._x = XPos[drX];
nair = 100;
acnt = 0;
airc._x = 603;
clife--;
if (clife >= 1) {
} else {
GameOver();
setProperty("nl", _x , -300);
removeMovieClip("pauz");
removeMovieClip("dr");
gotoAndPlay (7);
}
} else {
LooseLife();
ljump++;
}
} else if (drst == 9) {
if (ljump >= 11) {
nl._alpha = 100;
nl._x = -300;
curlev++;
if (NLev[0][2] < curlev) {
removeMovieClip("dr");
gotoAndPlay (7);
} else {
nl.nextlev = curlev * 100;
gotoAndPlay (4);
}
} else if (ljump == 10) {
ljump = 11;
} else {
dnbl = nl._alpha - 9;
nl._alpha = dnbl;
FallDrill(0);
drY++;
ljump++;
}
}
if (drst != 8) {
acnt++;
if ((acnt >= aircnt) && (drst != 8)) {
if (0 < nair) {
acnt = 0;
X = airc._x;
airc._x = X - 1.23;
nair--;
if (nair < 10) {
infom.infom.infom = nair;
infom._x = dr._x;
with (infom) {
gotoAndPlay("go");
}
}
} else {
drst = 8;
}
}
if (0 < airplus) {
if (nair >= 99) {
airc._x = 603;
nair = 100;
} else {
X = airc._x + 1.23;
airc._x = X;
nair++;
}
if (!((11 < airclip._currentframe) && (airclip._currentframe < 21))) {
with (airclip) {
gotoAndPlay("good");
}
}
airplus--;
} else if (airplus < 0) {
if (1 >= nair) {
acnt = aircnt;
airc._x = 480;
nair = 0;
} else {
X = airc._x - 1.23;
airc._x = X;
nair--;
}
if (!((1 < airclip._currentframe) && (airclip._currentframe < 11))) {
with (airclip) {
gotoAndPlay("bad");
}
}
airplus++;
} else if ((nair < 20) && (!((1 < airclip._currentframe) && (airclip._currentframe < 11)))) {
with (airclip) {
gotoAndPlay("bad");
}
}
}
play();
Frame 6
gotoAndPlay (5);
Frame 7
dnbl = Math.ceil((15 * clev) / (NLev[0][2] * 100));
cntr = 1;
while (dnbl >= cntr) {
eval ("end" + cntr).waitime = (cntr * 10) + 1;
cntr++;
}
if (clev >= (NLev[0][2] * 100)) {
with (finaldrill) {
gotoAndPlay("happy");
}
with (salut) {
gotoAndPlay("win");
}
}
stop();
Frame 8
stop();
Symbol 14 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 2
stop();
Symbol 14 MovieClip Frame 3
stop();
Symbol 14 MovieClip Frame 4
stop();
Symbol 14 MovieClip Frame 5
stop();
Symbol 14 MovieClip Frame 6
play();
Symbol 14 MovieClip Frame 35
with (_root) {
gotoAndPlay("menu");
}
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 22 MovieClip Frame 3
stop();
Symbol 22 MovieClip Frame 4
stop();
Symbol 22 MovieClip Frame 5
stop();
Symbol 22 MovieClip Frame 6
stop();
Symbol 22 MovieClip Frame 7
stop();
Symbol 37 Button
on (rollOver) {
blname = 2;
}
on (rollOut) {
blname = 1;
}
on (release) {
NLev = new Array();
NLev[0] = new Array(4, 4, 5);
NLev[1] = new Array();
NLev[1][1] = new Array(0, 15, 2, 1);
NLev[1][2] = new Array(0, 0, 0, 2, 2, 1);
NLev[1][3] = new Array(1, 1, 2, 2, 2, 5, 5, 4, 4, 4);
NLev[2] = new Array();
NLev[2][1] = new Array(1, 20, 2, 2);
NLev[2][2] = new Array(1, 1, 2, 2, 2);
NLev[2][3] = new Array(1, 1, 2, 2, 2, 5, 5, 4, 4, 4, 3);
NLev[3] = new Array();
NLev[3][1] = new Array(5, 25, 2, 3);
NLev[3][2] = new Array(0, 1, 2, 2, 2, 3);
NLev[3][3] = new Array(1, 1, 2, 2, 2, 3, 3, 3, 4);
NLev[4] = new Array();
NLev[4][1] = new Array(2, 15, 3, 4);
NLev[4][2] = new Array(3, 3, 2, 2, 2, 1);
NLev[4][3] = new Array(1, 1, 5, 5, 5);
NLev[5] = new Array();
NLev[5][1] = new Array(3, 15, 2, 5, 1);
NLev[5][2] = new Array(3, 3, 4, 4, 4, 2);
NLev[5][3] = new Array(1, 1, 2, 2, 2, 4, 4, 3, 5);
play();
aircnt = 22;
}
Symbol 41 Button
on (rollOver) {
blname = 3;
}
on (rollOut) {
blname = 1;
}
on (release) {
NLev = new Array();
NLev[0] = new Array(4, 3, 10);
NLev[1] = new Array();
NLev[1][1] = new Array(1, 20, 2, 6);
NLev[1][2] = new Array(0, 0, 2, 2, 3, 3, 3, 3);
NLev[1][3] = new Array(5, 5, 5, 4, 4, 2, 2, 2, 1, 1);
NLev[2] = new Array();
NLev[2][1] = new Array(2, 25, 3, 5);
NLev[2][2] = new Array(1, 6, 6, 7, 7, 7, 4, 4, 4);
NLev[2][3] = new Array(1, 1, 1, 1, 2, 2, 3, 4, 4);
NLev[3] = new Array();
NLev[3][1] = new Array(1, 15, 4, 4);
NLev[3][2] = new Array(10, 11, 11, 8);
NLev[3][3] = new Array(1, 1, 1, 1, 2, 2, 2, 3, 4, 5);
NLev[4] = new Array();
NLev[4][1] = new Array(2, 20, 2, 3, 1);
NLev[4][2] = new Array(0, 2, 2, 3, 3, 3, 3, 3, 3, 12);
NLev[4][3] = new Array(2, 2, 2, 3, 3, 3, 4, 4, 4, 1, 6);
NLev[5] = new Array();
NLev[5][1] = new Array(5, 25, 3, 2);
NLev[5][2] = new Array(4, 5, 5, 5, 9, 9, 9, 9, 9, 14, 14, 14);
NLev[5][3] = new Array(3, 3, 4);
NLev[6] = new Array();
NLev[6][1] = new Array(3, 15, 4, 1);
NLev[6][2] = new Array(10, 10, 11, 11, 11, 13, 13, 13, 13);
NLev[6][3] = new Array(1, 1, 1, 2, 2, 2, 3, 4, 6);
NLev[7] = new Array();
NLev[7][1] = new Array(5, 20, 2, 6);
NLev[7][2] = new Array(12, 12, 12, 3, 3, 3, 2, 2);
NLev[7][3] = new Array(1, 2, 3, 4, 5, 1, 3, 1, 3);
NLev[8] = new Array();
NLev[8][1] = new Array(6, 25, 2, 5, 1);
NLev[8][2] = new Array(5, 5, 9, 9, 9, 4, 4, 14, 14, 14);
NLev[8][3] = new Array(1, 1, 1, 2, 2, 4, 4, 6);
NLev[9] = new Array();
NLev[9][1] = new Array(2, 15, 3, 4);
NLev[9][2] = new Array(8, 10, 11, 13);
NLev[9][3] = new Array(2, 2, 3, 3, 3, 4, 5);
NLev[10] = new Array();
NLev[10][1] = new Array(6, 30, 1, 3);
NLev[10][2] = new Array(12, 12, 12, 2, 2, 3, 3, 3, 0, 0);
NLev[10][3] = new Array(1, 2, 3, 4, 5, 6, 1, 1, 5, 5);
play();
aircnt = 20;
}
Symbol 45 Button
on (rollOver) {
blname = 4;
}
on (rollOut) {
blname = 1;
}
on (release) {
NLev = new Array();
NLev[0] = new Array(4, 3, 20);
NLev[1] = new Array();
NLev[1][1] = new Array(1, 20, 2, 1);
NLev[1][2] = new Array(0, 2, 2, 3, 3, 3);
NLev[1][3] = new Array(6, 5, 4, 4, 4, 3, 3, 3);
NLev[2] = new Array();
NLev[2][1] = new Array(2, 25, 3, 2);
NLev[2][2] = new Array(1, 1, 6, 6, 6, 7, 7, 7, 4, 4);
NLev[2][3] = new Array(1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5);
NLev[3] = new Array();
NLev[3][1] = new Array(1, 30, 4, 3);
NLev[3][2] = new Array(8, 8, 8, 8, 10, 10, 11);
NLev[3][3] = new Array(1, 4, 5, 6, 4, 4, 5, 5, 6);
NLev[4] = new Array();
NLev[4][1] = new Array(2, 15, 2, 4);
NLev[4][2] = new Array(0, 2, 3, 3, 3, 12);
NLev[4][3] = new Array(1, 1, 1, 3, 3, 4, 4, 4, 4, 5, 2);
NLev[5] = new Array();
NLev[5][1] = new Array(3, 25, 2, 5, 1);
NLev[5][2] = new Array(6, 4, 5, 5, 7, 7);
NLev[5][3] = new Array(1, 1, 1, 3, 4, 4, 4, 5, 5, 6, 6);
NLev[6] = new Array();
NLev[6][1] = new Array(5, 30, 3, 6);
NLev[6][2] = new Array(8, 8, 10, 10, 11, 11, 13);
NLev[6][3] = new Array(1, 2, 3, 4, 5);
NLev[7] = new Array();
NLev[7][1] = new Array(3, 20, 1, 1);
NLev[7][2] = new Array(0, 2, 2, 3, 3, 13);
NLev[7][3] = new Array(2, 2, 2, 2, 3);
NLev[8] = new Array();
NLev[8][1] = new Array(5, 25, 2, 2);
NLev[8][2] = new Array(5, 5, 9, 9, 14, 14, 14, 4, 4, 4);
NLev[8][3] = new Array(1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 5);
NLev[9] = new Array();
NLev[9][1] = new Array(4, 30, 3, 3);
NLev[9][2] = new Array(10, 10, 11, 11, 13, 13, 13);
NLev[9][3] = new Array(2, 3, 4, 5, 6, 2, 2, 3, 3, 4, 4, 4, 5);
NLev[10] = new Array();
NLev[10][1] = new Array(6, 15, 1, 4);
NLev[10][2] = new Array(0, 0, 2, 2, 3, 3, 3, 12);
NLev[10][3] = new Array(1, 1, 1, 2, 2, 2, 3, 4);
NLev[11] = new Array();
NLev[11][1] = new Array(4, 25, 2, 5, 1);
NLev[11][2] = new Array(3, 3, 3, 3, 3, 3, 2, 2, 0);
NLev[11][3] = new Array(1, 2, 3, 4, 5, 6, 1, 1, 1, 2, 2, 4, 4, 5, 6);
NLev[12] = new Array();
NLev[12][1] = new Array(6, 30, 2, 6);
NLev[12][2] = new Array(1, 6, 6, 7, 7, 4, 4, 4, 4);
NLev[12][3] = new Array(1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5);
NLev[13] = new Array();
NLev[13][1] = new Array(7, 20, 2, 1);
NLev[13][2] = new Array(7, 7, 6, 6, 14, 14, 14, 4, 4, 4);
NLev[13][3] = new Array(1, 2, 3, 4, 5, 6, 1, 2, 2, 3, 4, 4);
NLev[14] = new Array();
NLev[14][1] = new Array(8, 25, 2, 2, 1);
NLev[14][2] = new Array(6, 4, 4, 5, 5, 9, 9, 9, 14, 14, 14);
NLev[14][3] = new Array(1, 2, 3, 4, 5, 2, 2, 2, 4, 4, 4);
NLev[15] = new Array();
NLev[15][1] = new Array(7, 30, 2, 3);
NLev[15][2] = new Array(9, 9, 9, 5, 4, 10);
NLev[15][3] = new Array(1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 6, 6, 6);
NLev[16] = new Array();
NLev[16][1] = new Array(8, 15, 3, 4);
NLev[16][2] = new Array(7, 10, 10, 11, 13, 13, 13);
NLev[16][3] = new Array(2, 2, 2, 3, 4, 4, 4);
NLev[17] = new Array();
NLev[17][1] = new Array(9, 25, 3, 5);
NLev[17][2] = new Array(13, 13, 13, 11, 11, 10, 10);
NLev[17][3] = new Array(1, 2, 3, 4, 5, 6, 1, 1, 1, 4, 4, 4, 6, 6, 6);
NLev[18] = new Array();
NLev[18][1] = new Array(4, 30, 2, 6, 1);
NLev[18][2] = new Array(10, 10, 11, 11, 8, 8, 8, 8, 8);
NLev[18][3] = new Array(1, 1, 1, 2, 2, 2, 4, 4, 4, 5);
NLev[19] = new Array();
NLev[19][1] = new Array(9, 20, 2, 1);
NLev[19][2] = new Array(10, 10, 11, 11, 8, 8, 13);
NLev[19][3] = new Array(1, 1, 1, 2, 2, 2, 3, 3, 3, 6);
NLev[20] = new Array();
NLev[20][1] = new Array(7, 25, 2, 4);
NLev[20][2] = new Array(10, 11, 8, 13, 5);
NLev[20][3] = new Array(1, 2, 3, 4, 5, 1, 2, 3, 5, 1, 2, 3, 5, 2, 3);
play();
aircnt = 17;
}
Symbol 49 Button
on (rollOver) {
blname = 5;
}
on (rollOut) {
blname = 1;
}
on (release) {
NLev = new Array();
NLev[0] = new Array(3, 3, 20);
NLev[1] = new Array();
NLev[1][1] = new Array(2, 40, 2, 1);
NLev[1][2] = new Array(3, 3, 3, 3, 3, 3, 2, 2, 0);
NLev[1][3] = new Array(1, 1, 2, 2, 3, 3, 4, 5);
NLev[2] = new Array();
NLev[2][1] = new Array(3, 21, 2, 2);
NLev[2][2] = new Array(1, 6, 6, 7, 7, 4, 4, 4, 4);
NLev[2][3] = new Array(1, 1, 2, 2, 2, 3, 3, 3, 3, 5);
NLev[3] = new Array();
NLev[3][1] = new Array(2, 30, 2, 3);
NLev[3][2] = new Array(7, 7, 6, 6, 14, 14, 14, 4, 4, 4);
NLev[3][3] = new Array(1, 3, 3, 3, 4, 4, 4, 4, 5, 5);
NLev[4] = new Array();
NLev[4][1] = new Array(3, 40, 2, 4);
NLev[4][2] = new Array(6, 4, 4, 5, 5, 9, 9, 9, 14, 14, 14);
NLev[4][3] = new Array(1, 1, 1, 2, 3, 3, 4, 4, 4, 4, 5);
NLev[5] = new Array();
NLev[5][1] = new Array(5, 16, 2, 5, 1);
NLev[5][2] = new Array(9, 9, 9, 5, 4, 10);
NLev[5][3] = new Array(1, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6);
NLev[6] = new Array();
NLev[6][1] = new Array(6, 30, 3, 6);
NLev[6][2] = new Array(7, 10, 10, 11, 13, 13, 13);
NLev[6][3] = new Array(1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3);
NLev[7] = new Array();
NLev[7][1] = new Array(5, 40, 3, 1);
NLev[7][2] = new Array(13, 13, 13, 11, 11, 10, 10);
NLev[7][3] = new Array(1, 2, 3, 4, 5, 6);
NLev[8] = new Array();
NLev[8][1] = new Array(6, 21, 2, 2);
NLev[8][2] = new Array(10, 10, 11, 11, 8, 8, 8, 8, 8);
NLev[8][3] = new Array(2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5);
NLev[9] = new Array();
NLev[9][1] = new Array(4, 30, 2, 3);
NLev[9][2] = new Array(10, 10, 11, 11, 8, 8, 13);
NLev[9][3] = new Array(1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6);
NLev[10] = new Array();
NLev[10][1] = new Array(7, 40, 2, 4, 1);
NLev[10][2] = new Array(10, 11, 8, 13, 5);
NLev[10][3] = new Array(2, 3, 4, 5, 2, 3, 4, 2, 4, 2, 4);
NLev[11] = new Array();
NLev[11][1] = new Array(4, 16, 1, 5);
NLev[11][2] = new Array(0, 2, 2, 3, 3, 3, 12);
NLev[11][3] = new Array(1, 1, 1, 2, 2, 2, 2, 4, 4, 5, 5);
NLev[12] = new Array();
NLev[12][1] = new Array(7, 30, 2, 6);
NLev[12][2] = new Array(13, 13, 13, 10, 10, 10, 11);
NLev[12][3] = new Array(2, 2, 2, 2, 2, 2, 3, 3, 3, 3);
NLev[13] = new Array();
NLev[13][1] = new Array(8, 40, 1, 1, 1);
NLev[13][2] = new Array(14, 14, 14, 4, 4, 9, 9, 5, 6);
NLev[13][3] = new Array(2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6);
NLev[14] = new Array();
NLev[14][1] = new Array(9, 21, 1, 2, 1);
NLev[14][2] = new Array(10, 10, 11, 11, 11, 8, 8, 8, 8);
NLev[14][3] = new Array(1, 2, 3, 5, 4, 4, 4, 4);
NLev[15] = new Array();
NLev[15][1] = new Array(8, 30, 1, 3);
NLev[15][2] = new Array(0, 2, 2, 3, 3, 3, 12, 12, 12, 12);
NLev[15][3] = new Array(2, 2, 3, 3, 4, 4, 4, 4, 5);
NLev[16] = new Array();
NLev[16][1] = new Array(9, 40, 1, 4);
NLev[16][2] = new Array(4, 5, 6, 7, 9, 14);
NLev[16][3] = new Array(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5);
NLev[17] = new Array();
NLev[17][1] = new Array(4, 16, 1, 5);
NLev[17][2] = new Array(10, 10, 11, 11, 8, 8, 13, 13, 13);
NLev[17][3] = new Array(1, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 5);
NLev[18] = new Array();
NLev[18][1] = new Array(7, 30, 1, 6, 1);
NLev[18][2] = new Array(12, 12, 12, 12, 12, 2, 2, 3, 3);
NLev[18][3] = new Array(1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 3, 1, 2, 4);
NLev[19] = new Array();
NLev[19][1] = new Array(8, 40, 1, 1);
NLev[19][2] = new Array(4, 5, 5, 6, 7, 7, 7, 9, 9, 9, 14, 14);
NLev[19][3] = new Array(1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6);
NLev[20] = new Array();
NLev[20][1] = new Array(9, 21, 1, 4);
NLev[20][2] = new Array(10, 11, 8, 13, 13, 13, 13);
NLev[20][3] = new Array(1, 5, 2, 2, 3, 3, 3, 3, 4, 4);
play();
aircnt = 15;
}
Symbol 53 Button
on (rollOver) {
blname = 6;
}
on (rollOut) {
blname = 1;
}
on (release) {
Bricks = new Array(0, 6, 5, 6, 5, 6, 5);
PLev = new Array();
PLev[1] = new Array(2, 0, 1, 2, 3);
PLev[2] = new Array(2, 1, 2, 3, 6);
PLev[3] = new Array(2, 2, 3, 6, 7);
PLev[4] = new Array(2, 3, 4, 5, 6, 7);
PLev[5] = new Array(2, 2, 3, 5, 7);
PLev[6] = new Array(2, 0, 4, 5, 7, 8);
PLev[7] = new Array(2, 1, 9, 10, 4, 8);
PLev[8] = new Array(2, 1, 11, 14, 9);
PLev[9] = new Array(3, 1, 14, 11, 13);
PLev[10] = new Array(2, 0, 2, 12);
PLev[11] = new Array(2, 10, 11, 13, 8);
PLev[12] = new Array(2, 10, 9, 4, 5, 8);
PLev[13] = new Array(1, 0, 2, 3, 1, 12);
PLev[14] = new Array(2, 10, 1, 11, 6, 7);
PLev[15] = new Array(2, 4, 5, 12, 14, 2);
PLev[16] = new Array(3, 10, 13, 8, 9);
PLev[17] = new Array(2, 14, 4, 5, 10, 13);
PLev[18] = new Array(2, 11, 10, 4, 9, 8, 13);
PLev[19] = new Array(2, 12, 11, 10, 13, 8, 4, 6, 14);
PLev[20] = new Array(1, 0, 2, 3, 6, 12, 9);
NLev = new Array();
NLev[0] = new Array(4, 3, 20);
scntr = 1;
while (20 >= scntr) {
NLev[scntr] = new Array();
NLev[scntr][1] = new Array();
NLev[scntr][2] = new Array();
NLev[scntr][3] = new Array();
NLev[scntr][1][0] = Math.round(scntr / 4) + random(5);
NLev[scntr][1][1] = random(25) + 15;
NLev[scntr][1][2] = PLev[scntr][0];
NLev[scntr][1][3] = random(6) + 1;
brtype = PLev[scntr].length - 1;
bcnt = 0;
while (bcnt < (brtype * 2)) {
NLev[scntr][2][bcnt] = PLev[scntr][random(brtype) + 1];
bcnt++;
}
bcnt = 0;
brtype = Bricks[NLev[scntr][1][3]];
sparam = brtype + random(brtype);
while (sparam >= bcnt) {
NLev[scntr][3][bcnt] = random(Bricks[NLev[scntr][1][3]]) + 1;
bcnt++;
}
scntr++;
}
NLev[5][1][4] = 1;
NLev[10][1][4] = 1;
NLev[14][1][4] = 1;
NLev[18][1][4] = 1;
aircnt = 20;
play();
}
Symbol 57 Button
on (rollOver) {
blname = 7;
}
on (rollOut) {
blname = 1;
}
on (release) {
gotoAndStop (8);
}
Symbol 68 MovieClip Frame 1
play();
Symbol 68 MovieClip Frame 105
gotoAndStop (1);
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 2
play();
Symbol 79 MovieClip Frame 6
gotoAndStop (1);
Symbol 79 MovieClip Frame 7
play();
Symbol 79 MovieClip Frame 11
gotoAndStop (1);
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 2
play();
Symbol 80 MovieClip Frame 6
gotoAndStop (1);
Symbol 80 MovieClip Frame 7
play();
Symbol 80 MovieClip Frame 11
gotoAndStop (1);
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 6
gotoAndStop (1);
Symbol 81 MovieClip Frame 11
gotoAndStop (1);
Symbol 81 MovieClip Frame 16
gotoAndStop (1);
Symbol 81 MovieClip Frame 21
gotoAndStop (1);
Symbol 81 MovieClip Frame 22
with (dr1) {
gotoAndPlay("step");
}
Symbol 81 MovieClip Frame 29
gotoAndStop (1);
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 30
infom.infom = "";
gotoAndStop (1);
Symbol 96 Button
on (release, keyPress "<Enter>") {
function SubsBl(blnum) {
trace((((((((((("Block " + blnum) + " flag ") + Block[blnum][0]) + " col ") + Block[blnum][1]) + " stad ") + Block[blnum][2]) + " cnt ") + Block[blnum][3]) + " param ") + Block[blnum][4]);
trace("COORDS:");
scntr = 0;
blength = Blocks[blnum][1].length;
while (scntr < blength) {
Y = Blocks[blnum][1][scntr];
X = Blocks[blnum][2][scntr];
trace((("Y " + Y) + " X ") + X);
trace("name " + MapN[Y][X]);
scntr++;
}
if (0 < Block[blnum][5]) {
trace("special " + SBlock[Block[blnum][5]]);
}
}
if ((0 < iX) && (0 < iY)) {
blnum = Map[iY][iX];
trace("name on pos " + MapN[iY][iX]);
SubsBl(blnum);
}
if (0 < ibl) {
SubsBl(ibl);
}
if (0 < dbl) {
DelArr.push(dbl);
Block[dbl][0] = 0;
Block[dbl][2] = 2;
}
if ((0 < dX) && (0 < dY)) {
dbl = Map[dY][dX];
DelArr.push(dbl);
Block[dbl][0] = 0;
Block[dbl][2] = 2;
}
}
Symbol 102 Button
on (release) {
downh = Map[drY + 1][drX];
trace((((("driller " + drst) + " down ") + downh) + " stad ") + Block[downh][2]);
}
Symbol 104 Button
on (release) {
trace("move " + MoveArr);
}
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 2
stop();
Symbol 109 MovieClip Frame 3
stop();
Symbol 109 MovieClip Frame 4
stop();
Symbol 112 Button
on (release, keyPress "<Enter>") {
trace(eval (ibl));
}
Symbol 178 Button
on (release) {
Y = drY - 7;
while ((drY + 7) >= Y) {
X = 1;
while (10 >= X) {
dstname = MapN[Y][X];
if (0 < MapL[dstname]) {
FreeLev.push(MapL[dstname]);
MapL[dstname] = 0;
removeMovieClip(dstname);
}
X++;
}
Y++;
}
curlev++;
if (NLev[0][2] < curlev) {
removeMovieClip("dr");
gotoAndPlay (7);
} else {
nl.nextlev = curlev * 100;
gotoAndPlay (4);
clev = (Math.floor(clev / 100) * 100) + 100;
}
}
Symbol 182 Button
on (release) {
clife++;
}
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 11
stop();
Symbol 189 MovieClip Frame 21
stop();
Symbol 200 Button
on (release) {
Y = drY - 7;
while ((drY + 7) >= Y) {
X = 1;
while (10 >= X) {
dstname = MapN[Y][X];
if (0 < MapL[dstname]) {
FreeLev.push(MapL[dstname]);
MapL[dstname] = 0;
removeMovieClip(dstname);
}
X++;
}
Y++;
}
pauz._x = -300;
paused = 0;
removeMovieClip("dr");
gotoAndPlay (7);
}
Symbol 204 Button
on (release) {
if (paused == 0) {
_root.stop();
paused = 1;
_root.pauz._x = 210;
} else {
_root.play();
paused = 0;
_root.pauz._x = -300;
}
}
Symbol 208 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 2
play();
Symbol 208 MovieClip Frame 65
gotoAndPlay (2);
Symbol 211 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 211 MovieClip Frame 10
stop();
Symbol 212 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 212 MovieClip Frame 10
stop();
Symbol 213 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 213 MovieClip Frame 10
stop();
Symbol 215 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 215 MovieClip Frame 10
stop();
Symbol 216 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 216 MovieClip Frame 10
stop();
Symbol 218 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 218 MovieClip Frame 10
stop();
Symbol 219 MovieClip Frame 2
if (0 < waitime) {
if (2 < waitime) {
waitime--;
gotoAndPlay (1);
}
} else {
stop();
}
Symbol 219 MovieClip Frame 10
stop();
Symbol 237 MovieClip Frame 135
gotoAndPlay (1);
Symbol 237 MovieClip Frame 265
gotoAndPlay (136);
Symbol 241 Button
on (release) {
clev = 0;
curlev = 1;
airc._x = 603;
nair = 100;
clife = 3;
gotoAndPlay (3);
}
Symbol 245 Button
on (release) {
clev = 0;
curlev = 1;
airc._x = 603;
nair = 100;
clife = 3;
gotoAndPlay (2);
}
Symbol 247 Button
on (release) {
gotoAndPlay (2);
}
Symbol 252 Button
on (release) {
getURL ("mailto:maxim@mail15.com");
}