Frame 1
_root.percentage = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
_root.liquid.gotoAndStop(int(percentage));
if (percentage >= 99) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 233
if (_root.readytoplay || (Key.isDown(65) && (!_root.buttonlocked))) {
_root.buttonlocked = true;
gotoAndPlay ("instructions");
_root.buttonlocked = true;
_root.hardmode = false;
_root.cheesemessage = false;
}
if (!Key.isDown(65)) {
_root.buttonlocked = false;
}
_root.level = 1;
Frame 234
gotoAndPlay ("title");
Frame 235
function rands(left, right) {
return(random(3) - 1);
}
function GetRelativeDepthOffset(object, ob2, ob3) {
depoff = 0;
if (object._y < ob2._y) {
if (object._y < ob3._y) {
depoff = 0;
} else {
depoff = 1;
}
} else if (object._y < ob3._y) {
depoff = 1;
} else {
depoff = 2;
}
return(depoff);
}
function GetAbsDepthBase(object) {
dep = 157;
if ((_root.row2._y + 37) < object._y) {
dep = 257;
}
if ((_root.row3._y + 37) < object._y) {
dep = 357;
}
return(dep);
}
function SetObjectDepths() {
pmdepoff = GetRelativeDepthOffset(_root.pickleman, _root.bad, _root.nun);
baddepoff = GetRelativeDepthOffset(_root.bad, _root.pickleman, _root.nun);
nundepoff = GetRelativeDepthOffset(_root.nun, _root.pickleman, _root.bad);
pmdep = pmdepoff + GetAbsDepthBase(_root.pickleman);
baddep = baddepoff + GetAbsDepthBase(_root.bad);
nundep = nundepoff + GetAbsDepthBase(_root.nun);
if (!_root.pickleman.flying) {
_root.pickleman.swapDepths(pmdep);
}
_root.bad.swapDepths(baddep);
_root.nun.swapDepths(nundep);
_root.pickleman.dep = pmdep;
_root.bad.dep = baddep;
_root.nun.dep = nundep;
}
_root.row3temp.duplicateMovieClip("row3", 300);
_root.row3._x = 8;
_root.row3._y = 277;
_root.row2temp.duplicateMovieClip("row2", 200);
_root.row2._x = 8;
_root.row2._y = 205;
_root.row1temp.duplicateMovieClip("row1", 100);
_root.row1._x = 8;
_root.row1._y = 141;
_root.picklemantemp.duplicateMovieClip("pickleman", 283);
_root.pickleman._x = 400;
_root.pickleman._y = 270;
_root.pickleman.punching = false;
_root.pickleman.startpunch = false;
_root.pmmovespeedoriginal = 4;
_root.pmmovespeed = _root.pmmovespeedoriginal;
_root.pmairmovespeed = 4;
_root.attackkey = 68;
_root.pickupkey = 65;
_root.pickleman.cheesed = false;
_root.hasbeencheesed = false;
_root.lastcuke = -1;
_root.batx = random(500) + 50;
_root.baty = random(75) + 15;
_root.cheesemessageboxtemp.duplicateMovieClip("cheesemessagebox", 600);
_root.badtemp.duplicateMovieClip("bad", 199);
_root.bad._x = -50;
_root.bad._y = 200;
_root.nuntemp.duplicateMovieClip("nun", 800);
_root.fg.duplicateMovieClip("fg2", 590);
_root.buttonlocked = true;
_root.picklesdropped = 0;
_root.pickleslost = 0;
if (_root.hardmode) {
_root.nun.disabled = false;
var _local2 = 1;
switch (_root.level) {
case _local2 :
_root.maxpickleslost = 1;
_root.totalpickles = 5;
break;
case 2 :
_root.maxpickleslost = 2;
_root.totalpickles = 12;
break;
case 3 :
_root.maxpickleslost = 3;
_root.totalpickles = 23;
}
} else {
_root.nun.disabled = true;
var _local2 = 1;
switch (_root.level) {
case _local2 :
_root.maxpickleslost = 2;
_root.totalpickles = 5;
break;
case 2 :
_root.maxpickleslost = 4;
_root.totalpickles = 12;
break;
case 3 :
_root.maxpickleslost = 6;
_root.totalpickles = 23;
_root.nun.disabled = false;
}
}
cukex = new Array(42, 75, 112, 180, 218, 270, 310, 360, 400, 85, 135, 180, 247, 290, 338, 85, 105, 150, 210, 265, 310, 358, 400);
cukey = new Array(170, 180, 175, 180, 170, 185, 190, 180, 175, 240, 245, 230, 241, 238, 245, 310, 305, 321, 314, 330, 315, 316, 320);
indexarray = new Array();
j = 0;
while (j < 23) {
indexarray.push(j);
j++;
}
indexarray.sort(rands);
indexarray.sort(rands);
indexarray.sort(rands);
indexarray.sort(rands);
_root.disablebad = false;
_root.disablebat = false;
_root.disablenun = false;
i = 0;
while (i < _root.totalpickles) {
dep = 101;
index = indexarray[i];
if (200 < cukey[index]) {
dep = 201;
}
if (300 < cukey[index]) {
dep = 301;
}
_root.cuke.duplicateMovieClip("cuke" + i, dep + i);
eval ("cuke" + i)._x = cukex[index];
eval ("cuke" + i)._y = cukey[index];
eval ("cuke" + i).active = true;
eval ("cuke" + i).onplant = true;
eval ("cuke" + i).dep = dep + i;
i++;
}
eval ("_root.pick" + _root.maxpickleslost)._name = "picklemeter";
_root.picklemeter._x = (600 - _root.picklemeter._width) + 45;
_root.picklemeter._y = 20;
_root.picklemeter.indicator._alpha = 0;
_root.leveltitletemp.duplicateMovieClip("leveltitle", 1000);
_root.leveltitle._x = 162.5;
_root.leveltitle._y = 180;
_root.leveltitle.gotoAndPlay("level" + _root.level);
_root.wongame = false;
_root.lostgame = false;
_root.musictime = 0;
_root.pickleman.firsthit = true;
_root.userpaused = false;
_root.music = new Sound();
_root.music.attachSound("in-game-music.wav");
_root.music.start(0, 100000);
_root.currenttime = getTimer();
_root.lasttime = getTimer();
Instance of Symbol 43 MovieClip "dropanim" in Frame 235
onClipEvent (load) {
stop();
}
Instance of Symbol 87 MovieClip "picklemantemp" in Frame 235
onClipEvent (enterFrame) {
if (_name == "pickleman") {
if (((!Key.isDown(_root.attackkey)) && (!Key.isDown(_root.pickupkey))) && (!Key.isDown(80))) {
_root.buttonlocked = false;
}
if (dead || (_root.paused)) {
return(undefined);
}
if (nunstun) {
if (_y < 200) {
_y = (_y + 5);
}
if (!_root.nun.active) {
cheesehit = false;
nunstun = false;
gotoAndPlay (5);
}
return(undefined);
}
if (_root.nun.attacking && (bodyhit.hitTest(_root.nun.attackbox) || (((!cheesehit) && (cheesed)) && (hitTest(_root.nun.attackbox))))) {
cheesehit = true;
if (_root.health._currentframe == 1) {
flying = false;
if (!cheesed) {
gotoAndPlay ("die");
nunstun = true;
}
DropCuke();
_root.nun.leaving = true;
_root.health.gotoAndStop(3);
} else {
_root.health.gotoAndStop(4);
}
_root.nun.leaving = true;
return(undefined);
}
if ((!firsthit) && (3000 < (getTimer() - firsthittimer))) {
firsthit = true;
}
if (_root.lastcuke != -1) {
if ((eval ("_root.cuke" + _root.lastcuke)._y < 200) && (!eval ("_root.cuke" + _root.lastcuke).onplant)) {
eval ("_root.cuke" + _root.lastcuke)._y = eval ("_root.cuke" + _root.lastcuke)._y + 6;
}
}
if (!flying) {
_root.lastcuke = -1;
GroundPMControl();
if (_root.hasbeencheesed) {
_root.cheesemessage = true;
_root.hasbeencheesed = false;
}
} else if (!cheesed) {
if (pickle) {
AirPMControl();
} else {
MovePMBack();
}
} else {
gotoAndPlay ("cheesed");
if (420 < _x) {
_x = 420;
}
DropCuke();
if (_y < 220) {
_y = (_y + 4);
} else {
flying = false;
}
if (!_root.hasbeencheesed) {
if (_root.cheesemessage) {
_root.cheesemessagebox.gotoAndPlay("message2");
} else {
_root.cheesemessagebox.gotoAndPlay("message1");
}
}
_root.hasbeencheesed = true;
}
}
}
onClipEvent (load) {
function MovePMBack() {
_xscale = -100;
if (435 < _x) {
_x = (_x - 6);
} else if (_y < 200) {
_y = (_y + 4);
} else {
flying = false;
gotoAndPlay (5);
}
}
function ConstrainAirPosition() {
if (550 < _x) {
_x = 550;
}
if (327 < _y) {
_y = 327;
}
if (_x < 20) {
_x = 20;
}
if (_y < 20) {
_y = 20;
}
if (130 < _y) {
if (420 < _x) {
_x = 420;
}
} else if (440 < _x) {
if (120 < _y) {
_y = 120;
}
}
}
function CheckPickleDrop() {
if (((_root.pickleman.hitTest(_root.pickledropzone) && (pickle)) && (Key.isDown(_root.pickupkey))) && (!_root.buttonlocked)) {
_root.buttonlocked = true;
pickle = false;
_root.dropanim._alpha = 100;
_root.dropanim.gotoAndPlay(1);
_root.pickleman.gotoAndPlay("flying");
}
}
function HandleAirMovement() {
if (Key.isDown(37)) {
_x = (_x - _root.pmairmovespeed);
_xscale = -100;
} else if (Key.isDown(39)) {
_x = (_x + _root.pmairmovespeed);
_xscale = 100;
}
if (Key.isDown(38)) {
_y = (_y - _root.pmairmovespeed);
} else if (Key.isDown(40)) {
_y = (_y + _root.pmairmovespeed);
}
}
function AirPMControl() {
HandleAirMovement();
ConstrainAirPosition();
CheckPickleDrop();
if (Key.isDown(_root.pickupkey) && (!_root.buttonlocked)) {
_root.buttonlocked = true;
gotoAndPlay ("flying");
if (pickle) {
DropCuke();
startpickup = false;
picking = false;
}
}
_root.pickleman.swapDepths(595);
}
function CheckCukePickup() {
if (picking) {
i = 0;
while (i < _root.totalpickles) {
if ((eval ("_root.cuke" + i).hitTest(_root.pickleman) && (eval ("_root.cuke" + i).active)) && (eval ("_root.cuke" + i).dep < dep)) {
picking = false;
startpickup = false;
pickle = true;
flying = true;
eval ("_root.cuke" + i).active = false;
eval ("_root.cuke" + i).onplant = false;
eval ("_root.cuke" + i)._alpha = 0;
gotoAndPlay ("flying_pickle");
_root.lastcuke = i;
return(undefined);
}
i++;
}
}
}
function HandleAttack() {
if ((Key.isDown(_root.pickupkey) && (!_root.buttonlocked)) && (_currentframe < 10)) {
_root.buttonlocked = true;
startpickup = true;
gotoAndPlay ("picking");
}
if ((Key.isDown(_root.attackkey) && (_currentframe < 10)) && (!_root.buttonlocked)) {
_root.buttonlocked = true;
startpunch = true;
gotoAndPlay ("punching");
}
depdiff = dep - _root.bad.dep;
depdiffsq = depdiff * depdiff;
if (((punching && (attackbox.hitTest(_root.bad))) && (!_root.bad.dead)) && (depdiffsq < 400)) {
_root.bad.TakeDamage();
}
}
function HandleMovement() {
if (startpickup || (startpunch)) {
return(undefined);
}
if (Key.isDown(37)) {
if (cheesed) {
cheese.play();
}
_x = (_x - _root.pmmovespeed);
_xscale = -100;
if ((!walking) && (!cheesed)) {
walking = true;
gotoAndPlay ("walking");
}
_root.pmhit._x = _x;
_root.pmhit._y = _y;
if (_root.row1hit.hitTest(_root.pmhit)) {
_x = (_x + _root.pmmovespeed);
}
if (_root.row2hit.hitTest(_root.pmhit)) {
_x = (_x + _root.pmmovespeed);
}
if (_root.row3hit.hitTest(_root.pmhit)) {
_x = (_x + _root.pmmovespeed);
}
} else if (Key.isDown(39)) {
if (cheesed) {
cheese.play();
}
_x = (_x + _root.pmmovespeed);
_xscale = 100;
if ((!walking) && (!cheesed)) {
walking = true;
gotoAndPlay ("walking");
}
_root.pmhit._x = _x;
_root.pmhit._y = _y;
if (_root.row1hit.hitTest(_root.pmhit)) {
_x = (_x - _root.pmmovespeed);
}
if (_root.row2hit.hitTest(_root.pmhit)) {
_x = (_x - _root.pmmovespeed);
}
if (_root.row3hit.hitTest(_root.pmhit)) {
_x = (_x - _root.pmmovespeed);
}
}
if (Key.isDown(38)) {
if (cheesed) {
cheese.play();
}
_y = (_y - _root.pmmovespeed);
if ((!walking) && (!cheesed)) {
walking = true;
gotoAndPlay ("walking");
}
_root.pmhit._x = _x;
_root.pmhit._y = _y;
if (_root.row1hit.hitTest(_root.pmhit)) {
_y = (_y + _root.pmmovespeed);
}
if (_root.row2hit.hitTest(_root.pmhit)) {
_y = (_y + _root.pmmovespeed);
}
if (_root.row3hit.hitTest(_root.pmhit)) {
_y = (_y + _root.pmmovespeed);
}
} else if (Key.isDown(40)) {
if (cheesed) {
cheese.play();
}
_y = (_y + _root.pmmovespeed);
if ((!walking) && (!cheesed)) {
walking = true;
gotoAndPlay ("walking");
}
_root.pmhit._x = _x;
_root.pmhit._y = _y;
if (_root.row1hit.hitTest(_root.pmhit)) {
_y = (_y - _root.pmmovespeed);
}
if (_root.row2hit.hitTest(_root.pmhit)) {
_y = (_y - _root.pmmovespeed);
}
if (_root.row3hit.hitTest(_root.pmhit)) {
_y = (_y - _root.pmmovespeed);
}
}
_root.pmhit._x = _x;
_root.pmhit._y = _y;
if ((((!Key.isDown(37)) && (!Key.isDown(39))) && (!Key.isDown(38))) && (!Key.isDown(40))) {
if (!cheesed) {
gotoAndStop (5);
}
walking = false;
while (_root.row1hit.hitTest(_root.pmhit)) {
_y = (_y + _root.pmmovespeed);
_root.pmhit._y = _y;
}
while (_root.row2hit.hitTest(_root.pmhit)) {
_y = (_y + _root.pmmovespeed);
_root.pmhit._y = _y;
}
while (_root.row3hit.hitTest(_root.pmhit)) {
_y = (_y + _root.pmmovespeed);
_root.pmhit._y = _y;
}
}
}
function GroundPMControl() {
if ((!startpunch) && (!startpick)) {
HandleMovement();
}
if (!flying) {
if (!cheesed) {
HandleAttack();
CheckCukePickup();
}
ConstrainPosition();
}
}
function ConstrainPosition() {
if (_y < 189) {
_y = 189;
}
if (327 < _y) {
_y = 327;
}
if (_x < 20) {
_x = 20;
}
if (420 < _x) {
_x = 420;
}
}
function TakeDamage() {
firsthittimer = getTimer();
if (firsthit) {
firsthit = false;
return(undefined);
}
firsthit = false;
if (2000 < (getTimer() - damagetime)) {
damagetime = getTimer();
_root.health.play();
}
}
function DropCuke() {
if (!pickle) {
return(undefined);
}
eval ("_root.cuke" + _root.lastcuke)._x = _x;
eval ("_root.cuke" + _root.lastcuke)._y = _y;
eval ("_root.cuke" + _root.lastcuke)._rotation = 90;
eval ("_root.cuke" + _root.lastcuke)._alpha = 100;
eval ("_root.cuke" + _root.lastcuke).active = true;
eval ("_root.cuke" + _root.lastcuke).swapDepths(50 + _root.lastcuke);
eval ("_root.cuke" + _root.lastcuke).dep = 50 + _root.lastcuke;
eval ("_root.cuke" + _root.lastcuke).play();
if (_y >= 189) {
_root.lastcuke = -1;
}
if (420 < eval ("_root.cuke" + _root.lastcuke)._x) {
eval ("_root.cuke" + _root.lastcuke)._x = 420;
}
pickle = false;
}
dead = false;
cheesehit = false;
damagetime = getTimer();
}
Instance of Symbol 121 MovieClip "badtemp" in Frame 235
onClipEvent (enterFrame) {
if (_root.paused || (_root.disablebad)) {
return(undefined);
}
if (_name == "bad") {
if (dead && (_currentframe < 30)) {
gotoAndPlay ("die");
}
if (hitbynun) {
hitbynun = false;
Die();
_root.nun.leaving = true;
return(undefined);
}
if (hitTest(_root.nun.attackbox) && (_root.nun.attacking)) {
hitbynun = true;
}
if (!active) {
currentwait = currentwait + _root.timedelta;
if (8500 < currentwait) {
currentwait = 0;
arr = new Array();
i = 0;
while (i < _root.totalpickles) {
if (eval ("_root.cuke" + i).active) {
arr.push(i);
}
i++;
}
if (arr.length == 0) {
return(undefined);
}
arr.sort(_root.rands);
cukenum = arr[0];
if (eval ("_root.cuke" + cukenum)._y < 170) {
currentwait = 0;
return(undefined);
}
active = true;
startpick = false;
leaving = false;
gotcuke = false;
gotoAndPlay ("walk");
if (eval ("_root.cuke" + cukenum).onplant) {
if (eval ("_root.cuke" + cukenum)._y < 210) {
_y = 190;
} else if (eval ("_root.cuke" + cukenum)._y < 300) {
_y = 252;
} else {
_y = 330;
}
} else {
_y = eval ("_root.cuke" + cukenum)._y;
}
}
} else {
if (dead || (stun)) {
return(undefined);
}
if (!eval ("_root.cuke" + cukenum).active) {
leaving = true;
_xscale = -100;
}
if (leaving) {
if (-50 < _x) {
_x = (_x - 3);
} else {
stolensound.stop("stolen-alert.wav");
active = false;
leaving = false;
gotoAndPlay ("walk");
_xscale = 100;
picking = false;
lasttime = getTimer();
if (gotcuke) {
_root.pickleslost++;
_root.picklemeter.play();
_root.picklemeter.indicator._alpha = 0;
if (_root.pickleslost == _root.maxpickleslost) {
_root.lostgame = true;
}
}
gotcuke = false;
}
} else {
depdiff = dep - _root.pickleman.dep;
if (((!hitTest(_root.pickleman)) || (_root.pickleman.flying)) || (400 < (depdiff * depdiff))) {
if ((5 < _currentframe) && (!startpick)) {
gotoAndPlay ("walk");
}
xdiff = eval ("_root.cuke" + cukenum)._x - _x;
if ((xdiff * xdiff) < 100) {
if (!startpick) {
startpick = true;
gotoAndPlay ("pick");
} else if (picking) {
picking = false;
gotcuke = true;
leaving = true;
startpick = false;
gotoAndPlay ("walk-cuke");
eval ("_root.cuke" + cukenum).active = false;
eval ("_root.cuke" + cukenum)._alpha = 0;
_root.picklemeter.indicator._alpha = 100;
if ((_root.maxpickleslost - 1) == _root.pickleslost) {
stolensound.start(0, 10000);
}
_xscale = -100;
}
} else {
_x = (_x + 3);
}
} else if (!startpunch) {
gotoAndPlay ("punching");
} else if (punching && (fistbox.hitTest(_root.pickleman.bodyhit) || (_root.pickleman.cheesed && (fistbox.hitTest(_root.pickleman))))) {
_root.pickleman.TakeDamage();
}
}
}
}
}
onClipEvent (load) {
function TakeDamage() {
if ((getTimer() - damagetime) < 1000) {
return(undefined);
}
damagetime = getTimer();
health--;
if (gotcuke) {
_root.picklemeter.indicator._alpha = 0;
DropCuke();
leaving = false;
}
if (health == 0) {
dead = true;
gotoAndPlay ("die");
} else {
gotoAndPlay ("hurt");
}
}
function Die() {
if (dead) {
return(undefined);
}
DropCuke();
health = 0;
dead = true;
gotoAndPlay ("die");
}
function DropCuke() {
if (!gotcuke) {
return(undefined);
}
eval ("_root.cuke" + cukenum)._x = Math.max(10, _x);
eval ("_root.cuke" + cukenum)._y = _y + 15;
eval ("_root.cuke" + cukenum)._rotation = 90;
eval ("_root.cuke" + cukenum)._alpha = 100;
eval ("_root.cuke" + cukenum).active = true;
eval ("_root.cuke" + cukenum).swapDepths(50 + _root.lastcuke);
eval ("_root.cuke" + cukenum).dep = 50 + _root.lastcuke;
eval ("_root.cuke" + cukenum).play();
_root.picklemeter.indicator._alpha = 0;
stolensound.stop("stolen-alert.wav");
gotoAndPlay (1);
leaving = false;
gotcuke = false;
}
desty = 0;
health = 2;
damagetime = getTimer();
dead = false;
lasttime = getTimer();
leaving = false;
gotcuke = false;
startpick = false;
active = false;
currentwait = 0;
stolensound = new Sound();
stolensound.attachSound("stolen-alert.wav");
}
Instance of Symbol 133 MovieClip "nuntemp" in Frame 235
onClipEvent (enterFrame) {
if (_name == "nun") {
if ((_root.paused || (disabled)) || (_root.disablenun)) {
return(undefined);
}
currentwait = currentwait + _root.timedelta;
if (!active) {
if (nexttime < currentwait) {
onscreenwait = 0;
if (_root.leveltitle._currentframe < 301) {
_root.music.stop("in-game-music.wav");
alertsound.start(0, 100000);
_root.leveltitle.gotoAndPlay("nun");
}
if (_y < 350) {
if (_x < 225) {
active = true;
DropItBoys();
} else {
_x = (_x - 4);
_xscale = -100;
}
} else {
_y = (_y - 4);
}
}
} else {
onscreenwait = onscreenwait + _root.timedelta;
if (leaving) {
currentwait = 0;
onscreenwait = 0;
alertsound.stop("nun-alert.wav");
if (!musicstart) {
musicstart = true;
_root.music.start(0, 10000);
}
if (_x < rightrowend) {
_xscale = 100;
_x = Math.min(rightrowend, _x + 4);
} else if (_y < 422) {
_y = (_y + 4);
} else {
musicstart = false;
_root.leveltitle.gotoAndStop(1);
active = false;
leaving = false;
targetacquired = false;
nexttime = (Math.random(15) + 15) * 1000;
}
return(undefined);
}
if (!targetacquired) {
if (leavetime < onscreenwait) {
leaving = true;
}
if (_root.pickleman.punching || (_root.pickleman.pickle)) {
TargetPM();
return(undefined);
}
if (_root.bad.punching || (_root.bad.gotcuke)) {
TargetBad();
return(undefined);
}
} else {
if (target.dead || (target.nunstun)) {
leaving = true;
}
depdiff = dep - target.dep;
depdiffsq = depdiff * depdiff;
desty = target._y + 0;
if (depdiffsq < 100) {
if (desty < _y) {
_y = Math.max(desty, _y - speed);
} else {
_y = Math.min(desty, _y + speed);
}
if (_x < ((target._x - attackdist) - 3)) {
_xscale = 100;
_x = Math.min(target._x - attackdist, _x + speed);
} else if (((target._x + attackdist) + 3) < _x) {
_xscale = -100;
_x = Math.max(target._x + attackdist, _x - speed);
} else {
if (_currentframe < 10) {
gotoAndPlay ("attacking");
}
dist = target._x - _x;
_xscale = ((dist / Math.abs(dist)) * 100);
}
} else if ((_x != rightrowend) && (_x != leftrowend)) {
xrange = rightrowend - leftrowend;
if (((xrange / 2) + leftrowend) < target._x) {
_xscale = 100;
_x = Math.min(rightrowend, _x + speed);
} else {
_xscale = -100;
_x = Math.max(leftrowend, _x - speed);
}
} else if (desty < _y) {
_y = Math.max(desty, _y - speed);
} else {
_y = Math.min(desty, _y + speed);
}
}
_y = Math.max(190, _y);
_x = Math.min(425, _x);
}
}
}
onClipEvent (load) {
function DropItBoys() {
if (_root.pickleman.pickle) {
_root.pickleman.DropCuke();
}
if (_root.bad.gotcuke) {
_root.bad.DropCuke();
_root.bad.leaving = true;
}
}
function TargetPM() {
targetacquired = true;
target = _root.pickleman;
}
function TargetBad() {
targetacquired = true;
target = _root.bad;
}
if (_name != "nun") {
return(undefined);
}
currentwait = 0;
lasttime = getTimer();
nexttime = 12000;
leavetime = 8000;
starttime = getTimer();
active = false;
targetacquired = false;
speed = 17;
attackdist = 50;
leaving = false;
leftrowend = 16;
rightrowend = 423;
musicstart = false;
alertsound = new Sound();
alertsound.attachSound("nun-alert.wav");
}
Instance of Symbol 147 MovieClip "leveltitletemp" in Frame 235
onClipEvent (load) {
if (_name == "leveltitletemp") {
stop();
}
}
Instance of Symbol 165 MovieClip "bat" in Frame 235
onClipEvent (enterFrame) {
if ((!_root.paused) && (!_root.disablebat)) {
xdiff = _x - _root.batx;
ydiff = _y - _root.baty;
if (((xdiff * xdiff) < 25) && ((ydiff * ydiff) < 25)) {
_root.batx = random(500) + 50;
_root.baty = random(75) + 15;
} else {
_x = (_x + ((_root.batx - _x) / 7));
_y = (_y + ((_root.baty - _y) / 7));
}
if (hit.hitTest(_root.pickleman) && (_root.pickleman.pickle)) {
_root.pickleman.cheesed = true;
}
}
}
Instance of Symbol 177 MovieClip "worm" in Frame 235
onClipEvent (enterFrame) {
if ((_root.pickleman.foothit.hitTest(worm) && (_root.pmmovespeed == _root.pmmovespeedoriginal)) && (!_root.pickleman.flying)) {
stop();
worm.gotoAndPlay("die");
dead = true;
}
if (_root.paused) {
stop();
} else if ((!_root.paused) && (!dead)) {
play();
}
}
Frame 236
function RemoveClips() {
removeMovieClip(_root.row3);
removeMovieClip(_root.row2);
removeMovieClip(_root.row1);
removeMovieClip(_root.pickleman);
i = 0;
while (i < _root.totalpickles) {
removeMovieClip(eval ("_root.cuke" + i));
i++;
}
removeMovieClip(_root.cheesemessagebox);
removeMovieClip(_root.bad);
removeMovieClip(_root.fg2);
removeMovieClip(_root.nun);
removeMovieClip(_root.leveltitle);
}
if ((_root.picklesdropped + _root.pickleslost) == _root.totalpickles) {
_root.wongame = true;
}
if (_root.lostgame) {
_root.level = 1;
_root.music.stop();
gotoAndPlay ("losemusic");
}
if (_root.wongame) {
_root.music.stop();
gotoAndPlay ("winmusic");
}
if (Key.isDown(80) && (!_root.buttonlocked)) {
_root.buttonlocked = true;
if (_root.paused) {
if (_root.userpaused) {
_root.paused = false;
_root.userpaused = false;
}
} else {
_root.paused = true;
_root.userpaused = true;
}
}
if (!_root.paused) {
if (_root.pickleman._currentframe != 251) {
_root.pickleman.play();
}
_root.bad.play();
_root.bat.play();
_root.worm.worm.play();
_root.picklemeter.indicator.play();
_root.userpaused = false;
_root.timedelta = _root.currenttime - _root.lasttime;
_root.lasttime = _root.currenttime;
_root.currenttime = getTimer();
} else {
_root.pickleman.stop();
_root.bad.stop();
_root.bat.stop();
_root.worm.worm.stop();
_root.picklemeter.indicator.stop();
_root.lasttime = getTimer();
_root.currenttime = getTimer();
_root.timedelta = 0;
}
SetObjectDepths();
Frame 237
gotoAndPlay ("gameloop");
Frame 238
_root.paused = true;
_root.musictime = getTimer();
_root.bad.gotoAndPlay("die");
Frame 239
if (3000 < (getTimer() - _root.musictime)) {
if (_root.level < 3) {
RemoveClips();
_root.level++;
_root.picklemeter._x = 800;
_root.picklemeter._name = "_root.pick" + _root.maxpickleslost;
gotoAndPlay ("gameinit");
} else {
gotoAndPlay ("win");
}
}
Frame 240
gotoAndPlay(_root._currentframe - 1);
Frame 241
_root.paused = true;
_root.musictime = getTimer();
Frame 242
if (3000 < (getTimer() - _root.musictime)) {
gotoAndPlay ("lose");
}
Frame 243
gotoAndPlay(_root._currentframe - 1);
Frame 244
_root.time = getTimer();
RemoveClips();
Frame 245
if (Key.isDown(65) || (10000 < (getTimer() - time))) {
gotoAndPlay ("credits");
}
Frame 246
gotoAndPlay(_root._currentframe - 1);
Frame 247
_root.time = getTimer();
RemoveClips();
Frame 248
if (Key.isDown(65) || (12000 < (getTimer() - time))) {
gotoAndPlay ("credits");
}
Frame 249
gotoAndPlay(_root._currentframe - 1);
Frame 250
_root.readytostart = false;
Frame 251
if (_root.readytostart) {
gotoAndPlay ("difficulty");
}
if (Key.isDown(65)) {
_root.instructions.play();
}
if (Key.isDown(68)) {
_root.readytostart = true;
}
Frame 252
gotoAndPlay(_root._currentframe - 1);
Frame 253
_root.backtostart = false;
Frame 254
if (Key.isDown(65)) {
_root.credits.play();
_root.buttonlocked = true;
}
if (_root.backtostart) {
gotoAndPlay ("title");
}
Frame 255
gotoAndPlay(_root._currentframe - 1);
Frame 256
if (!Key.isDown(65)) {
_root.buttonlocked = false;
}
if (Key.isDown(65) && (!_root.buttonlocked)) {
gotoAndPlay ("gameinit");
}
if (Key.isDown(38)) {
_root.ast._x = 224.4;
_root.ast._y = 164.4;
_root.hardmode = false;
}
if (Key.isDown(40)) {
_root.ast._x = 224.4;
_root.ast._y = 181.4;
_root.hardmode = true;
}
Frame 257
gotoAndPlay(_root._currentframe - 1);
Symbol 12 MovieClip Frame 1
stop();
Symbol 12 MovieClip Frame 100
stop();
Symbol 25 Button
on (release) {
_root.gotoAndPlay("instructions");
}
Symbol 43 MovieClip Frame 44
_root.picklesdropped++;
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
punching = false;
startpunch = false;
startpickup = false;
Symbol 87 MovieClip Frame 5
startpunch = false;
startpickup = false;
picking = false;
_root.boxshowing = false;
Symbol 87 MovieClip Frame 9
gotoAndPlay ("walking");
Symbol 87 MovieClip Frame 10
punching = false;
startpunch = false;
if (!pickle) {
gotoAndPlay ("flying");
}
Symbol 87 MovieClip Frame 22
gotoAndPlay ("flying_pickle");
Symbol 87 MovieClip Frame 35
gotoAndPlay ("flying");
Symbol 87 MovieClip Frame 36
punching = false;
startpunch = true;
Symbol 87 MovieClip Frame 40
punching = true;
Symbol 87 MovieClip Frame 44
startpunch = false;
punching = false;
gotoAndStop (5);
Symbol 87 MovieClip Frame 215
cheesed = false;
gotoAndStop (5);
Symbol 87 MovieClip Frame 251
if (!nunstun) {
_root.lostgame = true;
_root.paused = true;
}
stop();
Symbol 87 MovieClip Frame 252
picking = false;
startpickup = true;
Symbol 87 MovieClip Frame 256
picking = true;
Symbol 87 MovieClip Frame 260
startpickup = false;
gotoAndStop (5);
picking = false;
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 6
gotoAndPlay (2);
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 2
stop();
Symbol 99 MovieClip Frame 3
stop();
Symbol 99 MovieClip Frame 4
stop();
Symbol 99 MovieClip Frame 5
stop();
Symbol 99 MovieClip Frame 6
stop();
Symbol 99 MovieClip Frame 7
stop();
Symbol 99 MovieClip Frame 8
_root.lostgame = true;
Symbol 100 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 2
stop();
Symbol 100 MovieClip Frame 3
stop();
Symbol 100 MovieClip Frame 4
stop();
Symbol 100 MovieClip Frame 5
_root.lostgame = true;
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
stop();
Symbol 101 MovieClip Frame 3
stop();
Symbol 101 MovieClip Frame 4
stop();
Symbol 101 MovieClip Frame 5
_root.lostgame = true;
Symbol 121 MovieClip Frame 1
punching = false;
startpunch = false;
stun = false;
Symbol 121 MovieClip Frame 5
startpick = false;
picking = false;
gotoAndPlay (1);
Symbol 121 MovieClip Frame 6
startpunch = true;
Symbol 121 MovieClip Frame 15
punching = true;
Symbol 121 MovieClip Frame 16
punching = false;
Symbol 121 MovieClip Frame 19
gotoAndStop (1);
Symbol 121 MovieClip Frame 22
picking = true;
Symbol 121 MovieClip Frame 24
startpick = false;
picking = false;
gotoAndStop (1);
Symbol 121 MovieClip Frame 25
if (!gotcuke) {
gotoAndPlay (1);
}
Symbol 121 MovieClip Frame 29
gotoAndPlay ("walk-cuke");
Symbol 121 MovieClip Frame 30
punching = false;
startpunch = false;
picking = false;
startpick = false;
Symbol 121 MovieClip Frame 139
dead = false;
health = 2;
leaving = true;
_xscale = -100;
gotoAndPlay (1);
Symbol 121 MovieClip Frame 140
stun = true;
Symbol 121 MovieClip Frame 152
stun = false;
gotoAndPlay ("walking");
Symbol 133 MovieClip Frame 1
attacking = false;
Symbol 133 MovieClip Frame 9
gotoAndPlay ("walking");
Symbol 133 MovieClip Frame 17
attacking = true;
Symbol 133 MovieClip Frame 20
attacking = false;
Symbol 133 MovieClip Frame 21
if (!leaving) {
gotoAndPlay ("attacking");
} else {
gotoAndPlay (1);
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 2
stop();
Symbol 134 MovieClip Frame 3
stop();
Symbol 134 MovieClip Frame 4
_root.lostgame = true;
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 2
_root.lostgame = true;
stop();
Symbol 147 MovieClip Frame 2
_root.paused = true;
Symbol 147 MovieClip Frame 100
_root.paused = false;
stop();
Symbol 147 MovieClip Frame 101
_root.paused = true;
Symbol 147 MovieClip Frame 200
_root.paused = false;
stop();
Symbol 147 MovieClip Frame 201
_root.paused = true;
Symbol 147 MovieClip Frame 301
_root.paused = false;
gotoAndStop (1);
Symbol 147 MovieClip Frame 401
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 2
_root.paused = true;
Symbol 160 MovieClip Frame 15
if (Key.isDown(65)) {
gotoAndPlay (17);
}
Symbol 160 MovieClip Frame 16
gotoAndPlay (15);
Symbol 160 MovieClip Frame 17
_root.paused = false;
gotoAndStop (1);
Symbol 160 MovieClip Frame 167
gotoAndStop (1);
Symbol 176 MovieClip Frame 9
gotoAndPlay (1);
Symbol 176 MovieClip Frame 10
_root.pmmovespeed = 1.5;
Symbol 176 MovieClip Frame 29
_root.worm.gotoAndPlay(1);
Symbol 177 MovieClip Frame 1
dead = false;
Symbol 177 MovieClip Frame 126
_root.pmmovespeed = _root.pmmovespeedoriginal;
Symbol 177 MovieClip Frame 1417
gotoAndPlay ("start");
Symbol 183 MovieClip Frame 1
stop();
Symbol 183 MovieClip Frame 2
stop();
Symbol 183 MovieClip Frame 3
stop();
Symbol 183 MovieClip Frame 4
_root.pickleman.dead = true;
_root.pickleman.gotoAndPlay("die");
stop();
Symbol 211 MovieClip Frame 155
stop();
Symbol 222 MovieClip Frame 40
stop();
Symbol 222 MovieClip Frame 83
stop();
Symbol 222 MovieClip Frame 129
stop();
Symbol 222 MovieClip Frame 175
stop();
Symbol 222 MovieClip Frame 242
stop();
Symbol 222 MovieClip Frame 243
_root.readytostart = true;
Symbol 228 Button
on (release) {
getURL ("http://www.i-mockery.com", "_blank");
}
Symbol 229 MovieClip Frame 32
stop();
Symbol 229 MovieClip Frame 33
_root.backtostart = true;
stop();
Symbol 231 Button
on (release) {
_root.ast._x = 224.4;
_root.ast._y = 164.4;
_root.hardmode = false;
}
Symbol 232 Button
on (release) {
_root.ast._x = 224.4;
_root.ast._y = 181.4;
_root.hardmode = true;
}