Frame 1
Frame 3
function gomain() {
i = 0;
while (i < 33) {
removeMovieClip("c" + i);
removeMovieClip("pipe" + i);
i++;
}
removeMovieClip("gclip");
gotoAndPlay (3);
}
_root.level = 0;
_root.score = 0;
levels = new Array();
levels[1] = "2,1,2,1,1,1,2,1,2,1,2,1,2,1,2,1,1,1,2,1,2,2,1,1,1,1,1,2,1,1,1,1";
levels[2] = "2,1,2,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,2,1,1,1,1,1,1,1,1,2,1,2,1,1";
levels[3] = "1,2,1,1,1,1,2,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2";
levels[4] = "2,1,2,1,1,1,2,1,2,1,2,1,2,1,1,1,2,2,1,1,2,2,2,1,1,1,1,2,1,1,1,1";
levels[5] = "1,1,1,2,2,2,2,2,1,1,2,1,2,2,2,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2";
levels[6] = "1,1,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,1,2,1";
levels[7] = "1,2,2,1,1,1,2,1,1,2,2,1,2,1,1,1,2,1,2,1,1,2,1,2,1,1,1,1,1,1,1,2";
splash = new Sound();
splash.attachSound("drop");
turnsound = new Sound();
turnsound.attachSound("turn");
flow = new Sound();
flow.attachSound("underwater");
Frame 62
stop();
Frame 63
removeMovieClip("congrats");
i = 1;
while (i < 33) {
removeMovieClip("c" + i);
i++;
}
score = score + bonus;
level++;
if (level >= 8) {
trace("you win");
gotoAndPlay (91);
}
use = 1;
moves = 0;
totaltime = 600 - (level * 40);
time = totaltime;
num = 0;
i = 1;
while (i < 33) {
attachMovie("pipeshell", "pipe" + num, 100 + num);
with (eval ("pipe" + num)) {
down = math.floor(num / 8);
across = num - (down * 8);
_x = 59.7 + (across * 72);
_y = 105.5 + (down * 72);
n = num;
w = across;
v = down;
}
num++;
i++;
}
holder = new Array();
holder = levels[level].split(",");
i = 0;
while (i < 32) {
st = holder[i];
eval ("pipe" + i).pipe.gotoAndStop(st);
i++;
}
Frame 71
time = time - 0.5;
timer._xscale = (time / totaltime) * 100;
if (time <= 0) {
timer._xscale = 0;
gotoAndPlay ("GAMEOVER");
}
Frame 72
gotoAndPlay (71);
Frame 73
function thatsright() {
n = 1;
attachMovie("right", "c" + correct, 150 + correct);
if ((flow == 1) && (pipetype == 2)) {
n = 12;
}
if ((flow == 3) && (pipetype == 2)) {
n = 11;
}
if ((flow == 2) && (pipetype == 2)) {
n = 9;
}
if ((flow == 4) && (pipetype == 2)) {
n = 10;
}
if (pipetype == 1) {
if ((flow == 1) && (pipedir == 3)) {
n = 4;
} else if ((flow == 1) && (pipedir == 4)) {
n = 7;
} else if ((flow == 2) && (pipedir == 4)) {
n = 8;
} else if ((flow == 2) && (pipedir == 1)) {
n = 1;
}
if ((flow == 1) && (pipedir == 2)) {
n = 6;
}
if ((flow == 3) && (pipedir == 4)) {
n = 8;
}
if ((flow == 3) && (pipedir == 3)) {
n = 3;
}
if ((flow == 1) && (pipedir == 1)) {
n = 2;
}
if ((flow == 2) && (pipedir == 2)) {
n = 5;
}
if ((flow == 2) && (pipedir == 3)) {
n = 4;
}
}
with (eval ("c" + correct)) {
gotoAndStop(n);
_x = 59.7 + (x * 72);
_y = 105.5 + (y * 72);
_alpha = 50;
}
}
use = 0;
x = 0;
y = 0;
flow = 3;
correct = 0;
test = 0;
pipedir = 1;
Frame 74
pipen = x + (y * 8);
Frame 75
pipedir = eval ("pipe" + pipen).pipe.dir;
pipetype = holder[pipen];
error = 1;
if (flow == 1) {
if (pipetype == 1) {
if (pipedir == 3) {
correct++;
flow = 2;
error = 0;
thatsright();
x++;
} else if (pipedir == 4) {
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
}
if (pipetype == 2) {
if ((pipedir == 2) || (pipedir == 4)) {
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
}
}
if (flow == 2) {
if (pipetype == 1) {
if (pipedir == 1) {
correct++;
flow = 1;
error = 0;
thatsright();
y--;
} else if (pipedir == 4) {
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
if (pipetype == 2) {
if ((pipedir == 1) || (pipedir == 3)) {
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
}
}
if (flow == 3) {
if (pipetype == 1) {
if (pipedir == 1) {
correct++;
flow = 4;
error = 0;
thatsright();
x--;
} else if (pipedir == 2) {
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
}
if (pipetype == 2) {
if ((pipedir == 2) || (pipedir == 4)) {
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
}
if (flow == 4) {
if (pipetype == 1) {
if (pipedir == 2) {
correct++;
flow = 1;
error = 0;
thatsright();
y--;
} else if (pipedir == 3) {
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
if (pipetype == 2) {
if ((pipedir == 1) || (pipedir == 3)) {
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
}
}
if ((x == 7) && (y == 4)) {
gotoAndPlay ("yay");
}
if (error > 0) {
gotoAndPlay ("GAMEOVER");
}
Frame 83
test++;
gotoAndPlay (74);
Frame 84
go = 0;
if (moves < 16) {
bonusm = 500;
}
if ((moves > 15) && (moves < 26)) {
bonusm = 200;
}
if ((moves > 25) && (moves < 36)) {
bonusm = 100;
}
if ((moves > 35) && (moves < 46)) {
bonusm = 50;
}
if (moves > 45) {
bonusm = 0;
}
timeleft = math.floor(time / 4);
timeb = timeleft * 10;
collectedb = 100 * correct;
bonus = (collectedb + bonusm) + timeb;
_root.levelreport = ("Level " + level) + " completed";
attachMovie("congrats", "congrats", 200);
congrats._x = 310;
congrats._y = 200;
Frame 85
if (go == 1) {
gotoAndPlay (63);
}
Frame 86
gotoAndPlay (85);
Frame 87
function reset() {
i = 0;
while (i < 33) {
removeMovieClip("pipe" + i);
removeMovieClip("c" + i);
i++;
}
_root.level = 0;
_root.score = 0;
removeMovieClip("gclip");
gotoAndPlay (63);
}
_root.tellplayer = "FINAL SCORE: " + score;
attachMovie("GAMEOVERCLIP", "gclip", 1000);
gclip._x = 310;
gclip._y = 200;
trace("GAME OVER");
Frame 90
stop();
Frame 91
i = 0;
while (i < 33) {
removeMovieClip("c" + i);
removeMovieClip("pipe" + i);
i++;
}
stop();
Symbol 6 MovieClip Frame 1
_root.stop();
PercentLoaded = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
_root.play();
}
Symbol 6 MovieClip Frame 2
gotoAndPlay (1);
Symbol 19 MovieClip Frame 1
stop();
Symbol 23 Button
on (release) {
if ((_root.use == 1) && (pipe.r == 0)) {
_root.turnsound.start(0, 0);
dirn = pipe.dir;
_root.moves++;
dirn++;
if (dirn == 5) {
dirn = 1;
}
pipe.dir = dirn;
pipe.r = 2;
}
}
Symbol 24 MovieClip [pipeshell] Frame 1
Instance of Symbol 19 MovieClip "pipe" in Symbol 24 MovieClip [pipeshell] Frame 1
onClipEvent (load) {
r = 0;
dir = random(4) + 1;
if (dir == 1) {
this._rotation = 0;
} else if (dir == 2) {
this._rotation = 90;
} else if (dir == 3) {
this._rotation = 180;
} else if (dir == 4) {
this._rotation = 270;
}
}
onClipEvent (enterFrame) {
if (r == 2) {
step = 6;
r = 1;
}
if ((r == 1) && (step > 0)) {
this._rotation = this._rotation + 15;
step--;
}
if (step == 0) {
r = 0;
}
}
Symbol 46 Button
on (release) {
_root.go = 1;
}
Symbol 47 MovieClip [congrats] Frame 33
stop();
Symbol 54 Button
on (release) {
_root.gomain();
}
Symbol 58 Button
on (press) {
_root.reset();
}
Symbol 60 MovieClip [GAMEOVERCLIP] Frame 25
stop();
Symbol 63 MovieClip Frame 9
stop();
Symbol 65 MovieClip Frame 9
stop();
Symbol 66 MovieClip [right] Frame 1
stop();
Symbol 69 MovieClip Frame 1
stop();
Instance of Symbol 75 MovieClip in Symbol 76 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 20;
if (this._y > 270) {
_root.splash.start();
this._x = random(620);
this._y = -(random(500) + 50);
}
}
Symbol 79 Button
on (press) {
getURL ("mailto:terrypaton1@bigpond.com?subject=Plumber 1", "_blank");
}
Symbol 89 Button
on (release) {
gotoAndPlay (63);
}
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 24
stop();
Symbol 105 Button
on (release) {
_root.flow.start(0, 3);
gotoAndPlay ("pump");
handle.gotoAndPlay(2);
}
Symbol 107 MovieClip Frame 260
stop();
Symbol 113 Button
on (press) {
getURL ("http://www.newgrounds.com/portal/view/173695", "_BLANK");
}
Symbol 114 Button
on (press) {
_root.gomain();
}