Frame 1
ifFrameLoaded (263) {
loadVariablesNum ("http://www.jellygames.com/menucounter.php?" + random[99999], 0);
gotoAndPlay (241);
}
Frame 240
gotoAndPlay (1);
Frame 241
doteat = new Sound(_root);
doteat.attachSound("doteat");
error = new Sound(_root);
error.attachSound("error1");
introm = new Sound(_root);
introm.attachSound("theme");
pacwalk = new Sound(_root);
pacwalk.attachSound("pacwalk");
fruiteatsound = new Sound(_root);
fruiteatsound.attachSound("fruiteatsound");
blueghostsound = new Sound(_root);
blueghostsound.attachSound("blueghostsound");
ghosteatsound = new Sound(_root);
ghosteatsound.attachSound("ghosteatsound");
fruitstepsound = new Sound(_root);
fruitstepsound.attachSound("fruitstepsound");
bonussound = new Sound(_root);
bonussound.attachSound("bonussound");
ty = 450;
frank = 1;
Frame 242
setProperty("title", _y , ty);
ty = ty - 3;
if (150 >= ty) {
ty = 150;
}
Frame 243
gotoAndPlay (242);
Frame 244
if ((frank == 1) or (frank == 2)) {
maze = new Array(5, 1, 1, 1, 1, 3, 0, 0, 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 5, 1, 1, 1, 1, 3, 2, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 6, 1, 10, 1, 1, 11, 1, 1, 9, 1, 1, 10, 1, 1, 10, 1, 1, 9, 1, 1, 11, 1, 1, 10, 1, 4, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0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, 1, 3, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 5, 1, 4, 0, 0, 6, 1, 1, 10, 1, 1, 10, 1, 1, 4, 0, 0, 6, 1, 3, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 6, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 6, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 4);
}
a = 0;
ghostpatha = new Array();
ghostpathb = new Array();
ghostpathc = new Array();
ghostpathd = new Array();
dots = new Array();
nod = 0;
nodd = 0;
Frame 245
b = 0;
while (28 >= b) {
if ((11 >= maze[a + (b * 26)]) and (maze[a + (b * 26)] >= 1)) {
c = 1;
if (maze[a + (b * 26)] == 2) {
c = 2;
}
duplicateMovieClip (c, "dot" + (a + (26 * b)), 1000 + (a + (26 * b)));
dots[nodd] = a + (26 * b);
dots[nodd + 1] = 10 + (a * 10);
dots[nodd + 2] = 10 + (b * 10);
nodd = nodd + 3;
nod = nod + 1;
}
b++;
}
a = a + 1;
if (a >= 26) {
gotoAndPlay (253);
}
Frame 246
gotoAndPlay (245);
Frame 247
if (frank == 1) {
duplicateMovieClip ("fruitind1", "fruit1", 4801);
duplicateMovieClip ("lunch1", "lunch", 6700);
pacspeed = 1.6;
gspeed = pacspeed - 0.15;
bluetime = 45;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(8, 17, 8, 17);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(17, 8, 17, 8);
fdir = new Array(1, 1, -1, -1);
fval = 100;
dotseaten = 0;
score = 0;
extra = 10000;
gsval = new Array(0, 200, 400, 600, 1600);
lives = -37;
setProperty(life, _x , lives);
setProperty("fruitind1", _x , 263);
setProperty("fruitind1", _y , 312);
}
if (frank == 2) {
removeMovieClip("fruit1");
duplicateMovieClip ("fruitind2", "fruit1", 4801);
pacspeed = 1.65;
gspeed = pacspeed - 0.15;
bluetime = 43;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(8, 17, 8, 17);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(17, 8, 17, 8);
fdir = new Array(1, 1, -1, -1);
fval = 200;
setProperty("fruitind2", _x , 248);
setProperty("fruitind2", _y , 312);
}
if (frank == 3) {
removeMovieClip("fruit1");
duplicateMovieClip ("fruitind3", "fruit1", 4801);
pacspeed = 1.7;
gspeed = pacspeed - 0.15;
bluetime = 41;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(1, 23, 1, 23);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(23, 1, 23, 1);
fdir = new Array(1, 1, -1, -1);
fval = 500;
setProperty("fruitind3", _x , 233);
setProperty("fruitind3", _y , 312);
}
if (frank == 4) {
removeMovieClip("fruit1");
duplicateMovieClip ("fruitind4", "fruit1", 4801);
pacspeed = 1.75;
gspeed = pacspeed - 0.15;
bluetime = 39;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(1, 23, 1, 23);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(23, 1, 23, 1);
fdir = new Array(1, 1, -1, -1);
fval = 700;
setProperty("fruitind4", _x , 218);
setProperty("fruitind4", _y , 312);
}
if (frank == 5) {
removeMovieClip("fruit1");
duplicateMovieClip ("fruitind5", "fruit1", 4801);
pacspeed = 1.8;
gspeed = pacspeed - 0.15;
bluetime = 37;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(1, 23, 1, 23);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(23, 1, 23, 1);
fdir = new Array(1, 1, -1, -1);
fval = 1000;
setProperty("fruitind5", _x , 203);
setProperty("fruitind5", _y , 312);
}
if (frank == 6) {
removeMovieClip("fruit1");
duplicateMovieClip ("fruitind6", "fruit1", 4801);
pacspeed = 1.85;
gspeed = pacspeed - 0.15;
bluetime = 35;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(9, 9, 9, 9);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(9, 9, 9, 9);
fdir = new Array(1, 1, -1, -1);
fval = 2000;
setProperty("fruitind6", _x , 188);
setProperty("fruitind6", _y , 312);
}
if (frank == 7) {
removeMovieClip("fruit1");
duplicateMovieClip ("fruitind7", "fruit1", 4801);
pacspeed = 1.9;
gspeed = pacspeed - 0.15;
bluetime = 33;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(9, 9, 9, 9);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(9, 9, 9, 9);
fdir = new Array(1, 1, -1, -1);
fval = 5000;
setProperty("fruitind7", _x , 173);
setProperty("fruitind7", _y , 312);
}
if (frank == 8) {
removeMovieClip("fruit1");
pacspeed = 1.95;
gspeed = pacspeed - 0.15;
bluetime = 32;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(9, 9, 9, 9);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(9, 9, 9, 9);
fdir = new Array(1, 1, -1, -1);
a = 1;
while (7 >= a) {
duplicateMovieClip ("rf" + a, "rrf" + a, 6850 + a);
duplicateMovieClip ("rfv" + a, "rrfv" + a, 6860 + a);
a++;
}
rfval = new Array(0, 100, 200, 500, 700, 1000, 2000, 5000);
duplicateMovieClip ("lunch1", "funch", 6870);
setProperty("funch", _xscale , 200);
setProperty("funch", _yscale , 200);
}
if (frank == 9) {
removeMovieClip("fruit1");
pacspeed = 2;
gspeed = pacspeed - 0.15;
bluetime = 30;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(9, 9, 9, 9);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(9, 9, 9, 9);
fdir = new Array(1, 1, -1, -1);
}
if (frank == 10) {
pacspeed = 2.05;
gspeed = pacspeed - 0.15;
bluetime = 28;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(13, 16, 13, 16);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(13, 16, 13, 16);
fdir = new Array(1, 1, -1, -1);
fval = 500;
}
if (frank == 11) {
pacspeed = 2.1;
gspeed = pacspeed - 0.15;
bluetime = 25;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(13, 16, 13, 16);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(13, 16, 13, 16);
fdir = new Array(1, 1, -1, -1);
fval = 500;
}
if (frank == 12) {
pacspeed = 2.15;
gspeed = pacspeed - 0.15;
bluetime = 20;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(13, 16, 13, 16);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(13, 16, 13, 16);
fdir = new Array(1, 1, -1, -1);
fval = 500;
}
if (frank == 13) {
pacspeed = 2.2;
gspeed = pacspeed - 0.15;
bluetime = 15;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(13, 16, 13, 16);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(13, 16, 13, 16);
fdir = new Array(1, 1, -1, -1);
fval = 500;
}
if (frank == 14) {
pacspeed = 2.5;
gspeed = pacspeed - 0.15;
bluetime = 10;
fstartx = new Array(1, 1, 26, 26);
fstarty = new Array(13, 16, 13, 16);
fendx = new Array(26, 26, 1, 1);
fendy = new Array(13, 16, 13, 16);
fdir = new Array(1, 1, -1, -1);
fval = 500;
dotseaten = 0;
fss = 0;
gscore = 1;
}
x = 14;
y = 23;
xx = 0;
yy = 0;
xtag = 0;
ytag = 0;
mult1 = 0.9 + (random(20) / 100);
mult2 = 0.9 + (random(20) / 100);
mult3 = 0.9 + (random(20) / 100);
mult4 = 0.9 + (random(20) / 100);
fm = 1;
fcd = 0;
timer = 0;
path1 = 100;
path2 = 100;
path3 = 100;
path4 = 100;
gxa = 14;
gya = 13;
gxxa = -1;
gyya = 0;
gxb = 11;
gyb = 13;
gxxb = 1;
gyyb = 0;
gxc = 15;
gyc = 13;
gxxc = -1;
gyyc = 0;
gxd = 13;
gyd = 13;
gxxd = -1;
gyyd = 0;
gamode = 4;
gbmode = 4;
gcmode = 4;
gdmode = 4;
gac = 10;
gbc = 50;
gcc = 30;
gdc = 40;
s1 = 0;
s2 = 0;
s3 = 0;
s4 = 0;
t = 0;
tx = 1;
ty = 1;
rev = 0;
cond = 0;
tt = 1;
flip = 1;
ross = 1;
pacpathx = new Array();
pacpathy = new Array();
ghostpathf = new Array();
ghostpatha = new Array();
ghostpathb = new Array();
ghostpathc = new Array();
ghostpathd = new Array();
gxxf = 0;
gxxy = 0;
fruitactive = 0;
fruitcall = 20;
fruitcount = 0;
dotseaten = 0;
fss = 0;
gscore = 1;
dummy = 1;
setProperty("frame" + frank, _y , 149);
Frame 249
ppx = (x * 10) + (t * xx);
ppy = (y * 10) + (yy * t);
aax = (gxa * 10) + (s1 * gxxa);
aay = (gya * 10) + (s1 * gyya);
bbx = ((gxb * 10) + (s2 * gxxb)) + 1;
bby = (gyb * 10) + (s2 * gyyb);
ccx = ((gxc * 10) + (s3 * gxxc)) - 1;
ccy = (gyc * 10) + (s3 * gyyc);
ddx = (gxd * 10) + (s4 * gxxd);
ddy = (gyd * 10) + (s4 * gyyd);
setProperty("lunch", _x , ppx);
setProperty("lunch", _y , ppy);
if (lunch.hitTest(aax, aay, false) == true) {
if (gamode == 1) {
gotoAndPlay (259);
}
if (gamode == 2) {
gamode = 3;
mult1 = 2;
setProperty("bg1", _y , -200);
tt = 2;
ghosteatsound.start();
score = score + gsval[gscore];
gscore = gscore + 1;
setProperty("gs" + (gscore - 1), _x , aax);
setProperty("gs" + (gscore - 1), _y , aay);
l = 0;
while (10000 >= l) {
dummy = dummy + 1;
l++;
}
eaten = 0;
}
}
if (lunch.hitTest(bbx, bby, false) == true) {
if (gbmode == 1) {
gotoAndPlay (259);
}
if (gbmode == 2) {
gbmode = 3;
mult2 = 2;
setProperty("bg2", _y , -200);
tt = 2;
ghosteatsound.start();
score = score + gsval[gscore];
gscore = gscore + 1;
setProperty("gs" + (gscore - 1), _x , bbx);
setProperty("gs" + (gscore - 1), _y , bby);
l = 0;
while (10000 >= l) {
dummy = dummy + 1;
l++;
}
eaten = 0;
}
}
if (lunch.hitTest(ccx, ccy, false) == true) {
if (gcmode == 1) {
gotoAndPlay (259);
}
if (gcmode == 2) {
gcmode = 3;
mult3 = 2;
setProperty("bg3", _y , -200);
tt = 2;
ghosteatsound.start();
score = score + gsval[gscore];
gscore = gscore + 1;
setProperty("gs" + (gscore - 1), _x , ccx);
setProperty("gs" + (gscore - 1), _y , ccy);
l = 0;
while (10000 >= l) {
dummy = dummy + 1;
l++;
}
eaten = 0;
}
}
if (lunch.hitTest(ddx, ddy, false) == true) {
if (gdmode == 1) {
gotoAndPlay (259);
}
if (gdmode == 2) {
gdmode = 3;
mult4 = 2;
setProperty("bg4", _y , -200);
tt = 2;
ghosteatsound.start();
score = score + gsval[gscore];
gscore = gscore + 1;
setProperty("gs" + (gscore - 1), _x , ddx);
setProperty("gs" + (gscore - 1), _y , ddy);
l = 0;
while (10000 >= l) {
dummy = dummy + 1;
l++;
}
eaten = 0;
}
}
eaten = eaten + 1;
if (eaten == 20) {
setProperty("gs1", _y , -200);
setProperty("gs2", _y , -200);
setProperty("gs3", _y , -200);
setProperty("gs4", _y , -200);
}
if (tt == 1) {
setProperty("p1", _x , ppx);
setProperty("p1", _y , ppy);
setProperty("p2", _y , -400);
}
if (tt == 2) {
setProperty("p2", _x , ppx);
setProperty("p2", _y , ppy);
setProperty("p1", _y , -400);
tt = 1;
}
setProperty("pl1", _x , (aax - 3) + gxxa);
if (gyya == -1) {
setProperty("pl1", _y , (aay - 3) + gyya);
} else {
setProperty("pl1", _y , (aay - 2) + gyya);
}
setProperty("pl2", _x , (bbx - 3) + gxxb);
if (gyyb == -1) {
setProperty("pl2", _y , (bby - 3) + gyyb);
} else {
setProperty("pl2", _y , (bby - 2) + gyyb);
}
setProperty("pl3", _x , (ccx - 3) + gxxc);
if (gyyc == -1) {
setProperty("pl3", _y , (ccy - 3) + gyyc);
} else {
setProperty("pl3", _y , (ccy - 2) + gyyc);
}
setProperty("pl4", _x , (ddx - 3) + gxxd);
if (gyyd == -1) {
setProperty("pl4", _y , (ddy - 3) + gyyd);
} else {
setProperty("pl4", _y , (ddy - 2) + gyyd);
}
if (((gamode == 1) or (gamode == 4)) or (gamode == 5)) {
setProperty("g1", _x , aax);
setProperty("g1", _y , aay);
if (flip == 1) {
setProperty("g1", _xscale , -100);
}
if (flip == 2) {
setProperty("g1", _xscale , 100);
}
}
if (((gbmode == 1) or (gbmode == 4)) or (gbmode == 5)) {
setProperty("g2", _x , bbx);
setProperty("g2", _y , bby);
if (flip == 1) {
setProperty("g2", _xscale , -100);
}
if (flip == 2) {
setProperty("g2", _xscale , 100);
}
}
if (((gcmode == 1) or (gcmode == 4)) or (gcmode == 5)) {
setProperty("g3", _x , ccx);
setProperty("g3", _y , ccy);
if (flip == 1) {
setProperty("g3", _xscale , -100);
}
if (flip == 2) {
setProperty("g3", _xscale , 100);
}
}
if (((gdmode == 1) or (gdmode == 4)) or (gdmode == 5)) {
setProperty("g4", _x , ddx);
setProperty("g4", _y , ddy);
if (flip == 1) {
setProperty("g4", _xscale , -100);
}
if (flip == 2) {
setProperty("g4", _xscale , 100);
}
}
if (gamode == 2) {
setProperty("bg1", _x , aax);
setProperty("bg1", _y , aay);
if (flip == 1) {
setProperty("bg1", _xscale , -100);
}
if (flip == 2) {
setProperty("bg1", _xscale , 100);
}
}
if (gbmode == 2) {
setProperty("bg2", _x , bbx);
setProperty("bg2", _y , bby);
if (flip == 1) {
setProperty("bg2", _xscale , -100);
}
if (flip == 2) {
setProperty("bg2", _xscale , 100);
}
}
if (gcmode == 2) {
setProperty("bg3", _x , ccx);
setProperty("bg3", _y , ccy);
if (flip == 1) {
setProperty("bg3", _xscale , -100);
}
if (flip == 2) {
setProperty("bg3", _xscale , 100);
}
}
if (gdmode == 2) {
setProperty("bg4", _x , ddx);
setProperty("bg4", _y , ddy);
if (flip == 1) {
setProperty("bg4", _xscale , -100);
}
if (flip == 2) {
setProperty("bg4", _xscale , 100);
}
}
flip = flip + 1;
if (flip >= 3) {
flip = 1;
}
if (gamode == 3) {
setProperty("eg1", _x , aax);
setProperty("eg1", _y , aay);
}
if (gbmode == 3) {
setProperty("eg2", _x , bbx);
setProperty("eg2", _y , bby);
}
if (gcmode == 3) {
setProperty("eg3", _x , ccx);
setProperty("eg3", _y , ccy);
}
if (gdmode == 3) {
setProperty("eg4", _x , ddx);
setProperty("eg4", _y , ddy);
}
t = t + pacspeed;
if (t >= 10) {
cond = cond - 1;
t = 0;
x = x + xx;
y = y + yy;
xq = maze[(x - 1) + (26 * (y - 1))];
if (10 >= cond) {
pacwalk.start();
}
if (xx == -1) {
if ((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 25)) or (xq == 26)) or (xq == 27)) {
xx = 0;
}
}
if (xx == 1) {
if ((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 23)) or (xq == 24)) or (xq == 28)) {
xx = 0;
}
}
if (yy == -1) {
if ((((((xq == 3) or (xq == 5)) or (xq == 10)) or (xq == 23)) or (xq == 25)) or (xq == 30)) {
yy = 0;
}
}
if (yy == 1) {
if ((((((xq == 4) or (xq == 6)) or (xq == 9)) or (xq == 24)) or (xq == 26)) or (xq == 29)) {
yy = 0;
}
}
if (ytag == 1) {
if (((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) or (ty == -1)) {
yy = 1;
xx = 0;
ty = 1;
xtag = 0;
ytag = 0;
setProperty("p1", _rotation , 270);
setProperty("p2", _rotation , 270);
setProperty("p1", _xscale , 100);
setProperty("p2", _xscale , 100);
}
}
if (ytag == -1) {
if (((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) or (ty == -1)) {
yy = -1;
xx = 0;
ty = 1;
xtag = 0;
ytag = 0;
setProperty("p1", _rotation , 90);
setProperty("p2", _rotation , 90);
setProperty("p1", _xscale , 100);
setProperty("p2", _xscale , 100);
}
}
if (xtag == -1) {
if (((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) or (tx == -1)) {
xx = -1;
yy = 0;
tx = 1;
xtag = 0;
ytag = 0;
setProperty("p1", _rotation , 0);
setProperty("p2", _rotation , 0);
setProperty("p1", _xscale , 100);
setProperty("p2", _xscale , 100);
}
}
if (xtag == 1) {
if (((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) or (tx == -1)) {
xx = 1;
yy = 0;
tx = 1;
xtag = 0;
ytag = 0;
setProperty("p1", _rotation , 0);
setProperty("p2", _rotation , 0);
setProperty("p1", _xscale , -100);
setProperty("p2", _xscale , -100);
}
}
if ((xq >= 1) and (11 >= xq)) {
maze[(x - 1) + (26 * (y - 1))] = xq + 20;
removeMovieClip("dot" + ((x - 1) + (26 * (y - 1))));
doteat.start();
tt = 2;
dotseaten = dotseaten + 1;
score = score + 10;
}
if (xq == 2) {
if (gamode == 1) {
gamode = 2;
}
if (gbmode == 1) {
gbmode = 2;
}
if (gcmode == 1) {
gcmode = 2;
}
if (gdmode == 1) {
gdmode = 2;
}
setProperty("g1", _y , -200);
setProperty("g2", _y , -200);
setProperty("g3", _y , -200);
setProperty("g4", _y , -200);
path1 = path1 + 100;
path2 = path2 + 100;
path3 = path3 + 100;
path4 = path4 + 100;
blueghostsound.start();
gscore = 1;
cond = bluetime;
mult1 = 0.6;
mult2 = 0.6;
mult3 = 0.6;
mult4 = 0.6;
}
if (tunnel3.hitTest(ppx, ppy, false) == true) {
x = 1;
}
if (tunnel1.hitTest(ppx, ppy, false) == true) {
x = 26;
}
if (frank >= 8) {
if (funch.hitTest(lunch) == true) {
setProperty("rrf" + fchoice, _y , -550);
setProperty("funch", _y , -550);
fruiteatsound.start();
score = score + fval;
setProperty("rrfv" + fchoice, _x , gxf * 10);
setProperty("rrfv" + fchoice, _y , gyf * 10);
fcd = 10;
fruitactive = 0;
tt = 2;
fruitcall = dotseaten + 30;
fruitcount = fruitcount + 1;
if (fruitcount == 2) {
fruitcall = 0;
}
}
if (dotseaten == fruitcall) {
fruitactive = 1;
pick = random(4);
fchoice = 1 + random(7);
fval = rfval[fchoice];
gxf = fstartx[pick];
gyf = fstarty[pick];
gxg = fendx[pick];
gyg = fendy[pick];
gyyf = 0;
gxxf = fdir[pick];
fruitcall = 0;
}
fss = fss + 1;
path = path + 1;
if (fss >= 3) {
fss = 0;
}
if ((fruitactive == 1) and (fss == 0)) {
fruitstepsound.start();
gxf = gxf + gxxf;
gyf = gyf + gyyf;
ghostpathf[gxf + (26 * gyf)] = path;
setProperty("rrf" + fchoice, _x , gxf * 10);
setProperty("rrf" + fchoice, _y , gyf * 10);
setProperty("funch", _x , gxf * 10);
setProperty("funch", _y , gyf * 10);
if ((gxf == gxg) and (gyf == gyg)) {
setProperty("rrf" + fchoice, _y , -550);
setProperty("funch", _y , -550);
fcd = 10;
fruitactive = 0;
tt = 2;
fruitcall = dotseaten + 30;
fruitcount = fruitcount + 1;
if (fruitcount == 20) {
fruitcall = 0;
}
}
xq = maze[(gxf - 1) + (26 * (gyf - 1))];
if ((((((((((((((((((xq == 3) or (xq == 4)) or (xq == 5)) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
gyyf = 0;
gxxf = 0;
xqd = ghostpathf[gxf + (26 * (gyf + 1))];
xqu = ghostpathf[gxf + (26 * (gyf - 1))];
xql = ghostpathf[(gxf - 1) + (26 * gyf)];
xqr = ghostpathf[(gxf + 1) + (26 * gyf)];
down = 0;
up = 0;
right = 0;
left = 0;
if ((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) {
down = 1;
}
if ((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) {
up = 1;
}
if ((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
right = 1;
}
if ((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
left = 1;
}
ppp = path - 14;
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyf < gyg)) {
gyyf = 1;
gxxf = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (gyg < gyf)) {
gyyf = -1;
gxxf = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxf < gxg)) {
gxxf = 1;
gyyf = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (gxg < gxf)) {
gxxf = -1;
gyyf = 0;
change = 1;
}
tom = 0;
if ((gxxf == 0) and (gyyf == 0)) {
tom = 1;
}
if (tom == 1) {
if (((change == 0) and (xqd < ppp)) and (down == 1)) {
gyyf = 1;
gxxf = 0;
change = random(2);
}
if (((change == 0) and (xqr < ppp)) and (right == 1)) {
gxxf = 1;
gyyf = 0;
change = random(2);
}
if (((change == 0) and (xqu < ppp)) and (up == 1)) {
gyyf = -1;
gxxf = 0;
change = random(2);
}
if (((change == 0) and (xql < ppp)) and (left == 1)) {
gxxf = -1;
gyyf = 0;
change = random(2);
}
}
}
}
if (fcd >= 1) {
fcd = fcd - 1;
if (fcd == 0) {
setProperty("rrfv" + fchoice, _y , -200);
}
}
}
if (7 >= frank) {
if ((fruit1.hitTest(p1) == true) or (fruit1.hitTest(p2) == true)) {
setProperty("fruit1", _y , -550);
fruiteatsound.start();
score = score + fval;
setProperty("fscore" + fval, _x , gxf * 10);
setProperty("fscore" + fval, _y , gyf * 10);
fcd = 10;
tt = 2;
fruitcall = dotseaten + 30;
fruitactive = 0;
fruitcount = fruitcount + 1;
if (fruitcount == 2) {
fruitcall = 0;
}
}
if (dotseaten == fruitcall) {
fruitactive = 1;
pick = random(4);
gxf = fstartx[pick];
gyf = fstarty[pick];
gxg = fendx[pick];
gyg = fendy[pick];
gyyf = 0;
gxxf = fdir[pick];
fruitcall = 0;
}
fss = fss + 1;
path = path + 1;
if (fss >= 3) {
fss = 0;
}
if ((fruitactive == 1) and (fss == 0)) {
fruitstepsound.start();
gxf = gxf + gxxf;
gyf = gyf + gyyf;
ghostpathf[gxf + (26 * gyf)] = path;
gxftest = gxf * 10;
gyftest = gyf * 10;
setProperty("fruit1", _x , gxftest);
setProperty("fruit1", _y , gyftest);
xq = maze[(gxf - 1) + (26 * (gyf - 1))];
if (tunnel3.hitTest(gxftest, gyftest, false) == true) {
gxf = 1;
}
if (tunnel1.hitTest(gxftest, gyftest, false) == true) {
gxf = 26;
}
if ((((((((((((((((((xq == 3) or (xq == 4)) or (xq == 5)) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
gyyf = 0;
gxxf = 0;
xqd = ghostpathf[gxf + (26 * (gyf + 1))];
xqu = ghostpathf[gxf + (26 * (gyf - 1))];
xql = ghostpathf[(gxf - 1) + (26 * gyf)];
xqr = ghostpathf[(gxf + 1) + (26 * gyf)];
down = 0;
up = 0;
right = 0;
left = 0;
if ((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) {
down = 1;
}
if ((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) {
up = 1;
}
if ((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
right = 1;
}
if ((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
left = 1;
}
ppp = path - 14;
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyf < gyg)) {
gyyf = 1;
gxxf = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (gyg < gyf)) {
gyyf = -1;
gxxf = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxf < gxg)) {
gxxf = 1;
gyyf = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (gxg < gxf)) {
gxxf = -1;
gyyf = 0;
change = 1;
}
tom = 0;
if ((gxxf == 0) and (gyyf == 0)) {
tom = 1;
}
if (tom == 1) {
if (((change == 0) and (xqd < ppp)) and (down == 1)) {
gyyf = 1;
gxxf = 0;
change = random(2);
}
if (((change == 0) and (xqr < ppp)) and (right == 1)) {
gxxf = 1;
gyyf = 0;
change = random(2);
}
if (((change == 0) and (xqu < ppp)) and (up == 1)) {
gyyf = -1;
gxxf = 0;
change = random(2);
}
if (((change == 0) and (xql < ppp)) and (left == 1)) {
gxxf = -1;
gyyf = 0;
change = random(2);
}
}
}
}
if (fcd >= 1) {
fcd = fcd - 1;
if (fcd == 0) {
setProperty("fscore" + fval, _y , -200);
}
}
}
if (score >= extra) {
if (23 >= lives) {
lives = lives + 20;
setProperty(life, _x , lives);
extra = extra + 20000;
bonussound.start();
}
}
if (dotseaten >= nod) {
setProperty("pl1", _y , -200);
setProperty("pl2", _y , -200);
setProperty("pl3", _y , -200);
setProperty("pl4", _y , -200);
setProperty("g1", _y , -200);
setProperty("g2", _y , -200);
setProperty("g3", _y , -200);
setProperty("g4", _y , -200);
setProperty("bg1", _y , -200);
setProperty("bg2", _y , -200);
setProperty("bg3", _y , -200);
setProperty("bg4", _y , -200);
setProperty("eg1", _y , -200);
setProperty("eg2", _y , -200);
setProperty("eg3", _y , -200);
setProperty("eg4", _y , -200);
setProperty("fscore" + fval, _y , -200);
removeMovieClip("fruit1");
setProperty("p1", _y , -200);
setProperty("p2", _y , -200);
setProperty("p1", _rotation , 0);
setProperty("rrf1", _y , -200);
setProperty("rrf2", _y , -200);
setProperty("rrf3", _y , -200);
setProperty("rrf4", _y , -200);
setProperty("rrf5", _y , -200);
setProperty("rrf6", _y , -200);
setProperty("rrf7", _y , -200);
setProperty("rrfv1", _y , -200);
setProperty("rrfv2", _y , -200);
setProperty("rrfv3", _y , -200);
setProperty("rrfv4", _y , -200);
setProperty("rrfv5", _y , -200);
setProperty("rrfv6", _y , -200);
setProperty("rrfv7", _y , -200);
frank = frank + 1;
gotoAndPlay (244);
}
}
s1 = s1 + (gspeed * mult1);
s2 = s2 + (gspeed * mult2);
s3 = s3 + (gspeed * mult3);
s4 = s4 + (gspeed * mult4);
if (s1 >= 10) {
if (gamode == 1) {
mult1 = 1;
}
if (gamode == 3) {
mult1 = 2;
}
gxa = gxa + gxxa;
gya = gya + gyya;
path1 = path1 + 1;
ghostpatha[gxa + (26 * gya)] = path1;
s1 = 0;
gac = gac - 1;
xq = maze[(gxa - 1) + (26 * (gya - 1))];
if (((gxa == 12) and (gya == 11)) and (gamode == 3)) {
gamode = 4;
mult1 = 1;
gya = 15;
gac = 20 + random(20);
setProperty("eg1", _y , -300);
}
if (tunnel3.hitTest(aax, aay, false) == true) {
gxa = 1;
}
if (tunnel1.hitTest(aax, aay, false) == true) {
gxa = 26;
}
if ((((((((((((((((((xq == 3) or (xq == 4)) or (xq == 5)) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
gyya = 0;
gxxa = 0;
xqd = ghostpatha[gxa + (26 * (gya + 1))];
xqu = ghostpatha[gxa + (26 * (gya - 1))];
xql = ghostpatha[(gxa - 1) + (26 * gya)];
xqr = ghostpatha[(gxa + 1) + (26 * gya)];
down = 0;
up = 0;
right = 0;
left = 0;
if ((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) {
down = 1;
}
if ((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) {
up = 1;
}
if ((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
right = 1;
}
if ((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
left = 1;
}
ppp = path1 - 14;
if ((gamode == 1) or (gamode == 4)) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gya < y)) {
gyya = 1;
gxxa = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (y < gya)) {
gyya = -1;
gxxa = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxa < x)) {
gxxa = 1;
gyya = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (x < gxa)) {
gxxa = -1;
gyya = 0;
change = 1;
}
}
if (gamode == 2) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (y < gya)) {
gyya = 1;
gxxa = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (gya < y)) {
gyya = -1;
gxxa = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (x < gxa)) {
gxxa = 1;
gyya = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (gxa < x)) {
gxxa = -1;
gyya = 0;
change = 1;
}
}
if (gamode == 3) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gya < 11)) {
gyya = 1;
gxxa = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxa < 12)) {
gxxa = 1;
gyya = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (11 < gya)) {
gyya = -1;
gxxa = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (12 < gxa)) {
gxxa = -1;
gyya = 0;
change = 1;
}
}
tom = 0;
if ((gxxa == 0) and (gyya == 0)) {
tom = 1;
}
if (tom == 1) {
if (((change == 0) and (xqd < ppp)) and (down == 1)) {
gyya = 1;
gxxa = 0;
change = random(2);
}
if (((change == 0) and (xqr < ppp)) and (right == 1)) {
gxxa = 1;
gyya = 0;
change = random(2);
}
if (((change == 0) and (xqu < ppp)) and (up == 1)) {
gyya = -1;
gxxa = 0;
change = random(2);
}
if (((change == 0) and (xql < ppp)) and (left == 1)) {
gxxa = -1;
gyya = 0;
change = random(2);
}
}
}
if ((((gxa == 13) and (gya == 13)) and (gamode == 4)) and (0 >= gac)) {
gyya = -1;
gxxa = 0;
gamode = 5;
}
if ((gamode == 5) and (gya == 11)) {
gamode = 1;
gyya = 0;
gxxa = -1;
}
}
if (s2 >= 10) {
if (gbmode == 1) {
mult2 = 1;
}
if (gbmode == 3) {
mult2 = 2;
}
gxb = gxb + gxxb;
gyb = gyb + gyyb;
path2 = path2 + 1;
ghostpathb[gxb + (26 * gyb)] = path2;
s2 = 0;
gbc = gbc - 1;
xq = maze[(gxb - 1) + (26 * (gyb - 1))];
if (((gxb == 12) and (gyb == 11)) and (gbmode == 3)) {
gbmode = 4;
mult2 = 1;
gyb = 15;
gbc = 20 + random(20);
setProperty("eg2", _y , -300);
}
if (tunnel3.hitTest(bbx, bby, false) == true) {
gxb = 1;
}
if (tunnel1.hitTest(bbx, bby, false) == true) {
gxb = 26;
}
if ((((((((((((((((((xq == 3) or (xq == 4)) or (xq == 5)) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
gyyb = 0;
gxxb = 0;
xqd = ghostpathb[gxb + (26 * (gyb + 1))];
xqu = ghostpathb[gxb + (26 * (gyb - 1))];
xql = ghostpathb[(gxb - 1) + (26 * gyb)];
xqr = ghostpathb[(gxb + 1) + (26 * gyb)];
down = 0;
up = 0;
right = 0;
left = 0;
if ((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) {
down = 1;
}
if ((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) {
up = 1;
}
if ((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
right = 1;
}
if ((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
left = 1;
}
ppp = path2 - 14;
if ((gbmode == 1) or (gbmode == 4)) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and ((gyb + random(10)) < y)) {
gyyb = 1;
gxxb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (y < (gyb - random(10)))) {
gyyb = -1;
gxxb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxb < x)) {
gxxb = 1;
gyyb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (x < gxb)) {
gxxb = -1;
gyyb = 0;
change = 1;
}
}
if (gbmode == 2) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (y < gyb)) {
gyyb = 1;
gxxb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (gyb < y)) {
gyyb = -1;
gxxb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (x < gxb)) {
gxxb = 1;
gyyb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (gxb < x)) {
gxxb = -1;
gyyb = 0;
change = 1;
}
}
if (gbmode == 3) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyb < 11)) {
gyyb = 1;
gxxb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (11 < gyb)) {
gyyb = -1;
gxxb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxb < 12)) {
gxxb = 1;
gyyb = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (12 < gxb)) {
gxxb = -1;
gyyb = 0;
change = 1;
}
}
tom = 0;
if ((gxxb == 0) and (gyyb == 0)) {
tom = 1;
}
if (tom == 1) {
if (((change == 0) and (ppp >= xqd)) and (down == 1)) {
gyyb = 1;
gxxb = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xqu)) and (up == 1)) {
gyyb = -1;
gxxb = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xqr)) and (right == 1)) {
gxxb = 1;
gyyb = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xql)) and (left == 1)) {
gxxb = -1;
gyyb = 0;
change = random(2);
}
}
}
if ((((gxb == 13) and (gyb == 13)) and (gbmode == 4)) and (0 >= gbc)) {
gyyb = -1;
gxxb = 0;
gbmode = 5;
}
if ((gbmode == 5) and (gyb == 11)) {
gbmode = 1;
gyyb = 0;
gxxb = -1;
}
}
if (s3 >= 10) {
if (gcmode == 1) {
mult3 = 1;
}
if (gcmode == 3) {
mult3 = 2;
}
gxc = gxc + gxxc;
gyc = gyc + gyyc;
path3 = path3 + 1;
ghostpathc[gxc + (26 * gyc)] = path3;
s3 = 0;
gcc = gcc - 1;
xq = maze[(gxc - 1) + (26 * (gyc - 1))];
if (((gxc == 12) and (gyc == 11)) and (gcmode == 3)) {
gcmode = 4;
mult3 = 1;
gyc = 15;
gcc = 20 + random(20);
setProperty("eg3", _y , -300);
}
if (tunnel3.hitTest(ccx, ccy, false) == true) {
gxc = 1;
}
if (tunnel1.hitTest(ccx, ccy, false) == true) {
gxc = 26;
}
if ((((((((((((((((((xq == 3) or (xq == 4)) or (xq == 5)) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
gyyc = 0;
gxxc = 0;
xqd = ghostpathc[gxc + (26 * (gyc + 1))];
xqu = ghostpathc[gxc + (26 * (gyc - 1))];
xql = ghostpathc[(gxc - 1) + (26 * gyc)];
xqr = ghostpathc[(gxc + 1) + (26 * gyc)];
down = 0;
up = 0;
right = 0;
left = 0;
if ((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) {
down = 1;
}
if ((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) {
up = 1;
}
if ((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
right = 1;
}
if ((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
left = 1;
}
ppp = path3 - 14;
if ((gcmode == 1) or (gcmode == 4)) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyc < y)) {
gyyc = 1;
gxxc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (y < gyc)) {
gyyc = -1;
gxxc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxc < x)) {
gxxc = 1;
gyyc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (x < gxc)) {
gxxc = -1;
gyyc = 0;
change = 1;
}
}
if (gcmode == 2) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (y < gyc)) {
gyyc = 1;
gxxc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (gyc < y)) {
gyyc = -1;
gxxc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (x < gxc)) {
gxxc = 1;
gyyc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (gxc < x)) {
gxxc = -1;
gyyc = 0;
change = 1;
}
}
if (gcmode == 3) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyc < 11)) {
gyyc = 1;
gxxc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (11 < gyc)) {
gyyc = -1;
gxxc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxc < 12)) {
gxxc = 1;
gyyc = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (12 < gxc)) {
gxxc = -1;
gyyc = 0;
change = 1;
}
}
tom = 0;
if ((gxxc == 0) and (gyyc == 0)) {
tom = 1;
}
if (tom == 1) {
if (((change == 0) and (ppp >= xqd)) and (down == 1)) {
gyyc = 1;
gxxc = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xqu)) and (up == 1)) {
gyyc = -1;
gxxc = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xqr)) and (right == 1)) {
gxxc = 1;
gyyc = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xql)) and (left == 1)) {
gxxc = -1;
gyyc = 0;
change = random(2);
}
}
}
if ((((gxc == 13) and (gyc == 13)) and (gcmode == 4)) and (0 >= gcc)) {
gyyc = -1;
gxxc = 0;
gcmode = 5;
}
if ((gcmode == 5) and (gyc == 11)) {
gcmode = 1;
gyyc = 0;
gxxc = -1;
}
}
if (s4 >= 10) {
if (gdmode == 1) {
mult4 = 1;
}
if (gdmode == 3) {
mult4 = 2;
}
gxd = gxd + gxxd;
gyd = gyd + gyyd;
path4 = path4 + 1;
ghostpathd[gxd + (26 * gyd)] = path4;
s4 = 0;
gdc = gdc - 1;
xq = maze[(gxd - 1) + (26 * (gyd - 1))];
if (((gxd == 12) and (gyd == 11)) and (gdmode == 3)) {
gdmode = 4;
mult4 = 1;
gyd = 15;
gcd = 20 + random(20);
setProperty("eg4", _y , -300);
}
if (tunnel3.hitTest(ddx, ddy, false) == true) {
gxd = 1;
}
if (tunnel1.hitTest(ddx, ddy, false) == true) {
gxd = 26;
}
if ((((((((((((((((((xq == 3) or (xq == 4)) or (xq == 5)) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
gyyd = 0;
gxxd = 0;
xqd = ghostpathd[gxd + (26 * (gyd + 1))];
xqu = ghostpathd[gxd + (26 * (gyd - 1))];
xql = ghostpathd[(gxd - 1) + (26 * gyd)];
xqr = ghostpathd[(gxd + 1) + (26 * gyd)];
down = 0;
up = 0;
right = 0;
left = 0;
if ((((((((((((xq == 3) or (xq == 5)) or (xq == 7)) or (xq == 8)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 25)) or (xq == 27)) or (xq == 28)) or (xq == 30)) or (xq == 31)) {
down = 1;
}
if ((((((((((((xq == 4) or (xq == 6)) or (xq == 7)) or (xq == 8)) or (xq == 9)) or (xq == 11)) or (xq == 24)) or (xq == 26)) or (xq == 27)) or (xq == 28)) or (xq == 29)) or (xq == 31)) {
up = 1;
}
if ((((((((((((xq == 5) or (xq == 6)) or (xq == 7)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 25)) or (xq == 26)) or (xq == 27)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
right = 1;
}
if ((((((((((((xq == 3) or (xq == 4)) or (xq == 8)) or (xq == 9)) or (xq == 10)) or (xq == 11)) or (xq == 23)) or (xq == 24)) or (xq == 28)) or (xq == 29)) or (xq == 30)) or (xq == 31)) {
left = 1;
}
ppp = path4 - 14;
if ((gdmode == 1) or (gdmode == 4)) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyd < y)) {
gyyd = 1;
gxxd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (y < gyd)) {
gyyd = -1;
gxxd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxd < x)) {
gxxd = 1;
gyyd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (x < gxd)) {
gxxd = -1;
gyyd = 0;
change = 1;
}
}
if (gdmode == 2) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (y < gyd)) {
gyyd = 1;
gxxd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (gyd < y)) {
gyyd = -1;
gxxd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (x < gxd)) {
gxxd = 1;
gyyd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (gxd < x)) {
gxxd = -1;
gyyd = 0;
change = 1;
}
}
if (gdmode == 3) {
change = 0;
if ((((change == 0) and (ppp >= xqd)) and (down == 1)) and (gyd < 11)) {
gyyd = 1;
gxxd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqu)) and (up == 1)) and (11 < gyd)) {
gyyd = -1;
gxxd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xqr)) and (right == 1)) and (gxd < 12)) {
gxxd = 1;
gyyd = 0;
change = 1;
}
if ((((change == 0) and (ppp >= xql)) and (left == 1)) and (12 < gxd)) {
gxxd = -1;
gyyd = 0;
change = 1;
}
}
tom = 0;
if ((gxxd == 0) and (gyyd == 0)) {
tom = 1;
}
if (tom == 1) {
if (((change == 0) and (ppp >= xqd)) and (down == 1)) {
gyyd = 1;
gxxd = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xqu)) and (up == 1)) {
gyyd = -1;
gxxd = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xqr)) and (right == 1)) {
gxxd = 1;
gyyd = 0;
change = random(2);
}
if (((change == 0) and (ppp >= xql)) and (left == 1)) {
gxxd = -1;
gyyd = 0;
change = random(2);
}
}
}
if ((((gxd == 13) and (gyd == 13)) and (gdmode == 4)) and (0 >= gdc)) {
gyyd = -1;
gxxd = 0;
gdmode = 5;
}
if ((gdmode == 5) and (gyd == 11)) {
gdmode = 1;
gyyd = 0;
gxxd = -1;
}
}
if (cond == 1) {
stopAllSounds();
cond = 0;
if (mult1 == 0.6) {
mult1 = 1;
}
if (mult2 == 0.6) {
mult2 = 1;
}
if (mult3 == 0.6) {
mult3 = 1;
}
if (mult4 == 0.6) {
mult4 = 1;
}
gscore = 1;
if (gamode == 2) {
gamode = 1;
setProperty("bg1", _x , -300);
if ((((16 >= gya) and (gya >= 13)) and (gxa >= 10)) and (16 >= gxa)) {
gamode = 4;
}
}
if (gbmode == 2) {
gbmode = 1;
setProperty("bg2", _x , -300);
if ((((16 >= gyb) and (gyb >= 13)) and (gxb >= 10)) and (16 >= gxb)) {
gbmode = 4;
}
}
if (gcmode == 2) {
gcmode = 1;
setProperty("bg3", _x , -300);
if ((((16 >= gyc) and (gyc >= 13)) and (gxc >= 10)) and (16 >= gxc)) {
gcmode = 4;
}
}
if (gdmode == 2) {
gdmode = 1;
setProperty("bg4", _x , -300);
if ((((16 >= gyd) and (gyd >= 13)) and (gxd >= 10)) and (16 >= gxd)) {
gdmode = 4;
}
}
}
pacpathx[ross] = x;
pacpathy[ross] = y;
xq = maze[(x - 1) + (26 * (y - 1))];
if (((0 >= xq) and (10 < ppx)) and (ppx < 260)) {
error.start();
ross = ross - 2;
x = pacpathx[ross];
y = pacpathy[ross];
xx = 0;
yy = 0;
xtag = 0;
ytag = 0;
fm = 1;
tx = 1;
ty = 1;
} else {
ross = ross + 1;
}
if (Key.isDown(Key.UP) == true) {
ytag = -1;
xtag = 0;
if (yy == 1) {
ty = -1;
}
}
if (Key.isDown(Key.DOWN) == true) {
ytag = 1;
xtag = 0;
if (yy == -1) {
ty = -1;
}
}
if (Key.isDown(Key.LEFT) == true) {
if (((xx == 0) and (yy == 0)) and (fm == 1)) {
xx = -1;
fm = 0;
yy = 0;
}
ytag = 0;
xtag = -1;
if (xx == 1) {
tx = -1;
}
}
if (Key.isDown(Key.RIGHT) == true) {
if (((xx == 0) and (yy == 0)) and (fm == 1)) {
xx = 1;
fm = 0;
yy = 0;
}
ytag = 0;
xtag = 1;
if (xx == -1) {
tx = -1;
}
}
Frame 250
gotoAndPlay (249);
Frame 253
scroll = -300;
setProperty("frame" + frank, _x , 135);
setProperty("frame" + frank, _y , scroll);
Frame 254
nodd = 0;
a = 0;
while (nod >= a) {
setProperty("dot" + dots[nodd], _x , dots[nodd + 1]);
setProperty("dot" + dots[nodd], _y , dots[nodd + 2] + scroll);
nodd = nodd + 3;
a++;
}
setProperty("frame" + frank, _y , scroll + 150);
setProperty("frame" + (frank - 1), _y , scroll + 450);
scroll = scroll + 10;
if (scroll >= 10) {
gotoAndPlay (247);
}
Frame 255
gotoAndPlay (254);
Frame 259
rot = 0;
fm = 1;
xtag = 0;
ytag = 0;
gxa = 14;
gya = 13;
gxxa = -1;
gyya = 0;
gxb = 11;
gyb = 13;
gxxb = 1;
gyyb = 0;
gxc = 15;
gyc = 13;
gxxc = -1;
gyyc = 0;
gxd = 13;
gyd = 13;
gxxd = -1;
gyyd = 0;
gamode = 4;
gbmode = 4;
gcmode = 4;
gdmode = 4;
mult1 = 0.9 + (random(20) / 100);
mult2 = 0.9 + (random(20) / 100);
mult3 = 0.9 + (random(20) / 100);
mult4 = 0.9 + (random(20) / 100);
gac = 10;
gbc = 50;
gcc = 30;
gdc = 40;
x = 14;
y = 23;
xx = 0;
yy = 0;
if (7 >= frank) {
if (fruitactive == 1) {
setProperty("fruit1", _y , -550);
setProperty("fscore" + fval, _y , -200);
fruitcall = dotseaten + 30;
fruitactive = 0;
fruitcount = fruitcount + 1;
if (fruitcount == 2) {
fruitcall = 0;
}
}
}
if (frank >= 8) {
if (fruitactive == 1) {
setProperty("rrf1", _y , -200);
setProperty("rrf2", _y , -200);
setProperty("rrf3", _y , -200);
setProperty("rrf4", _y , -200);
setProperty("rrf5", _y , -200);
setProperty("rrf6", _y , -200);
setProperty("rrf7", _y , -200);
setProperty("rrfv1", _y , -200);
setProperty("rrfv2", _y , -200);
setProperty("rrfv3", _y , -200);
setProperty("rrfv4", _y , -200);
setProperty("rrfv5", _y , -200);
setProperty("rrfv6", _y , -200);
setProperty("rrfv7", _y , -200);
fruitcall = dotseaten + 30;
fruitactive = 0;
fruitcount = fruitcount + 1;
if (fruitcount == 2) {
fruitcall = 0;
}
}
}
setProperty("eg1", _y , -300);
setProperty("eg2", _y , -300);
setProperty("eg3", _y , -300);
setProperty("eg4", _y , -300);
setProperty("bg1", _y , -300);
setProperty("bg2", _y , -300);
setProperty("bg3", _y , -300);
setProperty("bg4", _y , -300);
lives = lives - 20;
setProperty(life, _x , lives);
if (-97 >= lives) {
dddd = -10;
gotoAndPlay (262);
}
Frame 260
setProperty("p1", _rotation , rot * 90);
setProperty("p2", _rotation , rot * 90);
l = 0;
while (2500 >= l) {
dummy = dummy + 1;
l++;
}
rot = rot + 1;
if (rot >= 9) {
gotoAndPlay (249);
}
Frame 261
gotoAndPlay (260);
Frame 262
removeMovieClip("dot" + dddd);
removeMovieClip("dot" + (dddd + 1));
removeMovieClip("dot" + (dddd + 2));
removeMovieClip("dot" + (dddd + 3));
removeMovieClip("dot" + (dddd + 4));
removeMovieClip("dot" + (dddd + 5));
removeMovieClip("dot" + (dddd + 6));
removeMovieClip("dot" + (dddd + 7));
removeMovieClip("dot" + (dddd + 8));
removeMovieClip("dot" + (dddd + 9));
removeMovieClip("dot" + (dddd + 10));
dddd = dddd + 10;
Frame 263
gotoAndPlay (262);
Symbol 12 Button
on (release) {
getURL ("http://www.qksrv.net/click-1027710-5327632", "_blank");
}
Symbol 15 Button
on (release) {
getURL ("http://www.qksrv.net/click-1027710-1143439");
}
Symbol 123 Button
on (release) {
introm.start();
Mouse.hide();
gotoAndPlay (244);
}