Frame 12
this.onEnterFrame = function () {
if (this.getBytesLoaded() >= this.getBytesTotal()) {
gotoAndPlay (26);
delete this.onEnterFrame;
}
};
Frame 25
gotoAndPlay (1);
Frame 488
gotoAndPlay (153);
Frame 489
stop();
Frame 490
Frame 995
function inputSubmitted() {
gShowString = new Array();
gAcceptInput = false;
pl.stop();
player.faceDir = "";
if (gSpecial) {
switch (gSpecialState) {
case "jhonkaTalk" :
talkJhonka(input_mc.input.text.toLowerCase());
break;
case "quiz" :
getQuizAnswer(input_mc.input.text.toLowerCase());
break;
case "keeperItem" :
getKeeperItem(input_mc.input.text.toLowerCase());
break;
default :
trace("Error - gSpecial is active but no matching state");
}
} else {
parseText(input_mc.input.text.toLowerCase());
}
displayText();
}
function parseText(pS) {
pS = preParse(pS);
pS = removeTrailingSpace(pS);
if (parseRoom(pS)) {
return(true);
}
parseAnyRoom(pS);
}
function addEvent(eventFunction, afterPage) {
var newEventObj = new Object({eventFunction:eventFunction, afterPage:afterPage});
gEventsList.push(newEventObj);
}
function isEventFor(pageNum) {
var i = 0;
while (i < gEventsList.length) {
if (gEventsList[i].afterPage == (pageNum - 1)) {
return(i);
}
i++;
}
return(-1);
}
function showText(phrase, newpage) {
var i;
if (newpage) {
i = gShowString.length;
} else {
i = gShowString.length - 1;
if (i < 0) {
i = 0;
}
}
gShowString[i] = gShowString[i] + phrase;
}
function displayText() {
input_mc.input.text = "";
var eventNum = isEventFor(gCurrentShowString);
trace("displayText(): called " + eventNum);
if (eventNum > -1) {
trace("Wait, there's an event here!!!");
textShow_mc._visible = false;
gRunningEvent = true;
var theFunction = eval (gEventsList.shift().eventFunction);
theFunction();
return(false);
}
if (gCurrentShowString < gShowString.length) {
textShow_mc._visible = true;
textShow_mc.textInstance.text = gShowString[gCurrentShowString];
resizeTextShow();
gCurrentShowString++;
} else {
gShowString = new Array();
gEventsList = new Array();
textShow_mc._visible = false;
gAcceptInput = true;
gCurrentShowString = 0;
if (gGameOver) {
gotoAndPlay (1010);
}
}
}
function resizeTextShow() {
textShow_mc.textMiddle_mc._height = textShow_mc.textInstance.textHeight + 9;
textShow_mc.bottomCap_mc._y = ((textShow_mc.textMiddle_mc._y + textShow_mc.textMiddle_mc._height) + textShow_mc.bottomCap_mc._height) - 1;
}
function parseRoom(pS) {
if (!gameState.trogdorAwake) {
if (parseForSaveGame(pS)) {
return(true);
}
if (parseForInventoryItem(pS)) {
trace("parseForInventoryItem(pS) returned true");
return(true);
}
}
if (gameState.wearingHay && (isAction(pS, "look"))) {
showText("Right now, you see a bunch of hay.");
return(true);
}
if (isScene(1, 1)) {
if (parseRoom1x1(pS)) {
return(true);
}
}
if (isScene(5, 4)) {
if (parseRoom5x4(pS)) {
return(true);
}
}
if (isScene(0, 5)) {
if (parseRoom0x5(pS)) {
return(true);
}
}
if (isScene(9, 1)) {
if (parseFinalScene(pS)) {
return(true);
}
}
if (isScene(5, 2)) {
if (parseRoom5x2(pS)) {
return(true);
}
}
if (isScene(5, 1)) {
if (parseRoom5x1(pS)) {
return(true);
}
}
if (isScene(3, 1)) {
if (pS == "look") {
showText("You've come across some kind of shooting gallery. There's a depressed looking archer at the desk there.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "desk") || (isObj(pS, "table")))) {
showText("It says 'archery' on it. My wife's drunk.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "target") || (isObj(pS, "targets")))) {
showText("Hey, they had those same targets at Peasant Scout Camp!");
return(true);
}
if ((((isAction(pS, "push") || (isAction(pS, "pull"))) || (isAction(pS, "move"))) || (isTake(pS, "target"))) && (isObj(pS, "target") || (isObj(pS, "targets")))) {
showText("No. Those will fall on you and more than likely kill you.");
return(true);
}
if (isTake(pS, "arrow") || (isTake(pS, "arrows"))) {
showText("They have \"RANGE\" printed on them, so it would be kind of embarassing to have to shoot around with them. Also, that guy over there is giving you the evil eye.");
return(true);
}
if (gameState.talkedDongelev) {
if ((((((((((pS == "mendelev says haldo") || (pS == "haldo")) || (pS == "tell Dongolev haldo")) || (pS == "tell the archer haldo")) || (pS == "tell archer haldo")) || (isAction(pS, "say haldo"))) || (pS == "tell man haldo")) || (pS == "tell guy haldo")) || (pS == "tell the man haldo")) || (pS == "tell the guy haldo")) {
showText("\"Haldo!!!\"", true);
return(true);
}
if ((((((((((((isAskAbout(pS, "dongelev") || (isAskAbout(pS, "mendelev"))) || (isAskAbout(pS, "twins"))) || (isAskAbout(pS, "guys"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dudes"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "men"))) || (isAskAbout(pS, "brothers"))) || (isAskAbout(pS, "archers"))) || (isAskAbout(pS, "archer"))) || (isAskAbout(pS, "brother"))) && (isObj(pS, "trogdor"))) {
showText("\"Oh man, there was this one time when I came THIS close to having Trogdor ARROWED!\" says Dongolev.");
showText("\"Hey shut up! That was me!\" interrupts Mendelev, \"YOU almost arrowed that blue baby!\" says Dongolev.", true);
showText("\"Did not!\"", true);
showText("\"Did so!\"", true);
showText("\"Did not!\"", true);
showText("(You see where this is going.)", true);
return(true);
}
if ((((((((((((isAskAbout(pS, "dongelev") || (isAskAbout(pS, "mendelev"))) || (isAskAbout(pS, "twins"))) || (isAskAbout(pS, "guys"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dudes"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "men"))) || (isAskAbout(pS, "brothers"))) || (isAskAbout(pS, "archers"))) || (isAskAbout(pS, "archer"))) || (isAskAbout(pS, "brother"))) && ((((isObj(pS, "dress") || (isObj(pS, "robes"))) || (isObj(pS, "clothing"))) || (isObj(pS, "clothes"))) || (isObj(pS, "robe")))) {
showText("\"We wouldn't know. We only wear archer clothes. You just can't arch real well in a robe, y'know?\"");
return(true);
}
if ((((((((((((isAskAbout(pS, "dongelev") || (isAskAbout(pS, "mendelev"))) || (isAskAbout(pS, "twins"))) || (isAskAbout(pS, "guys"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dudes"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "men"))) || (isAskAbout(pS, "brothers"))) || (isAskAbout(pS, "archers"))) || (isAskAbout(pS, "archer"))) || (isAskAbout(pS, "brother"))) && (isObj(pS, "fire"))) {
showText("\"Trogdor just burned down some idiot peasant's cottage. You should ask him,\" says Mendelev.");
showText("\"Yeah, this jerk goes on vacation to some prancey lake and...\"", true);
showText("They see you staring daggers at them and turning bright red.", true);
showText("\"Oh. Nevermind,\" says Dongolev. \"Um, yeah. What's a fire?\" adds Mendelwhatever.", true);
return(true);
}
if ((((((((((((isAskAbout(pS, "dongelev") || (isAskAbout(pS, "mendelev"))) || (isAskAbout(pS, "twins"))) || (isAskAbout(pS, "guys"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dudes"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "men"))) || (isAskAbout(pS, "brothers"))) || (isAskAbout(pS, "archers"))) || (isAskAbout(pS, "archer"))) || (isAskAbout(pS, "brother"))) && ((isObj(pS, "smell") || (isObj(pS, "stink"))) || (isObj(pS, "smelling")))) {
showText("\"That giant pig running around sure smells. Maybe talk to him.\"");
return(true);
}
if ((((((((((((isAskAbout(pS, "dongelev") || (isAskAbout(pS, "mendelev"))) || (isAskAbout(pS, "twins"))) || (isAskAbout(pS, "guys"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dudes"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "men"))) || (isAskAbout(pS, "brothers"))) || (isAskAbout(pS, "archers"))) || (isAskAbout(pS, "archer"))) || (isAskAbout(pS, "brother"))) && (isObj(pS, "ned"))) {
showText("\"That guy creeps us out. In fact, shut up about him.\"");
return(true);
}
if (((((((((((isAskAbout(pS, "dongelev") || (isAskAbout(pS, "mendelev"))) || (isAskAbout(pS, "twins"))) || (isAskAbout(pS, "guys"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dudes"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "men"))) || (isAskAbout(pS, "brothers"))) || (isAskAbout(pS, "archers"))) || (isAskAbout(pS, "archer"))) || (isAskAbout(pS, "brother"))) {
showText("\"Either we don't know anything about that, or you're real boring.\"");
return(true);
}
if (isAction(pS, "look")) {
showText("You've come across some kind of shooting gallery. A pair of twin brothers seem to be running the place.");
return(true);
}
if ((((((((pS == "play") || (pS == "play again")) || (pS == "try the game again")) || (pS == "try game again")) || (pS == "play game again")) || (pS == "play the game again")) || (pS == "talk")) || ((isAction(pS, "play the game") || (isAction(pS, "play game"))) || (((isAction(pS, "talk") || (isAction(pS, "speak"))) || (isAction(pS, "use"))) && (((((((((((((isObj(pS, "archers") || (isObj(pS, "dongolev"))) || (isObj(pS, "mendelev"))) || (isObj(pS, "guys"))) || (isObj(pS, "guy"))) || (isObj(pS, "man"))) || (isObj(pS, "men"))) || (isObj(pS, "dudes"))) || (isObj(pS, "brothers"))) || (isObj(pS, "archer"))) || (isObj(pS, "dongolev"))) || (isObj(pS, "mendelev"))) || (isObj(pS, "range"))) || (isObj(pS, "gallery")))))) {
if (gameState.hasBow) {
showText("\"Go away!\" says Dongolev. \"We're arguing about who's hotter,\" adds Mendelev.");
return(true);
}
if (gameState.gaveTrinket) {
showText("\"Haldo again!\" say the brothers. \"Get 3 bullseyes this time and you'll win yourself an SuperTime FunBow\"");
showText("\"The ARROW KEYS aim left and right and the SPACE BAR operates the bow. You'll need to press it a couple of times to get a nice shot off but we don't give lessons so you're on your own.\"", true);
addEvent("playArcheryGame", 1);
} else {
showText("\"Haldo!\" say the brothers. \"Test your skill! Give us the right super item from your inventory and you can give it as many tries as you need!\"");
}
return(true);
}
if ((isAction(pS, "play the game") || (isAction(pS, "play game"))) || ((isAction(pS, "use") || (isAction(pS, "give"))) && (((((((isObj(pS, "trinket") || (isObj(pS, "trinket to archers"))) || (isObj(pS, "trinket to the archers"))) || (isObj(pS, "trinket to archer"))) || (isObj(pS, "trinket to the archer"))) || (isObj(pS, "trinket to brothers"))) || (isObj(pS, "trinket to guys"))) || (isObj(pS, "trinket to men"))))) {
if (gameState.hasBow) {
showText("\"Go away!\" says Dongolev. \"We're arguing about who's hotter,\" adds Mendelev.");
return(true);
}
if (gameState.gaveTrinket) {
showText("You already gave them the trinket. Fortunately, you have an open invitation to humiliate yourself at the range.");
showText("\"The ARROW KEYS aim left and right and the SPACE BAR operates the bow. You'll need to press it a couple of times to get a nice shot off but we don't give lessons so you're on your own.\"", true);
addEvent("playArcheryGame", 0);
} else if (gameState.hasTrinket) {
gameState.gaveTrinket = true;
gameState.hasTrinket = false;
gLastPointAmount = 2;
addEvent("scoreSomePoints", -1);
showText("\"That'll work,\" says Mendelev. Just hit 3 bullseyes and you win the SuperTime FunBow TM!\"");
showText("\"The ARROW KEYS aim left and right and the SPACE BAR operates the bow. You'll need to press it a couple of times to get a nice shot off but we don't give lessons so you're on your own.\"", true);
addEvent("playArcheryGame", 1);
} else {
showText("You're flyin' trinket-free right now.");
}
return(true);
}
} else {
if ((isAction(pS, "play the game") || (isAction(pS, "play game"))) || ((isAction(pS, "use") || (isAction(pS, "shoot"))) && (isObj(pS, "gallery") || (isObj(pS, "range"))))) {
showText("The gallery's not open and you got no bow or arrows, Cupid.");
return(true);
}
if (gameState.talkedMendelev) {
if (isAction(pS, "look") && (isObj(pS, "archer"))) {
showText("He looks depressed. Jeez, who invited the fun sponge?");
return(true);
}
if ((pS == "talk") || (((isAction(pS, "talk") || (isAction(pS, "speak"))) || (isAction(pS, "ask"))) && (((((isObj(pS, "archer") || (isObj(pS, "man"))) || (isObj(pS, "mendelev"))) || (isObj(pS, "dude"))) || (isObj(pS, "guy"))) || (isObj(pS, "about it"))))) {
showText("\"Tell my bro I said 'haldo' if you see him,\" he says and goes back to pouting.");
return(true);
}
} else {
trace("evaluating text (not talked to Mendelev");
if (isAction(pS, "look") && (isObj(pS, "archer"))) {
showText("He looks depressed. He keeps sighing all obviously like he wants you to ask about it.");
return(true);
}
if ((pS == "talk") || (((isAction(pS, "talk") || (isAction(pS, "speak"))) || (isAction(pS, "ask"))) && (((((isObj(pS, "archer") || (isObj(pS, "man"))) || (isObj(pS, "mendelev"))) || (isObj(pS, "dude"))) || (isObj(pS, "guy"))) || (isObj(pS, "about it"))))) {
if (scene_mc.hotSpot1.hitTest(pl.collide)) {
addEvent("gotoTable", -1);
showText("\"Oh, hi. I'm Mendelev,\" says the archer. \"I used to run a shooting range here with my brother Dongolev. But we don't talk so much anymore. I haven't seen him in a Jhonka's age. If you ever run into him, tell him I said 'haldo'.");
showText("\"You mean 'hello,'\" you ask?", true);
showText("\"Oh, um. No. Shut up. I said 'haldo' and I meant 'haldo.' Tell him I said 'haldo.'\"", true);
gameState.talkedMendelev = true;
addEvent("scoreSomePoints", 2);
} else {
showText("Why don't you saddle up to the front of the table there, cowboy?", true);
}
return(true);
}
}
}
}
if (isScene(3, 4)) {
if (pS == "look") {
showText("There's a really generic well here. Oh, and apparently it's autumn on this screen.");
return(true);
}
if (((isAction(pS, "look in") || (isAction(pS, "look inside"))) || (isAction(pS, "look down"))) && (isObj(pS, "well"))) {
showText("It's dark and welly in there. Smell like stank too. ");
if (!gameState.hasMask) {
showText("You can just make out something floating in the water down there. ", false);
}
if (gameState.bucketDown) {
showText("The bucket is currently down.", false);
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree"))) {
showText("That's one orange tree alright.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "well"))) {
showText("Pretty average. You're not a big well person. You're more into bridges. It does have a cute little bucket though. Your dad liked buckets. Oh, and there's a metal crank, too. Meemaw loved cranks.");
if (!gameState.hasMask) {
showText("You can just make out something floating in the water down there.", true);
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "bucket"))) {
if (gameState.maskInBucket) {
showText("There's a monster maskus in there!");
} else {
showText("An empty wooden bucket hangs on a rope in the well.");
}
if (gameState.bucketDown) {
showText("The bucket is currently down.", false);
}
return(true);
}
if ((((isAction(pS, "get in") || (isAction(pS, "climb in"))) || (isAction(pS, "ride"))) || (isAction(pS, "enter"))) && (isObj(pS, "bucket"))) {
showText("Your butt is too big.");
return(true);
}
if ((((isAction(pS, "get in") || (isAction(pS, "go down"))) || (isAction(pS, "climb"))) || (isAction(pS, "enter"))) && (isObj(pS, "well"))) {
showText("No go. Your insurance doesn't cover that.");
return(true);
}
if ((pS == "make a wish") || (pS == "make wish")) {
showText("This isn't that kind of well. This is a plaguewater well.");
return(true);
}
if ((pS == "talk") || (isTalk(pS, "well"))) {
showText("You yell into the well and enjoy the echo. Keep in mind there are no stereos yet.");
return(true);
}
if ((isAction(pS, "look") && (isObj(pS, "mask"))) && (gameState.maskInBucket)) {
showText("It's a hideous monster maskus, for wearing on your face, framed attractively by the rim of an old oaken bucket. Gripping!");
return(true);
}
if (isTake(pS, "maskus") || (isTake(pS, "mask"))) {
if (gameState.maskInBucket && (gameState.bucketDown)) {
showText("You grab up the scary monster maskus. Man, this thing could scare a horse!");
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.maskInBucket = false;
return(true);
}
}
if (isTake(pS, "bucket")) {
showText("You can't, it's tied to a rope and you're terrible with knots.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "crank") || (isObj(pS, "handle")))) {
if (!gameState.crankWorking) {
showText("It looks rusted in place.");
return(true);
}
showText("That is a bonafide crank. It seems to work now.");
return(true);
}
if (((pS == "deploy baby") || (pS == "deploy q-baby")) || (((((isAction(pS, "put") || (isAction(pS, "throw"))) || (isAction(pS, "deploy"))) || (isAction(pS, "drop"))) || (isAction(pS, "use"))) && (isObj(pS, "baby in bucket") || (isObj(pS, "baby in the bucket"))))) {
if (gameState.hasBaby) {
if (scene_mc.hotSpot1.hitTest(pl.collide)) {
if (gameState.hasMeatball) {
showText("Li'l tyke seems to enjoy the ride, but - thin or not - we've got a plot to advance here.");
} else {
addEvent("walkToWell", -1);
showText("Okay, Father of the Year. You put a baby in a bucket and it quickly descends deep into the well. Yours is a black, black heart.");
addEvent("dropBucketWithBaby", -1);
gameState.bucketDown = true;
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gameState.babyInBucket = true;
gameState.crankWorking = true;
}
// unexpected jump
}
showText("You're not that keen a shot. Try standing a little closer.");
return(true);
} else {
showText("Hmmmm... A baby, eh? You check your sundial. Babies-R-Us is probably closed by now.");
}
return(true);
}
if (isAction(pS, "throw") && (isObj(pS, "baby"))) {
if (gameState.hasBaby) {
showText("Throw it where?");
} else {
showText("Hmmmm... A baby, eh? You check your sundial. Babies-R-Us is probably closed by now.");
}
return(true);
}
if (isAction(pS, "drop") && (isObj(pS, "baby"))) {
if (gameState.hasBaby) {
showText("Like where?");
} else {
showText("Hmmmm... A baby, eh? You check your sundial. Babies-R-Us is probably closed by now.");
}
return(true);
}
if (((((isAction(pS, "put") || (isAction(pS, "throw"))) || (isAction(pS, "deploy"))) || (isAction(pS, "drop"))) || (isAction(pS, "use"))) && (isObj(pS, "baby in well") || (isObj(pS, "baby in the well")))) {
if (gameState.hasBaby) {
showText("Jeez man! At least put the poor little guy in the bucket! Give him a fighting chance!");
} else {
showText("Hmmmm... A baby, eh? You check your sundial. Babies-R-Us is probably closed by now.");
}
return(true);
}
if ((isAction(pS, "raise") && (isObj(pS, "bucket"))) || ((isAction(pS, "turn") || (isAction(pS, "use"))) && (isObj(pS, "crank") || (isObj(pS, "handle"))))) {
if (!gameState.crankWorking) {
if (scene_mc.hotSpot1.hitTest(pl.collide)) {
addEvent("walkToWell", -1);
showText("It won't budge. Maybe if there was something heavy in that bucket...");
} else {
showText("You can't reach from there.");
}
return(true);
}
if (scene_mc.hotSpot1.hitTest(pl.collide)) {
addEvent("walkToWell", -1);
if (gameState.bucketDown) {
gameState.bucketDown = false;
if (gameState.maskInBucket) {
addEvent("raiseMask", -1);
showText("The crank seems to have loosened and you haul the bucket back up. What's this? Why there's a monster maskus in there! No doubt leftover from some pagan ritual. Silly pagans.");
addEvent("emptyBucket", 0);
showText("You grab up the scary monster maskus. Man, this thing could scare a horse!", true);
gameState.hasMask = true;
inventoryHistory.hasMask = true;
gameState.bucketDown = false;
gameState.maskInBucket = false;
gameState.babyInBucket = false;
return(true);
}
if (gameState.babyInBucket) {
addEvent("raiseBaby", -1);
showText("You haul the bucket back up. Lucky for you, the baby is still in it and appears to be unscathed. As a bonus, it looks like he found a Meatball sub down there. Score! You take the sub.");
addEvent("emptyBucket", 0);
showText("Oh, and the baby. You take the baby.", true);
gLastPointAmount = 2;
addEvent("scoreSomePoints", 1);
gameState.hasMeatball = true;
inventoryHistory.hasMeatball = true;
gameState.bucketDown = false;
gameState.maskInBucket = false;
gameState.babyInBucket = false;
return(true);
}
showText("The drama grips you, but the bucket is empty. On the bright side, you're getting a pretty sweet workout for your Deltoidus Rex muscles.");
addEvent("raiseEmpty", -1);
return(true);
}
addEvent("dropBucket", -1);
gameState.bucketDown = true;
showText("Down she goes! You could do this all day!");
} else {
showText("You got a short reach to match your short pants. Try standing closer to that crank.");
}
return(true);
}
if (isAction(pS, "use") && ((isObj(pS, "pebbles") || (isObj(pS, "stones"))) || (isObj(pS, "rocks")))) {
trace("use pebbles!");
if (gameState.pebblesTaken) {
showText("What do you propose to do with them? Discuss.");
} else {
showText("Find some pebbles first and you might have the makings of a good idea. About time.");
}
return(true);
}
if ((((isAction(pS, "throw") || (isAction(pS, "use"))) || (isAction(pS, "put"))) || (isAction(pS, "drop"))) && ((isObj(pS, "stones in well") || (isObj(pS, "rocks in well"))) || (isObj(pS, "pebbles in well")))) {
if (gameState.hasPebbles) {
showText("Then it'd be tough to get them back. You never go ANYwhere without your rocks");
} else {
showText("Riiight, right. Which ones?");
}
return(true);
}
if (((isAction(pS, "fill bucket") || (isAction(pS, "fill the bucket"))) && (isObj(pS, "stones") || (isObj(pS, "pebbles")))) || ((((isAction(pS, "use") || (isAction(pS, "put"))) || (isAction(pS, "throw"))) || (isAction(pS, "drop"))) && ((isObj(pS, "stones in bucket") || (isObj(pS, "rocks in bucket"))) || (isObj(pS, "pebbles in bucket"))))) {
if (!gameState.pebblesTaken) {
showText("Find some pebbles first and you might have the makings of a good idea. About time.");
return(true);
}
if (gameState.pebblesUsed) {
showText("We've already been through this exercise and it went pretty well, ya?");
return(true);
}
addEvent("walkToWell", -1);
addEvent("dropBucket", -1);
gameState.bucketDown = true;
showText("You plunk all your pebbles into the bucket. The weight causes it to descend to the bottom of the well with a quickness!");
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.pebblesTaken = true;
gameState.hasPebbles = false;
inventoryHistory.hasPebbles = true;
gameState.pebblesUsed = true;
gameState.crankWorking = true;
gameState.maskInBucket = true;
gameState.bucketDown = true;
return(true);
}
if (((isAction(ps, "put") || (isAction(ps, "drop"))) || (isAction(ps, "throw"))) && ((isObj(pS, "stones") || (isObj(pS, "baby"))) || (isObj(pS, "pebbles")))) {
showText("Where you wanna toss em?");
return(true);
}
if (isAction(ps, "fill") && (isObj(pS, "bucket"))) {
showText("With what?");
return(true);
}
if ((isAction(ps, "put") || (isAction(ps, "drop"))) && (isObj(pS, "in bucket"))) {
showText("That's not heavy enough to weigh down the bucket.");
return(true);
}
}
if (isScene(4, 4)) {
trace("Kerrek Prints at the River");
if (pS == "look") {
showText("Rushing river b/w yellow tree.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree"))) {
showText("You're really hurtin' for puzzle solutions, huh?");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "cottage") || (isObj(pS, "hut")))) {
showText("You see a cottage in the distance. You hold your fingers up to one eye and pretend to squash it.");
return(true);
}
}
if (isScene(1, 3)) {
if (pS == "look") {
showText("There's a run-of-the-mill, non-burninated thatched-roof cottage here. Its stonework looks a little shoddy.");
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "jump"))) && (isObj(pS, "fence"))) {
showText("No, you have business to attend to here in Peasantry.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "fence"))) {
showText("A standard peasant fence. Trogdor makes milk's meat outta these things.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree"))) {
showText("It's Arbor Day, Charlie Brown!");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "house") || (isObj(pS, "cottage"))) || (isObj(pS, "shack"))) || (isObj(pS, "hut")))) {
showText("A run-of-the-mill, non-burninated thatched-roof cottage here. Its stonework looks a little shoddy.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "stonework") || (isObj(pS, "stone"))) || (isObj(pS, "brick"))) || (isObj(pS, "rock")))) {
if (gameState.stoneMoved) {
showText("Some jerk removed a loose stone from the back of the cottage.");
} else {
showText("There appears to be a loose stone towards the back of the cottage.");
}
return(true);
}
if (((((((isAction(pS, "take") || (isAction(pS, "pull"))) || (isAction(pS, "throw"))) || (isAction(pS, "roll"))) || (isAction(pS, "push"))) || (isAction(pS, "get"))) || (isAction(pS, "move"))) && ((isObj(pS, "stone") || (isObj(pS, "brick"))) || (isObj(pS, "rock")))) {
if (gameState.stoneMoved) {
showText("You've already moved the stone out of the way to reveal a less-than peasant-sized hole.");
} else {
addEvent("walkToStone", -1);
addEvent("moveStone", -1);
showText("You slide the stone over to reveal a little hole. If only you could cut off your arms, legs, and head you might be able to squeeze through!");
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.stoneMoved = true;
}
return(true);
}
if ((isAction(pS, "crawl") || (isAction(pS, "climb"))) && (isObj(pS, "hole") || (isObj(pS, "opening")))) {
showText("If only you could cut off your arms, legs, and head you might be able to squeeze through!");
return(true);
}
if (isAction(pS, "cut") && (((((isObj(pS, "arms off") || (isObj(pS, "legs off"))) || (isObj(pS, "head off"))) || (isObj(pS, "arms"))) || (isObj(pS, "legs"))) || (isObj(pS, "head")))) {
showText("Very funny. You have trouble cutting out coupons in the weekly 'Peasant Penny-Pincher' circular. I'd like to see you try.");
return(true);
}
if ((pS == "try") || (isAction(pS, "try") && (((((isObj(pS, "arms off") || (isObj(pS, "legs off"))) || (isObj(pS, "head off"))) || (isObj(pS, "arms"))) || (isObj(pS, "legs"))) || (isObj(pS, "head"))))) {
showText("Okay, fine. You try to cut off your hard-earned extremities. It doesn't work. You dead. Thanks for nothing.");
gameOver();
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "hole"))) {
if (gameState.nedCottageOpen) {
showText("There is no baby here, but there's an open door on the other side of the room. If you could only get to it somehow!");
} else {
showText("You peer into the tiny opening. The cottage appears to be empty.");
}
return(true);
}
if ((isAction(pS, "push") || (isAction(pS, "pull"))) && (isObj(pS, "door"))) {
showText("It doesn't budge, man.");
return(true);
}
if (((pS == "open") || (pS == "open door")) || (pS == "open the door")) {
if (gameState.nedCottageOpen) {
showText("It's already open. Since this is an adventure game we're gonna proffer you adventure yourself on in there.");
} else {
showText("How? There's no knob.");
}
return(true);
}
if ((pS == "close") || (isAction(pS, "close") && (isObj(pS, "door")))) {
if (gameState.nedCottageOpen) {
showText("You can't. That baby really wrenched it open good.");
} else {
showText("Already done. That was easy!");
}
return(true);
}
if ((pS == "knock") || (isAction(pS, "knock") && (isObj(pS, "door")))) {
showText("You could knock until your knuckles bleed. Nobody's home.");
return(true);
}
if (isAttack(pS, "door")) {
showText("Violence is not the answer.");
return(true);
}
if ((((pS == "knock until knuckles bleed") || (pS == "knock until your knuckles bleed")) || (pS == "knock til knuckles bleed")) || (pS == "knock door until knuckles bleed")) {
if (gameState.knucklesBleed) {
showText("You done that already. A great time was had by all.");
} else {
showText("You knock for about 4 hours until your knuckles are raw and bloody. That was fun!");
gameState.knucklesBleed = true;
}
return(true);
}
if (((((((pS == "drop baby") || (pS == "drop the baby")) || (pS == "use baby")) || (pS == "put baby in hole")) || (pS == "deploy baby")) || (pS == "use the baby")) || (pS == "shove baby in hole")) {
if (gameState.nedCottageOpen) {
showText("Li'l P.B. has moved on, and the door seems to be open... I can't see why we'd go through this all over again.");
return(true);
}
if (!gameState.stoneMoved) {
showText("Use the baby where? You haven't anywhere inconsiderate to stuff'm.");
return(true);
}
if (gameState.hasBaby) {
addEvent("walkToBabyNedCottage", -1);
showText("Deploying Q-Baby...");
addEvent("babyNedCottage", 0);
showText("Way to go, baby! It got the cottage door opened and headed off to a new life. He becomes Valedictorian of his graduating class, goes to Scalding Lake State, gets a degree in Advanced Peasantry and lands a job at Thatch-Pro: building better cottages for a better tomorrow.", true);
showText("You grow apart and the letters from him become fewer and fewer. He develops a severe mead problem and blames you for never being there.", true);
gameState.nedCottageOpen = true;
gameState.hasBaby = false;
gLastPointAmount = 5;
addEvent("scoreSomePoints", 2);
} else {
showText("Swell idea, but is you ain't my baby? I.e. you ain't got one?");
}
return(true);
}
}
if (isScene(6, 1)) {
if ((((pS == "climb") || (pS == "scale")) || (pS == "scale")) || (((isAction(pS, "climb") || (isAction(pS, "scale"))) || (isAction(pS, "go up"))) && (((isObj(pS, "mountain") || (isObj(pS, "cliff"))) || (isObj(pS, "rocks"))) || (isObj(pS, "wall"))))) {
addEvent("walkToCliffBase", -1);
showText("With a new determination you dig your fingers into the cliff face and begin to haul yourself up the mountain like you were in a sports drink commercial.");
showText("The mountain starts rumbling and big loose boulders start tumblin down. You'd best avoid thems.", true);
addEvent("playClimbingGame", 1);
return(true);
}
if (pS == "look") {
showText("You're at the base of a very climbable cliff that leads right up to Trogdor's lair. This cliff is huge - the kind where rocks start falling down the minute you try to climb it.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "mountain") || (isObj(pS, "cliff"))) || (isObj(pS, "rocks"))) || (isObj(pS, "wall")))) {
showText("Looks pretty climbable to me.");
return(true);
}
}
if (isScene(7, 1)) {
if (((isAction(pS, "climb") || (isAction(pS, "scale"))) || (isAction(pS, "go up"))) && (((isObj(pS, "mountain") || (isObj(pS, "cliff"))) || (isObj(pS, "rocks"))) || (isObj(pS, "wall")))) {
showText("They don't show how the sports-drink people get down from the cliff. You've no idea how to start.");
return(true);
}
if (pS == "look") {
showText("Wow! It sure gets creepy fast around here! What with all the lightning and the scary cave entrances.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "cave"))) {
showText("The cave entrance beckons to you like a hot mutton sandwich might.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "bones") || (isObj(pS, "skull"))) || (isObj(pS, "bone"))) || (isObj(pS, "skeleton")))) {
showText("You can't be sure but you think those are dead person bones.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "lightning") || (isObj(pS, "thunder"))) || (isObj(pS, "bolts")))) {
showText("Scary. Like Auntie Gerelda's crow's feet.");
return(true);
}
if (((isTake(pS, "bones") || (isTake(pS, "skull"))) || (isTake(pS, "bone"))) || (isTake(pS, "skeleton"))) {
showText("Eww. No. Grody. You're grody. No. Eww.");
return(true);
}
}
if (isScene(8, 1)) {
if (((isAction(pS, "climb") || (isAction(pS, "scale"))) || (isAction(pS, "go up"))) && (((isObj(pS, "outcropping") || (isObj(pS, "cliff"))) || (isObj(pS, "cliffs"))) || (isObj(pS, "outcroppings")))) {
showText("Nope. It's too sheer.");
return(true);
}
if (pS == "look") {
showText("There are 3 openings with a little cliff in front of each. A beaded curtain hangs in a doorway on the far wall.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "cliff") || (isObj(pS, "cliffs"))) || (isObj(pS, "outcroppings"))) || (isObj(pS, "outcropping")))) {
showText("They're just outcroppings really.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "openings") || (isObj(pS, "opening"))) || (isObj(pS, "doorways")))) {
showText("They're mysterious and out of reach. Like girls were to you in high school.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "bones") || (isObj(pS, "skull"))) || (isObj(pS, "bone"))) || (isObj(pS, "skeleton")))) {
showText("You can't be sure but you think those are dead person bones.");
return(true);
}
if (((isTake(pS, "bones") || (isTake(pS, "skull"))) || (isTake(pS, "bone"))) || (isTake(pS, "skeleton"))) {
showText("Eww. No. Grody. You're grody. No. Eww.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "door") || (isObj(pS, "doorway")))) {
showText("A wicked beaded curtain hangs in the doorway.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "curtain") || (isObj(pS, "beads")))) {
showText("That thing's awesome. You always wanted one for your dorm room but your roommate was a total drag and said no.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "curtain") || (isObj(pS, "beads")))) {
showText("This must be one of the mysterious Keepers of Trogdor! High school dropouts, most of them.");
return(true);
}
}
if (isScene(5, 3)) {
if ((isTake(pS, "lamp") || (isTake(pS, "lantern"))) || (isTake(pS, "signal"))) {
showText("Better not. There's an engraved plaque on it that says, \"Do Not Remove Under Penalty of 'You Die'.\"");
return(true);
}
if (isTake(pS, "plaque")) {
showText("You have enough of that on your browning, rotten peasant teeth already.");
return(true);
}
if (isTake(pS, "plague")) {
showText("Wrong game, Mispeller Jones. Try the little button to the left of the 'W'.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "stump") || (isObj(pS, "stub")))) {
showText("NOT a good place to sit.");
return(true);
}
if (gameState.night) {
if (pS == "look") {
showText("A burning signal lantern hangs from a severely burninated tree.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree") || (isObj(pS, "trees")))) {
showText("Severely burninated. They could probably use some salve.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "lamp") || (isObj(pS, "lantern"))) || (isObj(pS, "signal")))) {
showText("It's lit! Musta been a Trogdor sighting tonight.");
return(true);
}
if ((isAction(pS, "light") || (isAction(pS, "burn"))) && ((isObj(pS, "lamp") || (isObj(pS, "lantern"))) || (isObj(pS, "signal")))) {
showText("Already lit, moron.");
return(true);
}
if ((isTake(pS, "fire") || (isTake(pS, "flame"))) || (isAction(pS, "catch") && (isObj(pS, "fire") || (isObj(pS, "flame"))))) {
if (gameState.potTaken) {
if (!gameState.fire) {
showText("You don't need to get IT. Just let IT get YOU.");
} else {
showText("You're already on fire! What? You want to be MORE on fire?");
}
} else {
showText("You're just not flammable enough.");
}
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "scale"))) && ((isObj(pS, "mountain") || (isObj(pS, "cliff"))) || (isObj(pS, "rocks")))) {
showText("There aren't enough footholds and you don't have any carabeaners on you.");
return(true);
}
} else {
if (pS == "look") {
showText("A signal lantern of some kind hangs from a severely burninated tree.");
return(true);
}
if ((isAction(pS, "light") || (isAction(pS, "burn"))) && ((isObj(pS, "lamp") || (isObj(pS, "lantern"))) || (isObj(pS, "signal")))) {
showText("With what? Your red-hot intellect?");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree") || (isObj(pS, "trees")))) {
showText("Severely burninated. They could probably use some salve.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "lamp") || (isObj(pS, "lantern"))) || (isObj(pS, "signal")))) {
showText("It's unlit at the moment. That fancy pants royal knight probably lights it on nights when Troggie's on the prowl.");
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "scale"))) && ((isObj(pS, "mountain") || (isObj(pS, "cliff"))) || (isObj(pS, "rocks")))) {
showText("There aren't enough footholds and you don't have any carabeaners on you.");
return(true);
}
}
}
if (isScene(1, 4)) {
if (gameState.wearingHay) {
showText("Oh OH! Poor Gary is starving and lunch just walked into his glen!");
showText("Now, even though he doesn't know it, Gary has a taste for man-flesh. He begins a mad rampage across the countryside, terrorizing peasants for ages. Way to go. You dead. Thanks for playing.", true);
gameOver();
return(true);
}
if (pS == "look") {
showText("Hey! There's a rotten ol' horse over there!");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "fence"))) {
if (!gameState.fenceBroken) {
showText("A particularly rickety peasant-issue fence. Trogdor uses bits of these as toothpicks.");
} else {
showText("It's got a big ol' hole in it. For walking through.");
}
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "jump"))) && (isObj(pS, "fence"))) {
if (!gameState.fenceBroken) {
showText("No, you have business to attend to here in Peasantry.");
} else {
showText("More like you should walk through that gaping hole in it. Just an idea.");
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "stump"))) {
showText("You run out of ideas as to what to do next, and stare at the stump.");
return(true);
}
if (!gameState.fenceBroken) {
if (isAction(pS, "look") && (((isObj(pS, "insects") || (isObj(pS, "bugs"))) || (isObj(pS, "flies"))) || (isObj(pS, "cloud")))) {
showText("A cloud of buttflies fly around the horse's butt.");
return(true);
}
if (((isTake(pS, "flies") || (isTake(pS, "cloud"))) || (isTake(pS, "insects"))) || (isTake(pS, "bugs"))) {
showText("You nasty. Besides, they wouldn't survive a minute away from that horse's butt.");
return(true);
}
if (((isAttack(pS, "flies") || (isAttack(pS, "cloud"))) || (isAttack(pS, "insects"))) || (isAttack(pS, "bugs"))) {
showText("Those flies and that horse's butt have a symbiotic relationship. You have no right to disrupt that.");
return(true);
}
if (isAction(pS, "ride") && (isObj(pS, "horse") || (isObj(pS, "gary")))) {
showText("Naw, snapping horse spines just doesn't seem as cool as it did in high school.");
return(true);
}
if ((((((isAction(pS, "feed") || (isAction(pS, "use chicken feed"))) || (isAction(pS, "given chicken feed"))) || (isAction(pS, "use feed"))) || (isAction(pS, "give feed"))) || (isAction(pS, "give feed"))) && (isObj(pS, "horse") || (isObj(pS, "gary")))) {
showText("There's a good chance that horse has NEVER eaten. I doubt he'll start now.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "horse") || (isObj(pS, "gary")))) {
showText("This bag o' bones looks like he's headed for the glue factory. He's got the name 'Poor Gary' branded onto his hide.");
return(true);
}
if ((pS == "talk") || (isAction(pS, "talk") && (isObj(pS, "horse") || (isObj(pS, "gary"))))) {
showText("Your attempts at conversation are met with horse grunts and tail flaps. Which is better than you do at conversation with most people.");
return(true);
}
if (isAction(pS, "pet") || (isAction(pS, "stroke"))) {
showText("Aww, that's sweet. Poor Gary tries in vain to bite your arm off.");
return(true);
}
}
if (isAction(pS, "sit") || (isObj(pS, "stump"))) {
showText("Are you THAT bored? Do some questing already!");
return(true);
}
if ((isAction(pS, "look") && (isObj(pS, "rings"))) || (isObj(pS, "rings on tree"))) {
showText("Well, according to these graphics, I'd say the tree was 2 years old.");
return(true);
}
if ((((isAction(pS, "kill") || (isAction(pS, "kick"))) || (isAction(pS, "punch"))) || (isAction(pS, "hurt"))) && (isObj(pS, "horse") || (isObj(pS, "gary")))) {
if (gameState.fenceBroken) {
showText("Gary's gone now. Let go. Just let go.", false);
showText("Let go!", true);
} else {
addEvent("gotoGary", -1);
showText("You attempt to cause Poor Gary harm for no good reason other than you kinda suck at this game.");
addEvent("garyAttack", 0);
showText("WOW! For a decrepit old horse, Poor Gary still packs a mean whallop. You dead. Thanks for playing.", true);
gameOver();
}
return(true);
}
if (isAction(pS, "scare")) {
if (!gameState.hasMask) {
var scareSayings = new Array("You tell Gary the story about the kid who pops this big zit he has and all these baby spiders come out. It doesn't phase him.", "You tell Gary the \"THE CALLS ARE COMING FROM INSIDE THE HOUSE!!\" one but he doesn't act very scared. He's probably heard it before.", "You tell Gary about how much cholesterol is in hay and how his arteries are probably all black and clogged. He shrugs it off.");
showText(scareSayings[Math.floor(Math.random() * scareSayings.length)], false);
} else {
if (gameState.fenceBroken) {
showText("Gary's gone now. Let go. Just let go.", false);
showText("Let go!", true);
} else {
addEvent("gotoGary", -1);
showText("You slip on the hideous monster maskus.", false);
addEvent("scareGary", 0);
showText("You scared the crap outta Poor Gary! He broke on through to the other side!", true);
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.fenceBroken = true;
}
return(true);
}
return(true);
}
if (gameState.hasMask) {
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && (isObj(pS, "maskus") || (isObj(pS, "mask")))) {
if (gameState.fenceBroken) {
showText("Gary's gone now. Let go. Just let go.", false);
showText("Let go!", true);
} else {
addEvent("gotoGary", -1);
showText("You slip on the hideous monster maskus.", false);
addEvent("scareGary", 0);
showText("You scared the crap outta Poor Gary! He broke on through to the other side!", true);
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.fenceBroken = true;
}
return(true);
}
}
}
if (isScene(0, 4)) {
if (pS == "look") {
if (!gameState.talkedDongelev) {
showText("Well, looky here! A hidden glen! You LOVE hidden glens. This one has some kinda archer in it.");
} else {
showText("You're in a hidden glen. There's a tree with a zillion arrows in it.");
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree"))) {
showText("Dude, and then the elf, like, totally climbed up it. It was awesome!");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "fence"))) {
showText("Wow! There's a hole in it on THIS side too!");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "bush") || (isObj(pS, "bushes")))) {
showText("There's some thick 'ol bushes up in this hidden glen.");
return(true);
}
if (isAction(pS, "climb") && (isObj(pS, "tree") || (isObj(pS, "arrows")))) {
showText("Naw, you'd probably figure out some way to kill yourself doing that.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "arrows") || (isObj(pS, "arrow")))) {
showText("Somebody call a tree doctor. Them puppies are stuck in there like a, um, er... stuck pig.");
return(true);
}
if (!gameState.talkedDongelev) {
if ((pS == "talk") || (((isTalk(pS, "archer") || (isTalk(pS, "man"))) || (isTalk(pS, "dude"))) || (isTalk(pS, "guy")))) {
showText("He refuses to speak with you. He just keeps firing arrows into that tree and grumbling, \"stupid Mendelev, grumble mumble.\"");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "archer") || (isObj(pS, "man"))) || (isObj(pS, "dude"))) || (isObj(pS, "guy")))) {
showText("He sure looks miffed at that tree. He's emptied 5 good quivers' worth into that poor thing.");
return(true);
}
}
if (isTake(pS, "arrow") || (isTake(pS, "arrows"))) {
if (!gameState.hasArrow) {
if (gameState.kerreckDead) {
showText("You grab yet another arrow from the tree hoping to get some bonus points.");
gameState.hasArrow = true;
return(true);
}
if (gameState.talkedDongelev) {
addEvent("walkToArrowTree", -1);
showText("You pick out a really good one and yank it from the tree. Hooray! Now you have an arrow!");
gameState.hasArrow = true;
inventoryHistory.hasArrow = true;
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
} else {
addEvent("walkToArrowKill", -1);
showText("Something tells you now's not a good time.");
addEvent("getArrowed", 0);
gameOver();
showText("It wasn't a good time. Hey, my mom's making peasant-kabobs for dinner TOO!", true);
showText("Right. Anyway. You dead. Thanks for playing, and try not to die.", true);
}
} else {
showText("You're pretty much all set on the arrow front. They are kinda cool, though.");
}
return(true);
}
if ((((((((((pS == "mendelev says haldo") || (pS == "haldo")) || (pS == "tell Dongolev haldo")) || (pS == "tell the archer haldo")) || (pS == "tell archer haldo")) || (isAction(pS, "say haldo"))) || (pS == "tell man haldo")) || (pS == "tell guy haldo")) || (pS == "tell the man haldo")) || (pS == "tell the guy haldo")) {
if (gameState.talkedMendelev) {
if (!gameState.talkedDongelev) {
showText("The archer stops arching and turns to you. \"My brother told you to tell me haldo? He must want to start the old business back up!\"");
addEvent("archerLeaves", 0);
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gameState.talkedDongelev = true;
} else {
showText("\"Haldo?.\" you call out... \"Hadloooooo\" ");
}
return(true);
}
showText("\"What'd you read that in the PQ Stragedy Guide? Go talk to my brother first.\"");
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "jump"))) && (isObj(pS, "fence"))) {
showText("Not going to dignify that with a response.");
return(true);
}
}
if (isScene(2, 1)) {
if (isTake(pS, "rock") || (isAction(pS, "look") && (isObj(pS, "rock") || (isObj(pS, "stone"))))) {
showText("That rock's not doin' a whole lot for me.");
return(true);
}
if (gameState.hasRained && (!gameState.richesTaken)) {
if (pS == "look") {
showText("Not much to see. 'Sides that big mud puddle.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "puddle") || (isObj(pS, "mud")))) {
showText("It's that sticky mud. Y'know, the kind pigs like.");
return(true);
}
if ((isTake(pS, "mud") || (isTake(pS, "puddle"))) || (isTake(pS, "mud puddle"))) {
if (gameState.muddy) {
showText("You've already gotten an heapin' helpin' all up on yo'self.");
} else {
showText("You can't get the mud so much. More like the mud'll get you.");
}
return(true);
}
} else {
if (pS == "look") {
showText("There's a dried out mud puddle. It's all caked and cracked like the kind that rock stars are always standing on.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "puddle") || (isObj(pS, "mud")))) {
showText("The bone-dry mud puddle is cracked and caked.");
return(true);
}
if ((isTake("mud") || (isTake("puddle"))) || (isTake("mud puddle"))) {
showText("You don't want any. It'll ruin your awesome \"Scalding Lake\" T-shirt.");
return(true);
}
}
}
if (isScene(2, 2)) {
if (pS == "look") {
showText("The remains of your thatched-roof cottage lie burninated before you. You swear revenge against Trogdor.");
return(true);
}
if (isAction(pS, "look") && ((((((isObj(pS, "inside") || (isObj(pS, "inside house"))) || (isObj(pS, "inside hut"))) || (isObj(pS, "inside cottage"))) || (isObj(pS, "ground"))) || (isObj(pS, "parchment"))) || (isObj(pS, "paper")))) {
showText("Hey, it's your old fireproof map to Peasantry.");
return(true);
}
if (isAction(pS, "look") && ((((isObj(pS, "cottage") || (isObj(pS, "rubble"))) || (isObj(pS, "hut"))) || (isObj(pS, "house"))) || (isObj(pS, "home")))) {
showText("All your baubles and trinkets, your flasks and scrolls, your goblets and staffs! BURNINATED!!");
if (!gameState.hasMap) {
showText("Looks like there's a piece of unburninated paper on the ground.", true);
}
return(true);
}
if ((isTake(pS, "map") || (isTake(pS, "parchment"))) || (isTake(pS, "paper"))) {
if (gameState.hasMap) {
showText("Yeah but like you already map the took, guy!");
} else {
gameState.hasMap = true;
showText("You tuck it nice-like into your short, short pants. Type MAP at nearly any time to check the map.");
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "rocks") || (isObj(pS, "stones")))) {
showText("Those rocks appear to be part of a cave off to the west there.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "cave"))) {
showText("It's off to the west there.");
return(true);
}
}
if (isScene(2, 3)) {
if (pS == "look") {
showText("Nothing special here except for that weird wavy tree.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree") || (isObj(pS, "wavy")))) {
showText("It's weird and wavy.");
return(true);
}
if (isTake("tree")) {
showText("No. Just no.");
return(true);
}
if (isAction(pS, "climb") && (isObj(pS, "tree") || (isObj(pS, "wavy")))) {
showText("You don't climb wavy trees.");
return(true);
}
if ((isAction(pS, "talk") || (isAction(pS, "speak"))) && (isObj(pS, "tree") || (isObj(pS, "wavy")))) {
showText("Trees can't talk but a breeze picks up and you swear the leaves whisper the words \"Naked Ned.\" Weird.");
return(true);
}
if (gameState.nedShowing) {
if (isAction(pS, "look") && ((((isObj(pS, "ned") || (isObj(pS, "naked"))) || (isObj(pS, "dude"))) || (isObj(pS, "guy"))) || (isObj(pS, "man")))) {
showText("A fairly naked man is peering out from behind that tree.");
return(true);
}
if ((pS == "talk") || ((isAction(pS, "talk") || (isAction(pS, "speak"))) && ((isObj(pS, "dude") || (isObj(pS, "guy"))) || (isObj(pS, "man"))))) {
showText("You startled him and he disappears!");
scene_mc.foreground_real.nakedNed_mc.gotoAndPlay("hide");
gameState.nedShowing = false;
return(true);
}
if ((isAction(pS, "talk") || (isAction(pS, "speak"))) && (isObj(pS, "ned"))) {
showText("\"Never speak of this meeting!\" says the nudie and he disappears.");
scene_mc.foreground_real.nakedNed_mc.gotoAndPlay("hide");
gameState.nedShowing = false;
return(true);
}
}
}
if (isScene(0, 3)) {
if ((isAction(pS, "sleep") || (isAction(pS, "rest"))) || (isAction(pS, "lie down"))) {
showText("That's probably how the first baby got here. Forget it.");
return(true);
}
if (!gameState.womanLeft) {
if ((((isTake(pS, "baby") || (isTake(pS, "child"))) || (isTake(pS, "kid"))) || (isTake(pS, "toddler"))) || (isTake(pS, "tot"))) {
showText("\"You wanna be a part of this family? GO GET US THOSE RICHES!!\" she shrieks.");
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && (isObj(pS, "jhonka"))) {
showText("\"That nasty thing killed my husband and took my riches!!\"");
showText("\"I thought Trogdor killed your husband,\" you interject.", true);
showText("\"Oh, right. Yeah. That's what I said. Trogband killed my husbdor.\"", true);
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && (isObj(pS, "ned"))) {
showText("\"Don't talk about that pervert in front of the baby here.\"");
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && (isObj(pS, "trogdor"))) {
showText("\"I hope you kill that stupid dragon. My 'Wives of Squished Peasants' support group would bake you a Poor Gary pie if you did.\"");
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && ((isObj(pS, "baby") || (isObj(pS, "child"))) || (isObj(pS, "toddler")))) {
showText("\"This little guy's all I got left. If only someone would go steal all our riches back from that filthy Jhonka.\"");
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && ((((isObj(pS, "dress") || (isObj(pS, "robes"))) || (isObj(pS, "clothing"))) || (isObj(pS, "clothes"))) || (isObj(pS, "robe")))) {
showText("\"You can't have mine, pervert! I'm not a nudist peasant like that weirdo over in west peasantry!\"");
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && (isObj(pS, "fire"))) {
showText("\"You need fire? A couple trees over near the waterfall used to be on fire. But now there's like a signal lantern there or something.");
showText("\"So I should ask that signal lantern?\" you ask.", true);
showText("\"I dunno man! Whattaya want from me?\"", true);
return(true);
}
if (((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) && ((isObj(pS, "smell") || (isObj(pS, "stink"))) || (isObj(pS, "smelling")))) {
showText("\"What smells is junior here's drawers! I gotta quit feeding him so much horse.\"");
showText("\"And don't start asking me for his diapers, sicko!\"", true);
return(true);
}
if ((((isAskAbout(pS, "lady") || (isAskAbout(pS, "woman"))) || (isAskAbout(pS, "baby lady"))) || (isAskAbout(pS, "broad"))) || (isAskAbout(pS, "chic"))) {
showText("\"I dunno what you're talking about.\"");
return(true);
}
}
if (pS == "look") {
showText("What a depressing little cottage. It reeks of single parent.");
if (!gameState.womanLeft) {
showText(" A lady rocks her baby in a chair.");
} else {
showText(" There is one of those self-rocking chairs.");
}
showText(" A mostly empty shelf sits against one wall.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "feed"))) {
showText("Cool Ranch. Your old favorite.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "chair"))) {
showText("One of those self-rocking kind. Not bad for a brown-collar peasant-type. Must be trickle-down in action.");
return(true);
}
if (isTake(pS, "chair") || (isTake(pS, "rocker"))) {
if (!gameState.womanLeft) {
showText("No. There's a big bag of something in it. Oh, that's the baby lady.");
} else {
showText("No. Too big for pants.");
}
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "hay") || (isObj(pS, "straw"))) || (isObj(pS, "bedding"))) || (isObj(pS, "bed")))) {
showText("Hay is for horses!");
return(true);
}
if (isTake(pS, "hay") || (isTake(pS, "straw"))) {
showText("There's a huge bale a couple of screens over from here. Why bother stealing?");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "pillow"))) {
showText("Swedish foam. Your favorite.");
return(true);
}
if (isTake(pS, "pillow")) {
showText("You don't have anywhere to use it and it is rather bulky, so you leave it.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "shelves") || (isObj(pS, "shelf"))) || (isObj(pS, "goods")))) {
showText("Nothing but a bag of chicken feed.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "peasant") || (isObj(pS, "woman"))) || (isObj(pS, "lady")))) {
if (!gameState.womanLeft) {
showText("Typical pasty peasant woman, overbearing and judgemental. Obsessed with goods and land.");
} else {
showText("I can't believe you thought you had a chance with her!");
showText("Dork!", true);
}
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "baby") || (isObj(pS, "bebe"))) || (isObj(pS, "child")))) {
showText("Peasant babies are pretty freaking adorable. This little guy's no exception.");
return(true);
}
if ((isTake(pS, "potatoes") || (isTake(pS, "potatos"))) || (isTake(pS, "milk"))) {
showText("You don't need that crap. You're cooler without it.");
return(true);
}
if ((isTake(pS, "goods") || (isTake(pS, "food"))) || (isTake(pS, "stuff"))) {
showText("Which foodstuffs?");
return(true);
}
if ((isAction(pS, "use") || (isAction(pS, "give"))) && ((((((((isObj(pS, "trinket") || (isObj(pS, "trinket to lady"))) || (isObj(pS, "trinket to peasant"))) || (isObj(pS, "trinket to woman"))) || (isObj(pS, "trinket to baby"))) || (isObj(pS, "trinket to the lady"))) || (isObj(pS, "trinket to the peasant"))) || (isObj(pS, "trinket to the woman"))) || (isObj(pS, "trinket to the baby")))) {
if (!gameState.womanLeft) {
if (gameState.hasTrinket) {
showText("\"Did you find that thing in my yard?\" she asks. \"I got that free in a box of Plaguezees. I need some FOR REAL riches!\"");
} else {
showText("\"Why are you holding your hand out?\" she asks. \"I told you I need riches, so I can't give em away\"");
showText("You don't have a trinket to give, you realize.", true);
}
} else {
showText("She's done left you. And she ain't coming back. No how, no never.");
}
return(true);
}
if (isAction(pS, "give") && ((isObj(pS, "riches") || (isObj(pS, "riches to lady"))) || (isObj(pS, "riches to woman")))) {
if (!gameState.womanLeft) {
if (gameState.hasRiches) {
showText("\"My riches!!\" she screams and snatches up every last gold coin. \"Thanks, sucker! Here you go!\" she shoves the baby into your hands and bolts out the door.");
addEvent("hideBabyLady", 0);
showText("You later learn that she does this all the time and is wanted throughout the countryside. Those riches probably WERE the Jhonka's and who knows whose baby that is. Well, it's yours now.", true);
gLastPointAmount = 5;
addEvent("scoreSomePoints", 1);
gameState.hasBaby = true;
inventoryHistory.hasBaby = true;
gameState.richesGiven = true;
gameState.hasRiches = false;
gameState.womanLeft = true;
} else {
showText("\"That's right,\" she whines. \"Find my riches, and give here.\"");
}
} else {
showText("We did that already and it was sort of humiliating.");
}
return(true);
}
if (!gameState.womanLeft) {
if (isAction(pS, "give") || (isAction(pS, "offer"))) {
showText("\"We don't need that mess,\" she says.");
return(true);
}
}
if ((isTake(pS, "money") || (isTake(pS, "gold"))) || (isTake(pS, "coins"))) {
showText("Um, that's chicken feed.");
return(true);
}
if (((isTake(pS, "feed") || (isTake(pS, "bag"))) || (isTake(pS, "pouch"))) || (isTake(pS, "sack"))) {
if (!gameState.takenFeed) {
addEvent("walkToShelf", -1);
showText("You used to eat this stuff like crazy when you were a kid and your parents weren't watching (which was all too often). You grab several large handfuls.");
gLastPointAmount = 1;
addEvent("scoreSomePoints", 0);
gameState.takenFeed = true;
gameState.hasFeed = true;
inventoryHistory.hasFeed = true;
return(true);
}
showText("You don't need any more. It might give rise to old temptations.");
return(true);
}
if ((pS == "talk") || ((isAction(pS, "talk") || (isAction(pS, "speak"))) && ((isObj(pS, "peasant") || (isObj(pS, "woman"))) || (isObj(pS, "lady"))))) {
if (!gameState.womanLeft) {
if (!gameState.talkedWoman) {
showText("\"Hello, I'm-\" you start but the lady cuts you off.");
showText("\"Okay, here's why I let you in here,\" she explains. \"My husband got squished by Trogdor. And to make matters worse, the insurance riches I got were stolen by the Jhonka. Go steal them back for us and I'll give you something great.\"", true);
} else {
showText("\"Prove to me you're a REAL peasant. Go get our riches back from the Jhonka.\"");
}
} else {
showText("You'd call out her name and let it ring through the empty room, enveloping you in sorrow, but you don't actually know her name.");
}
return(true);
}
if (isAction(pS, "help") && (((isObj(pS, "peasant") || (isObj(pS, "woman"))) || (isObj(pS, "lady"))) || (isObj(pS, "baby")))) {
if (!gameState.womanLeft) {
showText("\"You wanna help us? Go get my riches back!\"");
} else {
showText("You've already done far too much.");
}
return(true);
}
if ((isTalk(pS, "baby") || (isTalk(pS, "child"))) || (isTalk(pS, "tyke"))) {
showText("You say some cute, stupid stuff and the baby just blows snot bubbles.");
return(true);
}
}
if (isScene(0, 2)) {
if (gameState.wearingPot) {
showText("You need to get out of there before that smelly octogenarian gets back.");
return(true);
}
if (((((((isTake(pS, "rug") || (isTake(pS, "carpet"))) || (isAction(pS, "roll"))) || (isAction(pS, "fold"))) || (isAction(pS, "pull"))) || (isAction(pS, "move"))) || (isAction(pS, "lift"))) && (isObj(pS, "rug") || (isObj(pS, "carpet")))) {
showText("You're not touching that thing. Too many questionable stains on it.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "carpet") || (isObj(pS, "rug"))) || (isObj(pS, "floor")))) {
showText("Maybe that used to be a magic carpet. But it's sure a cat pee-stained carpet now.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "bed") || (isObj(pS, "cot"))) || (isObj(pS, "mattress")))) {
showText("Is that just a fitted sheet over a slab of concrete?");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "pillow"))) {
showText("If you sleep in that bed, you're NOT putting your head on that nasty pillow.");
return(true);
}
if (isTake(pS, "pillow")) {
showText("Not a chance. There's even more questionable stains on that pillow than there are on that rug.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "desk") || (isObj(pS, "counter")))) {
showText("There's a broken bell and a piece of parchment on there.");
if (!gameState.night) {
showText(" And some crazy old guy behind it.", false);
}
return(true);
}
if ((isAction(pS, "look") || (isAction(pS, "read"))) && ((isObj(pS, "note") || (isObj(pS, "parchment"))) || (isObj(pS, "paper")))) {
showText("It says, \"Note to self: Wave arms wildly!\"");
return(true);
}
if ((isTake(pS, "note") || (isTake(pS, "parchment"))) || (isTake(pS, "paper"))) {
showText("Naw, it might be important to that wrinkly old loon.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "bell"))) {
showText("Tis broked.");
return(true);
}
if (isTake(pS, "bell")) {
showText("You can't. It looks like it's been somehow olded to the desk.");
return(true);
}
if (((isAction(pS, "ring") || (isAction(pS, "use"))) || (isAction(pS, "press"))) && (isObj(pS, "bell"))) {
showText("Instead of ringing or dinging, it just goes 'DUNG.'");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "window"))) {
showText("Check it out! There's a Peasantry out there!");
return(true);
}
if ((isAction(pS, "look") || (isAction(pS, "admire"))) && ((((isObj(pS, "painting") || (isObj(pS, "picture"))) || (isObj(pS, "wall"))) || (isObj(pS, "portrait"))) || (isObj(pS, "dogs")))) {
showText("It's a painting of dogs playing 'Magic: The Nerdening.'");
return(true);
}
if (((isTake(pS, "picture") || (isTake(pS, "painting"))) || (isTake(pS, "portrait"))) || (isTake(pS, "dogs"))) {
showText("Weird. It's actually just painted right onto the wall. Like, the frame and everything.");
return(true);
}
if (!gameState.night) {
if (((((isAskAbout(pS, "man") || (isAskAbout(pS, "innkeeper"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "old man"))) && (isObj(pS, "trogdor"))) {
showText("\"Are you talking about that young, green boy that lives up the street? He's always tearing my roof off and eating my customers.\"");
return(true);
}
if (((((isAskAbout(pS, "man") || (isAskAbout(pS, "innkeeper"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "old man"))) && ((((isObj(pS, "dress") || (isObj(pS, "robes"))) || (isObj(pS, "clothing"))) || (isObj(pS, "clothes"))) || (isObj(pS, "robe")))) {
showText("\"I wear my robe hood-down so it's easier to trim my ear hairs. If you need a robe, maybe find someone that's not using theirs.\"");
return(true);
}
if (((((isAskAbout(pS, "man") || (isAskAbout(pS, "innkeeper"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "old man"))) && (isObj(pS, "fire"))) {
showText("\"I've always preferred being on fire at night. Looks prettier and keeps the buttflies away.\"");
return(true);
}
if (((((isAskAbout(pS, "man") || (isAskAbout(pS, "innkeeper"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "old man"))) && ((isObj(pS, "smell") || (isObj(pS, "stink"))) || (isObj(pS, "smelling")))) {
showText("\"Well, if you don't stink, maybe find something that does and wear it. Like a dead carcass or summat.\"");
return(true);
}
if (((((isAskAbout(pS, "man") || (isAskAbout(pS, "innkeeper"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "old man"))) && (isObj(pS, "ned"))) {
showText("\"He used to be such a nice, clothed young man. Wonder what he's done with all his old clothes?\"");
return(true);
}
if ((((isAskAbout(pS, "man") || (isAskAbout(pS, "innkeeper"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) || (isAskAbout(pS, "old man"))) {
showText("\"I don't know nothing about no whatever you just said.\"");
return(true);
}
if (pS == "look") {
showText("What a dump! Only one bed and no minibar? The Innkeeper stands behind a desk and there's a door that's closed.");
return(true);
}
if (isAction(pS, "look") && ((((isObj(pS, "keeper") || (isObj(pS, "man"))) || (isObj(pS, "dude"))) || (isObj(pS, "elder"))) || (isObj(pS, "guy")))) {
showText("He's an older peasant with big cotton swabs stuffed up his nose. Oh wait. Those are nose hairs. Grody.");
return(true);
}
if ((isAction(pS, "open") && ((isObj(pS, "closet") || (isObj(pS, "pantry"))) || (isObj(pS, "door")))) || (isAction(pS, "look") && (isObj(pS, "door")))) {
showText("\"That's the pantry,\" says the Innkeeper. \"Employees Only.\"");
return(true);
}
if ((pS == "talk") || ((isAction(pS, "talk") || (isAction(pS, "speak"))) && ((((isObj(pS, "keeper") || (isObj(pS, "man"))) || (isObj(pS, "dude"))) || (isObj(pS, "elder"))) || (isObj(pS, "guy"))))) {
showText("\"If you're interested in staying the night, just type 'get a room.'\"");
return(true);
}
if (((((((isAction(pS, "use") || (isAction(pS, "drop"))) || (isAction(pS, "deploy"))) || (isAction(pS, "throw"))) || (isAction(pS, "show"))) || (isAction(pS, "offer"))) || (isAction(pS, "give"))) && (isObj(pS, "baby") || (isObj(pS, "child")))) {
if (gameState.hasPills) {
showText("You already milked that fogey for all the pills he's worth.");
return(true);
}
if (gameState.hasBaby) {
showText("\"Well lookit that little guy!\" says the Innkeeper. \"You want a treat, do ya? What do babies like?\" He fishes around in his pockets.");
showText("\"Um, how bout my medication!\" You grab the bottle of pills before he can force them on the baby. \"Hey, those were for him!\"", true);
gameState.hasPills = true;
inventoryHistory.hasPills = true;
gLastPointAmount = 5;
addEvent("scoreSomePoints", 1);
} else {
showText("You have no baby nor any immediate prospects.");
}
return(true);
}
if ((pS == "sleep") || (((isAction(pS, "get") || (isAction(pS, "use"))) || (isAction(pS, "sleep"))) && (isObj(pS, "bed") || (isObj(pS, "sleep"))))) {
showText("You probably ought to talk to that stinky old guy over there about that.");
return(true);
}
if ((pS == "get a room") || (pS == "get room")) {
if (gameState.fire) {
showText("\\oard of Peasant Health says I can't serve any folk that's on fire. Nothing personal. Well, I mean, I don't like you much anyway.\"");
return(true);
}
if (gameState.dress) {
showText("\"Okay, youngster,\" says the decrepit old person. \"Just bed on down for the night and I'm sure I'll remember to collect the fee come morning.\"");
addEvent("walkToBed", 0);
addEvent("nightfall", 0);
if (!gameState.pointAwardedSleep) {
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gameState.pointAwardedSleep = true;
}
showText("Night falls like a bad power point presentation", true);
addEvent("revealNightScene", 1);
showText("What an uncomfortable bed! You sleep for maybe 20 minutes before the extreme pain in your spine forces you to get up.", true);
} else {
showText("\"I only serve peasants here, fancypants!\" barks the old guy. \"Where's your robe?\"");
}
return(true);
}
} else {
if (isAction(pS, "look") && ((isObj(pS, "candle") || (isObj(pS, "lantern"))) || (isObj(pS, "lamp")))) {
showText("That candle's not at all on fire.");
return(true);
}
if (((isTake(pS, "candle") || (isTake(pS, "lantern"))) || (isTake(pS, "light"))) || (((isAction(pS, "light") || (isAction(pS, "use"))) || (isAction(pS, "burn"))) && ((isObj(pS, "candle") || (isObj(pS, "lantern"))) || (isObj(pS, "lamp"))))) {
showText("It seems like you should be able to do that, doesn't it? Sorry. No dice.");
return(true);
}
if (pS == "look") {
showText("It's still dark out. The grimey old Innkeeper is gone and he's left the pantry open.");
return(true);
}
if (isAction(pS, "look") && ((((isObj(pS, "keeper") || (isObj(pS, "man"))) || (isObj(pS, "dude"))) || (isObj(pS, "elder"))) || (isObj(pS, "guy")))) {
showText("He gone.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "pantry") || (isObj(pS, "shelves"))) || (isObj(pS, "shelf"))) || (isObj(pS, "closet")))) {
showText("Shelves and shelves of something called \"Old Man Rub.\"");
if (!gameState.potTaken) {
showText(" The only thing of interest is a big black pot of horse grease up on the top shelf.", false);
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "grease") || (isObj(pS, "pot")))) {
if (!gameState.potTaken) {
showText("It's full of horse grease. I guess that sounds useful.");
} else {
showText("The pot of horse grease is gone now. Off to a better place I guess.");
}
return(true);
}
if (isAction(pS, "close") && ((isObj(pS, "door") || (isObj(pS, "closet"))) || (isObj(pS, "pantry")))) {
showText("Naw. That's dumb. Do better.");
return(true);
}
if (isTake(pS, "rub")) {
showText("You disgust me.");
return(true);
}
if (isTake(pS, "grease") || (isTake(pS, "pot"))) {
if (!gameState.potTaken) {
addEvent("walkToPantry", -1);
showText("You reach way up to the top shelf.");
addEvent("reachForPot", 0);
addEvent("getHorseGrease", 0);
if (!gameState.pointAwardedPotGet) {
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.pointAwardedPotGet = true;
}
showText("Oh great! Now you can't see a thing and your head is covered in highly flammable horse grease. You better get out of here before that disgusting old man comes back.", true);
} else {
showText("You already have a nice greasy swab of it on the corner of your hood.");
}
return(true);
}
}
}
if (isScene(3, 2)) {
if (pS == "look") {
showText("There's definitely half a lake here with a sandy shore.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "lake") || (isObj(pS, "water")))) {
showText("It extends onto the next screen and has a sandy shore.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "bush") || (isObj(pS, "shrub")))) {
showText("Don't worry about that bush. Yeah, there's red berries on it but never you mind.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "berries"))) {
showText("Shut up.");
return(true);
}
if ((isTake(pS, "bush") || (isTake(pS, "shrub"))) || (isTake(pS, "berries"))) {
showText("NO MAN! JEEZ!");
return(true);
}
if ((((pS == "swim") || (pS == "dive")) || (pS == "jump in")) || ((((isAction(pS, "get in") || (isAction(pS, "swim"))) || (isAction(pS, "jump in"))) || (isAction(pS, "dive"))) && (isObj(pS, "lake") || (isObj(pS, "water"))))) {
showText("Not in this game, Swimmer Dan! In this game, you drown.");
return(true);
}
if (!gameState.pebblesTaken) {
if (isAction(pS, "look") && ((((isObj(pS, "rocks") || (isObj(pS, "stones"))) || (isObj(pS, "pebbles"))) || (isObj(pS, "shore"))) || (isObj(pS, "sand")))) {
showText("There's a bunch of fairly substantial pebbles in the sand.");
return(true);
}
if ((isTake(pS, "rocks") || (isTake(pS, "pebbles"))) || (isTake(pS, "stones"))) {
if (scene_mc.hotSpot1.hitTest(pl.collide)) {
addEvent("gotoPebbles", -1);
showText("You grab up a handful of fairly substantial pebbles. You make sure to get an even mix of sedentary, igneous, and, um, sureptitious rocks.");
addEvent("getPebbles", 0);
gameState.pebblesTaken = true;
gameState.hasPebbles = true;
inventoryHistory.hasPebbles = true;
} else {
showText("You do your best Mr. Fantastic impersonation but you can't reach from here.");
}
return(true);
}
} else if (isAction(pS, "look") && ((((isObj(pS, "rocks") || (isObj(pS, "stones"))) || (isObj(pS, "pebbles"))) || (isObj(pS, "shore"))) || (isObj(pS, "sand")))) {
showText("Remember those pebbles on the beach? Man, those were good times.");
return(true);
}
if (((isAction(pS, "throw") || (isAction(pS, "skip"))) || (isAction(pS, "toss"))) && (((((isObj(pS, "rock") || (isObj(pS, "stone"))) || (isObj(pS, "pebble"))) || (isObj(pS, "rocks"))) || (isObj(pS, "stones"))) || (isObj(pS, "pebbles")))) {
showText("You've always been terrible at skipping stones. And you're even worse at just plain throwing rocks in lakes. You decide to save yourself the embarrassment.");
return(true);
}
if (((isAction(pS, "use") || (isAction(pS, "throw"))) || (isAction(pS, "toss"))) && (isObj(pS, "baby") || (isObj(pS, "baby in lake")))) {
if (gameState.hasBaby) {
if (!scene_mc.hotSpot1.hitTest(pl.collide)) {
showText("Maybe try again from the center of the lake. Looks deeper there.");
return(true);
}
if (!gameState.hasSoda) {
addEvent("tossBaby", -1);
showText("Something tells you this is a good idea and you lob the little one into the lake.", true);
addEvent("babyReturns", 0);
showText("You won't be arrested after all! The little guy has resurfaced safely, carrying an old bottle of soda. You take the soda and stow your swaddling buddy for takeoff.", true);
gameState.hasSoda = true;
inventoryHistory.hasSoda = true;
gLastPointAmount = 5;
addEvent("scoreSomePoints", 0);
} else {
showText("Baby Dashing is a little waterlogged from the last toss, and you read his soft gurgling to mean that there's no more soda left.", true);
}
} else {
showText("I think you misread the walkthrough on GameFAQs. You gotta get the baby first.");
}
return(true);
}
}
if (isScene(2, 4) || (isScene(3, 3))) {
if (gameState.kerreckPresent) {
if (isAction(pS, "look") && ((isObj(pS, "belt") || (isObj(pS, "buckle"))) || (isObj(pS, "shiny")))) {
if (!gameState.hasBelt) {
showText("Yecch. I wouldn't touch that unless it was, like, an important quest item or something.");
return(true);
}
}
if (isAction(pS, "make friends") && ((isObj(pS, "kerreck") || (isObj(pS, "kerrek"))) || (isObj(pS, "monster")))) {
showText("Look, it didn't work for Strongbad and it's not gonna work for you either.");
return(true);
}
if ((((isAction(pS, "buy the kerrek") || (isAction(pS, "buy kerrek"))) || (isAction(pS, "buy the kerreck"))) || (isAction(pS, "buy kerreck"))) && (isObj(pS, "cold one"))) {
showText("The kerrek is a teetotaller and is offended by your offer. You've really cheesed him off now.");
stageCollides.obj[1].walkSpeed = 8;
return(true);
}
if ((isTake(pS, "kerrek") || (isTake(pS, "kerreck"))) || (isTake(pS, "monster"))) {
showText("Well, he does smell real bad. But he's a bit too big to fit in your pocket.");
return(true);
}
if (isAction(pS, "look")) {
showText("It's the Kerrek, you moron! Get outta here!");
return(true);
}
if (isAction(pS, "talk")) {
showText("\"Me llamo Julio,\" you begin... It seems only to further anger the already tempramental Kerrek. That stupid \"Learn Kerrek in 3 Weeks\" cassette did nothing for you!");
return(true);
}
if ((isAction(pS, "shoot") && (isObj(pS, "arrow"))) || (((isAction(pS, "use") || (isAction(pS, "shoot"))) && (isObj(pS, "bow") || (isObj(pS, "arrow")))) || (((((isAction(pS, "shoot") || (isAction(pS, "kill"))) || (isAction(pS, "smote"))) || (isAction(pS, "smite"))) || (isAction(pS, "attack"))) && ((isObj(pS, "kerreck") || (isObj(pS, "kerrek"))) || (isObj(pS, "monster")))))) {
if (gameState.hasArrow && (gameState.hasBow)) {
gameState.hasArrow = false;
showText("Here goes nothin', Kid Icarus");
addEvent("plArrowKerreck", 0);
showText("ARROWED!! Nice shot. You smote the Kerrek! He lay there stinking.", true);
gLastPointAmount = 5;
gameState.raining = true;
gameState.hasRained = true;
addEvent("scoreSomePoints", 0);
addEvent("startRain", 1);
showText("A light rain heralds the washing free of the Kerrek's grip on the land. You're feeling pretty good, though, so the artless symbolism doesn't bug you.", true);
return(true);
}
if (gameState.hasArrow && (!gameState.hasBow)) {
showText("With what?! You gonna throw that arrow at him?");
}
if ((!gameState.hasArrow) && (gameState.hasBow)) {
showText("With what?! You got no arrow, fool!");
}
if ((!gameState.hasArrow) && (!gameState.hasBow)) {
showText("With what?! You got no weapons except your butter-knife wit. ");
}
return(true);
}
} else {
if ((isAction(pS, "shoot") && (isObj(pS, "arrow"))) || (((isAction(pS, "use") || (isAction(pS, "shoot"))) && (isObj(pS, "bow") || (isObj(pS, "arrow")))) || (((((isAction(pS, "shoot") || (isAction(pS, "kill"))) || (isAction(pS, "smote"))) || (isAction(pS, "smite"))) || (isAction(pS, "attack"))) && ((isObj(pS, "kerreck") || (isObj(pS, "kerrek"))) || (isObj(pS, "monster")))))) {
if (!gameState.kerreckDead) {
showText("Good idea. But you kinda need the actual Kerrek to be here for that to work.");
} else {
showText("Yeah. You smote the Kerrek. You deserve a trophy full of Mutton-ums.");
}
return(true);
}
if (!gameState.kerreckDead) {
if (pS == "look") {
showText("There are large hoof prints in the the grass here. And it smells like a public latrine.");
return(true);
}
} else {
if (pS == "look") {
showText("There are large hoof prints in the the grass here. ");
if ((gameState.kerrekScene.x == gScene.x) && (gameState.kerrekScene.y == gScene.y)) {
if ((gameState.screensSinceBeltTaken >= 10) && (gameState.screensSinceBeltTaken < 15)) {
showText("Part of the ground looks just like a rotting kerrek.", false);
} else if (gameState.screensSinceBeltTaken >= 15) {
showText("Looks like someone left their spare bones here.", false);
} else {
showText("There is a large Kerrek-shaped mound on the grass.", false);
}
}
return(true);
}
if ((gameState.kerrekScene.x == gScene.x) && (gameState.kerrekScene.y == gScene.y)) {
if (((gameState.screensSinceBeltTaken >= 15) && (isAction(pS, "look"))) && (isObj(pS, "bones"))) {
showText("He wasn't fat, he was just big boned! Poor pig-man.", false);
return(true);
}
if ((isAction(pS, "look") && (((isObj(pS, "kerrek") || (isObj(pS, "kerreck"))) || (isObj(pS, "mound"))) || (isObj(pS, "monster")))) && ((gameState.kerrekScene.x == gScene.x) && (gameState.kerrekScene.y == gScene.y))) {
showText("He dead.");
if ((gameState.screensSinceBeltTaken >= 10) && (gameState.screensSinceBeltTaken < 15)) {
showText(" You didn't think he could have smelled any worse? Well, guess what: He smells worse.", false);
}
if (gameState.screensSinceBeltTaken >= 15) {
showText(" He wasn't fat, he was just big boned! Poor pig-man.", false);
}
if (!gameState.hasBelt) {
showText(" And the only thing of value on him is his stinky belt buckle.");
}
return(true);
}
if ((isTake(pS, "arrow") || (isTake(pS, "arrows"))) || (isTake(pS, "monster"))) {
showText("Eww! No way. That thing's got some serious Kerrek-Brand kooties on it now.");
return(true);
}
if ((isTake(pS, "belt") || (isTake(pS, "buckle"))) || (isObj(pS, "shiny"))) {
if (!gameState.hasBelt) {
addEvent("walkToDeadKerrek", -1);
showText("You strap the Kerrek's belt buckle around your waist. Oh boy. You sure stink now.");
gameState.stink = true;
gameState.hasBelt = true;
inventoryHistory.hasBelt = true;
gLastPointAmount = 10;
addEvent("scoreSomePoints", 0);
} else {
showText("You totally got the belt already, as evidenced by the rancid cloud of odor that follows you like a shadow.");
}
return(true);
}
if ((isTake(pS, "kerrek") || (isTake(pS, "kerreck"))) || (isTake(pS, "monster"))) {
showText("Well, he does smell real bad. But he's a bit too big to fit in your pocket.");
return(true);
}
}
}
}
if (isAction(pS, "look") && (((isObj(pS, "prints") || (isObj(pS, "tracks"))) || (isObj(pS, "track"))) || (isObj(pS, "print")))) {
showText("If you weren't a simpleton you might think these were Kerrek prints. But since you are a simpleton, you just go, \"Yay! Piggies!\"");
return(true);
}
}
if (isScene(4, 1)) {
if (pS == "look") {
showText("Not much to see. River's got a rock in it.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "river") || (isObj(pS, "stream"))) || (isObj(pS, "water")))) {
showText("Got a rock in it.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "rock") || (isObj(pS, "stone")))) {
showText("The ages have worn this rock down. It is a rock of ages. Still a-rollin.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "rock") || (isObj(pS, "stone")))) {
showText("The ages have worn this rock down. It is a rock of ages. Still a-rollin.");
return(true);
}
if (isTake(pS, "rock") || (isTake(pS, "stone"))) {
showText("For what? Now you're just making up puzzles to solve.");
return(true);
}
if ((((isAction(pS, "cross") || (isAction(pS, "swim"))) || (isAction(pS, "get in"))) || (isAction(pS, "jump"))) && ((((isObj(pS, "rock") || (isObj(pS, "river"))) || (isObj(pS, "stream"))) || (isObj(pS, "water"))) || (isObj(pS, "stone")))) {
showText("Peasants can't swim. Like, it's illegal.");
return(true);
}
}
if (isScene(4, 2)) {
if ((pS == "look") || (isAction(pS, "look") && (isObj(pS, "lake")))) {
showText("Why it's half a lake.");
if (!gameState.fishermanLeft) {
showText("With a fisherman in it. And he's fishing!", false);
}
return(true);
}
if (isAction(pS, "look") && ((((isObj(pS, "boat") || (isObj(pS, "oar"))) || (isObj(pS, "oars"))) || (isObj(pS, "dinghy"))) || (isObj(pS, "ship")))) {
if (!gameState.fishermanLeft) {
showText("\"Keep your eyes off my dinghy!\"");
} else {
showText("It was loaned out to the Fishing Challenge videogame.");
}
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "beach") || (isObj(pS, "sand"))) || (isObj(pS, "shore"))) || (isObj(pS, "coast")))) {
showText("One million three hundred thousand seventy-four hundred and sixty two... One million three hundred thousand seventy-four hundred and sixty three...");
showText("Drat! You lost count again.", true);
return(true);
}
if (isAction(pS, "look") && ((((isObj(pS, "man") || (isObj(pS, "dude"))) || (isObj(pS, "guy"))) || (isObj(pS, "fisher"))) || (isObj(pS, "peasant")))) {
if (!gameState.fishermanLeft) {
showText("An older peasant sits silently in a boat with his line in the water.");
} else {
showText("I think he went to open the INN.");
}
return(true);
}
if ((pS == "talk") || ((isAction(pS, "talk") || (isAction(pS, "speak"))) && ((((isObj(pS, "man") || (isObj(pS, "dude"))) || (isObj(pS, "guy"))) || (isObj(pS, "fisher"))) || (isObj(pS, "peasant"))))) {
if (!gameState.fishermanLeft) {
showText("You holler at the old man about Trogdor, but he just grumbles about the fish not biting. \"Must be using the wrong bait...\" he says, suggestively.");
} else {
showText("He DEFINITELY can't here you from here. He's in the INN.");
}
return(true);
}
if (((isAction(pS, "get in") || (isAction(pS, "dive"))) || (isAction(pS, "dive"))) && (isObj(pS, "lake") || (isObj(pS, "water")))) {
showText("Not in this game, Swimmer Dan! In this game, you drown.");
return(true);
}
if (((isAction(pS, "throw") || (isAction(pS, "skip"))) || (isAction(pS, "toss"))) && (((((isObj(pS, "rock") || (isObj(pS, "stone"))) || (isObj(pS, "pebble"))) || (isObj(pS, "rocks"))) || (isObj(pS, "stones"))) || (isObj(pS, "pebbles")))) {
showText("You've always been terrible at skipping stones. And you're even worse at just plain throwing rocks in lakes. You decide to save yourself the embarrassment.");
return(true);
}
if ((pS == "feed fish") || (((isAction(pS, "throw") || (isAction(pS, "use"))) || (isAction(pS, "toss"))) && (((((isObj(pS, "feed") || (isObj(pS, "feed in water"))) || (isObj(pS, "feed in the water"))) || (isObj(pS, "feed in the lake"))) || (isObj(pS, "feed in lake"))) || (isObj(pS, "food"))))) {
if (!scene_mc.hotSpot1.hitTest(pl.collide)) {
showText("Maybe try again from the center of the lake. Looks deeper there.");
return(true);
}
if (gameState.fishermanLeft) {
showText("You already fed the fish. Let's get moving, here, people!");
} else {
if (gameState.takenFeed) {
addEvent("walkToFeedThrow", -1);
showText("You toss the feed into the lake. You shed a tear for each one. \"Goodbye, Monty\" you sniff. \"Bye Delga, Rasputin. Farewell, Combledon!\" and so forth.");
addEvent("throwFeed", 0);
showText("Woah! That crotchety old man just caught a pantload of fish! \"Now I can get back to running the inn,\" he says and rows to shore and hauls his boat out and cleans, guts, and filets all the fish and a buncha other stuff we didn't animate.", true);
gLastPointAmount = 2;
addEvent("scoreSomePoints", 1);
gameState.fishermanLeft = true;
gameState.hasFeed = false;
} else {
showText("You have nothing with which to do that ... with.");
}
return(true);
}
}
if (isAction(pS, "give") && (isObj(pS, "feed"))) {
if (!gameState.fishermanLeft) {
showText("\"Well, heck. That might work. Throw it on in and see what happens.\"");
return(true);
}
}
if (((isAction(pS, "throw") || (isAction(pS, "give"))) || (isAction(pS, "use"))) || (isAction(pS, "toss"))) {
if (gameState.fishermanLeft) {
showText("You already fed the fish. Let's get moving, here, people!");
} else {
showText("\"That isn't gonna work for bait!\" the old man screams, at a needlessly harsh volume.");
}
return(true);
}
}
if (isScene(4, 3)) {
if (pS == "look") {
showText("There's a ranch-style thatched roof cottage here. There are also what appear to be four crunch berry bushes but you can't be sure.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "bush") || (isObj(pS, "bushes")))) {
showText("You suspect they might be crunch berry bushes.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "berry") || (isObj(pS, "berries")))) {
showText("Crunch berries maybe.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "cottage") || (isObj(pS, "shack"))) || (isObj(pS, "house")))) {
showText("You had a cottage once. A lot like this one. *sniff* Trogdor will pay!");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "door"))) {
showText(("Listen to you, \"" + pS) + "\" What kinda gaming is that? It's a door and it's closed.");
return(true);
}
if (isAction(pS, "eat") && (isObj(pS, "berry"))) {
showText("No way you're falling for that. You didn't get that merit badge in outdoor survival eating strange berries at the drop of a hat.");
return(true);
}
if ((pS == "knock") || (isAction(pS, "knock") && (isObj(pS, "door")))) {
if (!gameState.richesGiven) {
addEvent("walkToBabyCottageDoor", -1);
showText("\"It's open,\" says a female voice from inside. Um, it's NOT open, but you get her drift.");
} else {
addEvent("walkToBabyCottageDoor", -1);
showText("No one answers. That crazy lady took off. How ever will you get past this closed door now?");
}
return(true);
}
if (((((pS == "open") || (pS == "open door")) || (pS == "open the door")) || (ps == "go through door")) || (pS == "go through the door")) {
addEvent("walkToBabyCottageDoor", -1);
showText("You open er up and head on in.");
addEvent("enterBabyCottage", 0);
return(true);
}
if (((isTake(pS, "berries") || (isAction(pS, "pick") && (isObj(pS, "berry") || (isObj(pS, "berries"))))) || (pS == "search bush")) || (pS == "reach in bush")) {
if (!gameState.trinketFound) {
if (pl.collide.hitTest(scene_mc.hotSpot1)) {
addEvent("gotoTLBush", -1);
if (gameState.TLberrySearched) {
showText("You already searched that bush. It was okay. Nothing to write home about... oh, wait... you don't have a home. My b.");
} else {
gameState.TLberrySearched = true;
gameState.berriesSearched++;
if (gameState.berriesSearched == 4) {
showText("You reach into the bush to snag you some berries but instead find a Super Trinket! These things are awesome! You have a sneaking suspicion that SOMEONE in this game will need this thing.");
gameState.trinketFound = true;
gameState.hasTrinket = true;
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
inventoryHistory.hasTrinket = true;
} else {
switch (gameState.berriesSearched) {
case 1 :
showText("You reach into the bush to snag you some berries but they all just squish in your hand.");
break;
case 2 :
showText("Man, nothing in this bush but squished berries either.");
break;
case 3 :
showText("Too bad you don't want any squished berries, cuz hey: jackpot!");
}
}
}
return(true);
}
if (pl.collide.hitTest(scene_mc.hotSpot2)) {
addEvent("gotoBLBush", -1);
if (gameState.BLberrySearched) {
showText("You already searched that bush. It was okay. Nothing to write home about... oh, wait... you don't have a home. My b.");
} else {
gameState.BLberrySearched = true;
gameState.berriesSearched++;
if (gameState.berriesSearched == 4) {
showText("You reach into the bush to snag you some berries but instead find a Super Trinket! These things are awesome! You have a sneaking suspicion that SOMEONE in this game will need this thing.");
gameState.trinketFound = true;
gameState.hasTrinket = true;
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
inventoryHistory.hasTrinket = true;
} else {
switch (gameState.berriesSearched) {
case 1 :
showText("You reach into the bush to snag you some berries but they all just squish in your hand.");
break;
case 2 :
showText("Man, nothing in this bush but squished berries either.");
break;
case 3 :
showText("Too bad you don't want any squished berries, cuz hey: jackpot!");
}
}
}
return(true);
}
if (pl.collide.hitTest(scene_mc.hotSpot3)) {
addEvent("gotoTRBush", -1);
if (gameState.TRberrySearched) {
showText("You already searched that bush. It was okay. Nothing to write home about... oh, wait... you don't have a home. My b.");
} else {
gameState.TRberrySearched = true;
gameState.berriesSearched++;
if (gameState.berriesSearched == 4) {
showText("You reach into the bush to snag you some berries but instead find a Super Trinket! These things are awesome! You have a sneaking suspicion that SOMEONE in this game will need this thing.");
gameState.trinketFound = true;
gameState.hasTrinket = true;
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
inventoryHistory.hasTrinket = true;
} else {
switch (gameState.berriesSearched) {
case 1 :
showText("You reach into the bush to snag you some berries but they all just squish in your hand.");
break;
case 2 :
showText("Man, nothing in this bush but squished berries either.");
break;
case 3 :
showText("Too bad you don't want any squished berries, cuz hey: jackpot!");
}
}
}
return(true);
}
if (pl.collide.hitTest(scene_mc.hotSpot4)) {
addEvent("gotoBRBush", -1);
if (gameState.BRberrySearched) {
showText("You already searched that bush. It was okay. Nothing to write home about... oh, wait... you don't have a home. My b.");
} else {
gameState.BRberrySearched = true;
gameState.berriesSearched++;
if (gameState.berriesSearched == 4) {
showText("You reach into the bush to snag you some berries but instead find a Super Trinket! These things are awesome! You have a sneaking suspicion that SOMEONE in this game will need this thing.");
gameState.trinketFound = true;
gameState.hasTrinket = true;
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
inventoryHistory.hasTrinket = true;
} else {
switch (gameState.berriesSearched) {
case 1 :
showText("You reach into the bush to snag you some berries but they all just squish in your hand.");
break;
case 2 :
showText("Man, nothing in this bush but squished berries either.");
break;
case 3 :
showText("Too bad you don't want any squished berries, cuz hey: jackpot!");
}
}
}
return(true);
}
} else {
showText("You've searched your fill of berry bushes for this game. If you want to search more press 'reload' on the browser");
return(true);
}
return(true);
}
}
if (isScene(1, 2)) {
if (!gameState.kerreckDead) {
if (pS == "look") {
showText("There's a little cave with a little door with a little note on it.");
return(true);
}
if ((pS == "look door") || (pS == "look at door")) {
showText("There's a little note on it.");
return(true);
}
if ((isAction(pS, "look") || (isAction(pS, "read"))) && (isObj(pS, "note") || (isObj(pS, "paper")))) {
addEvent("walkToJhonkaCave", -1);
showText("It says \"scared of kerrek. go way. -j\"");
return(true);
}
if ((isAction(pS, "look") || (isAction(pS, "read"))) && (isObj(pS, "lock") || (isObj(pS, "deadbolt")))) {
addEvent("walkToJhonkaCave", -1);
showText("SCHLAGED.");
return(true);
}
if (isTake(pS, "note") || (isTake(pS, "paper"))) {
addEvent("walkToJhonkaCave", -1);
showText("It's been magically sealed to the door with a wondrously whimsical spell.");
return(true);
}
if (((pS == "open door") || (pS == "open")) || (pS == "open the door")) {
addEvent("walkToJhonkaCave", -1);
showText("It's locked. With one o' them SCHLAGE deadbolts, too. Those things are hard core.");
return(true);
}
if ((pS == "knock") || (isAction(pS, "knock") && (isObj(pS, "door")))) {
addEvent("walkToJhonkaCave", -1);
showText("A gravelly voice inside yells, ");
jhonkaSayings = new Array("NO FOR RENT!", "GO WAY!", "I GIVE LAST YEAR!", "GAVE AT OFFICE", "JUST US CHICKENS");
showText(("\"" + jhonkaSayings[Math.floor(Math.random() * jhonkaSayings.length)]) + "\"", false);
return(true);
}
} else {
if (isAction(pS, "give") || (isAction(pS, "offer"))) {
showText("\"Don't need nothing from no filthy peasantses!!\"");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "door"))) {
showText("Just a door, nothing more.");
return(true);
}
if (pS == "look") {
showText("There's a disgusting little Jhonka hopping around outside a small cave.");
if (!gameState.richesTaken) {
showText("A fat pile of riches lies next to him.");
}
return(true);
}
if ((isAction(pS, "look") || (isAction(pS, "look"))) && (((isObj(pS, "jhonka") || (isObj(pS, "caveman"))) || (isObj(pS, "creature"))) || (isObj(pS, "monster")))) {
showText("The Jhonka is gray and grody. He's got a cromagnon forehead and jaw with a pair of wicked incisors. He sports an old loin-cheese cloth and carries either a big club or one of those roasted turkey legs you get at the Ren Fest.");
return(true);
}
if (isTalk(pS, "trogdor")) {
showText("\"All hail Burninator! Trogdor Number One! Beat Peasant Tech!\" says the grimy Jhonka.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "riches"))) {
showText("That's one fat pile of riches alright.");
return(true);
}
if ((isAction(pS, "look") || (isAction(pS, "examine"))) && ((isObj(pS, "turkey") || (isObj(pS, "leg"))) || (isObj(pS, "club")))) {
showText("Turkey leg or no, it looks like the Jhonka's been gnawing on it.");
return(true);
}
if ((isTake(pS, "turkey") || (isTake(pS, "leg"))) || (isTake(pS, "club"))) {
showText("Now there's a surefire way to get yourself killed.");
return(true);
}
if ((isTake(pS, "riches") || (isTake(pS, "gold"))) || (isTake(pS, "money"))) {
if (!gameState.wearingHay) {
showText("The Jhonka will see you! And rip out your jugular with his teeth or something equally horrible.");
} else {
addEvent("walkToRiches", -1);
addEvent("removeRiches", -1);
showText("Oh OH! A stiff breeze blew all the hay and, surprisingly, the mud off of you! \"You take my riches?!\" growls the Jhonka.");
addEvent("jhonkaTalk", 0);
}
return(true);
}
if (isAction(pS, "kill") && (isObj(pS, "jhonka"))) {
showText("No way! Jhonka's are born scrappers. He may be little, but he'll crawl ya.");
return(true);
}
if (((isAskAbout(pS, "jhonka") || (isAskAbout(pS, "monster"))) || (isAskAbout(pS, "caveman"))) && (((isObj(pS, "stink") || (isObj(pS, "smell"))) || (isObj(pS, "smelling"))) || (isObj(pS, "stinking")))) {
if (!gameState.wearingHay) {
showText("\"Kerrek smell! Now Kerrek dead!\" screeches the Jhonka. So can you infer from this that all smells are dead? You always sucked at the analytical questions.");
} else {
showText("Not now! You'll blow your cover!");
}
return(true);
}
if (((isAskAbout(pS, "jhonka") || (isAskAbout(pS, "monster"))) || (isAskAbout(pS, "caveman"))) && (isObj(pS, "flame") || (isObj(pS, "fire")))) {
if (!gameState.wearingHay) {
showText("\"Burninator make fire! Barbecue all peasants!\"");
} else {
showText("Not now! You'll blow your cover!");
}
return(true);
}
if (((isAskAbout(pS, "jhonka") || (isAskAbout(pS, "monster"))) || (isAskAbout(pS, "caveman"))) && (((((isObj(pS, "clothes") || (isObj(pS, "clothing"))) || (isObj(pS, "robe"))) || (isObj(pS, "ned"))) || (isObj(pS, "robes"))) || (isObj(pS, "dress")))) {
if (!gameState.wearingHay) {
showText("\"Filthy naked peasant! Stay away from my cave-hole!\" Who's he calling naked? HE'S the one wearing the string bikini.");
} else {
showText("Not now! You'll blow your cover!");
}
return(true);
}
if ((((isTalk(pS, "jhonka") || (pS == "talk")) || (isTalk(pS, "jhonka"))) || (isTalk(pS, "monster"))) || (isTalk(pS, "caveman"))) {
if (!gameState.wearingHay) {
showText("\"The Kerrek is dead!\" he cries and hops around some more. You wonder how someone this primitive could have made that much dough.");
} else {
showText("Not now! You'll blow your cover!");
}
return(true);
}
if ((isAskAbout(pS, "jhonka") || (isAskAbout(pS, "monster"))) || (isAskAbout(pS, "caveman"))) {
if (!gameState.wearingHay) {
showText("\"Jhonka don't know nothing bout that!\"");
} else {
showText("Not now! You'll blow your cover!");
}
return(true);
}
}
if (isAction(pS, "look") && (isObj(pS, "cave"))) {
showText("Just a little cave. Calm down.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "fence"))) {
showText("A standard peasant fence. Trogdor makes milk's meat outta these things.");
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "jump"))) && (isObj(pS, "fence"))) {
showText("No, you have business to attend to here in Peasantry.");
return(true);
}
}
}
function isTake(pS, obj) {
return(((((pS.slice(0, 3) == "get") || (pS.slice(0, 4) == "take")) || (pS.slice(0, 5) == "steal")) || (pS.slice(0, 4) == "pick up")) && (isObj(pS, obj)));
}
function isAction(pS, verb) {
return(pS.slice(0, verb.length) == verb);
}
function isObjL(pS, objL) {
trace("isObjL(): objL.length " + objL);
var i = 0;
while (i < objL.length) {
if (pS.slice(-objL[i].length) == objL[i]) {
return(true);
}
i++;
}
return(false);
}
function isObj(pS, obj) {
return(pS.slice(-obj.length) == obj);
}
function isGo(pS, dir) {
return(((pS == dir) || (pS == dir.charAt(0))) || (isAction(pS, "go") && (isObj(pS, dir))));
}
function isTalk(pS, person) {
return(((((isAction(pS, "talk") || (isAction(pS, "speak"))) || (isAction(pS, "converse"))) || (isAction(pS, "yell"))) || (isAction(pS, "ask"))) && (isObj(pS, person)));
}
function isAskAbout(pS, person) {
return((((((isAction(pS, "ask about") || (isAction(pS, "talk about"))) || (isAction(pS, ("ask " + person) + " about"))) || (isAction(pS, ("talk " + person) + " about"))) || (isAction(pS, ("talk to " + person) + " about"))) || (isAction(pS, ("talk to the " + person) + " about"))) || (isAction(pS, ("ask the " + person) + " about")));
}
function isAttack(pS, obj) {
return(((((((((isAction(pS, "kill") || (isAction(pS, "destroy"))) || (isAction(pS, "assault"))) || (isAction(pS, "attack"))) || (isAction(pS, "hit"))) || (isAction(pS, "smash"))) || (isAction(pS, "kick"))) || (isAction(pS, "punch"))) || (isAction(pS, "break"))) && (isObj(pS, obj)));
}
function removeTrailingSpace(pS) {
while (pS.charAt(pS.length - 1) == " ") {
pS = pS.substring(0, pS.length - 1);
}
return(pS);
}
function preParse(pS) {
trace((("preParse(pS): string in: " + pS) + ":") + pS.length);
var i = 0;
while (i < pS.length) {
if ((((((pS.charAt(i) == "\"") || (pS.charAt(i) == "!")) || (pS.charAt(i) == ".")) || (pS.charAt(i) == "'")) || (pS.charAt(i) == ":")) || (pS.charAt(i) == ";")) {
trace(("preParse(pS): illegal character in preParse - remove " + i) + pS.charAt(i));
pS = pS.substring(0, i) + pS.substring(i + 1);
} else {
i++;
}
}
trace((("preParse(pS): string out: " + pS) + ":") + pS.length);
return(pS);
}
function initRoom() {
trace((("initRoom (): initializing room: " + gScene.x) + ",") + gScene.y);
trace("initRoom (): save game 1 mapHistory = " + gameSave_so.data.gameSaves[1].mapHistory[gScene.x][gScene.y]);
mapHistory[gScene.x][gScene.y] = true;
trace("initRoom (): save game 1 mapHistory = " + gameSave_so.data.gameSaves[1].mapHistory[gScene.x][gScene.y]);
map_updateSquares();
if (gameState.raining) {
gameState.rainCounter--;
if (gameState.rainCounter < 0) {
hideRain();
}
}
if (gameState.night) {
if ((((((isScene(5, 1) || (isScene(4, 1))) || (isScene(4, 3))) || (isScene(4, 2))) || (isScene(5, 3))) || (isScene(5, 2))) || (isScene(0, 2))) {
scene_mc.background.gotoAndStop("night");
scene_mc.foreground_real.gotoAndStop("night");
if ((isScene(4, 3) || (isScene(5, 3))) || (isScene(5, 2))) {
var i = 0;
while (i < stageCollides.obj.length) {
stageCollides.obj[i].gotoAndStop("night");
i++;
}
}
} else if (!isScene(0, 3)) {
showText("Man, screens sure get light fast around here.");
pl.stop();
player.faceDir = "";
gAcceptInput = false;
displayText();
gameState.night = false;
}
}
if (isScene(3, 4)) {
if (gameState.bucketDown) {
trace("The bucket is down! " + stageCollides.obj[1].bucket_mc._name);
stageCollides.obj[1].bucket_mc.gotoAndStop("down");
}
}
if (isScene(2, 1)) {
if (gameState.hasRained && (!gameState.richesTaken)) {
scene_mc.mud.gotoAndStop("mud");
}
}
if (isScene(0, 2)) {
if (gameState.night) {
scene_mc.innkeeper_mc._visible = false;
if (gameState.potTaken) {
scene_mc.background.pot_mc._visible = false;
}
}
}
if ((!isScene(1, 1)) && (!isScene(1, 2))) {
if (gameState.wearingHay) {
addEvent("hayRemove", -1);
showText("Drat. The winds are heavy on all but a couple of key screens... looks like you're no longer in stealth mode.");
player.state = 0;
gameState.wearingHay = false;
gAcceptInput = false;
displayText();
}
}
if (isScene(0, 5)) {
if (gameState.drawerOpen) {
changeDrawerState(true);
}
}
if (isScene(1, 1)) {
if (gameState.wearingHay) {
stageCollides.obj[0]._visible = false;
scene_mc.blocks_mc.gotoAndStop("noHay");
}
}
if (isScene(1, 2)) {
if (gameState.wearingHay) {
scene_mc.hayDistant_mc._visible = false;
showText("Hey, nice disguise! The Jhonka doesn't seem to notice you.");
gAcceptInput = false;
pl.stop();
player.faceDir = "";
displayText();
}
if (!gameState.kerreckDead) {
stageCollides.obj[0]._visible = false;
stageCollides.obj[1]._visible = false;
} else {
stageCollides.obj[3].gotoAndPlay("noNote");
scene_mc.blocks_mc.gotoAndStop("riches");
}
if (gameState.richesTaken) {
stageCollides.obj[1]._visible = false;
scene_mc.blocks_mc.gotoAndStop("noRiches");
}
}
if (isScene(1, 3)) {
if (gameState.stoneMoved) {
stageCollides.obj[1]._x = stageCollides.obj[1]._x + 15;
stageCollides.obj[1]._y = stageCollides.obj[1]._y + 4;
}
if (gameState.nedCottageOpen) {
stageCollides.obj[0].gotoAndStop("open");
}
}
if (isScene(2, 3)) {
gameState.nedShowing = false;
scene_mc.foreground_real.nakedNed_mc.stop();
scene_mc.foreground_real.nakedNed_mc.popCounter = 45;
scene_mc.foreground_real.nakedNed_mc.onEnterFrame = function () {
this.popCounter--;
if (this.popCounter < 0) {
if (Math.random() > 0.8) {
this.gotoAndPlay("show");
this._parent._parent._parent.gameState.nedShowing = true;
delete this.onEnterFrame;
} else {
this.popCounter = Math.floor((Math.random() * 40) + 20);
trace("naked ned decided not to come out. Check again in " + this.popCounter);
}
}
};
}
if (isScene(3, 1)) {
if (!gameState.talkedDongelev) {
stageCollides.obj[0].archer2talkclip._visible = false;
}
}
if (isScene(3, 2)) {
if (gameState.pebblesTaken) {
scene_mc.pebbles_mc._visible = false;
}
scene_mc.wave2.gotoAndPlay(10);
scene_mc.wave3.gotoAndPlay(6);
scene_mc.wave4.gotoAndPlay(8);
}
if (isScene(1, 4)) {
if (gameState.fenceBroken) {
stageCollides.obj[1]._visible = false;
scene_mc.background.gotoAndStop("fenceBroken");
scene_mc.blocks_mc.gotoAndStop("noFence");
} else {
stageCollides.obj[2]._visible = false;
}
}
if (gameState.kerreckDead && (gameState.hasBelt)) {
gameState.screensSinceBeltTaken++;
}
if (isScene(2, 4) || (isScene(3, 3))) {
if (!gameState.kerreckDead) {
if ((Math.random() < 0.8) && (!gameState.kerreckDead)) {
gameState.kerreckPresent = true;
playSound("kerrekappear");
stageCollides.obj[1].walkSpeed = 2;
stageCollides.obj[1].onEnterFrame = updateKerreck;
} else {
gameState.kerreckPresent = false;
stageCollides.obj[1]._visible = false;
}
} else if ((gameState.kerrekScene.x == gScene.x) && (gameState.kerrekScene.y == gScene.y)) {
stageCollides.obj[1]._x = gameState.kerreckLocX;
stageCollides.obj[1]._y = gameState.kerreckLocY;
stageCollides.obj[1].gotoAndStop(gameState.kerreckFaceDir + "Dead");
if (gameState.screensSinceBeltTaken >= 10) {
stageCollides.obj[1].gotoAndStop(gameState.kerreckFaceDir + "Rot");
}
if (gameState.screensSinceBeltTaken >= 15) {
stageCollides.obj[1].gotoAndStop(gameState.kerreckFaceDir + "Bones");
}
if (gameState.hasBelt) {
stageCollides.obj[1].kerrekBelt_mc._visible = false;
}
} else {
stageCollides.obj[1]._visible = false;
}
}
if (isScene(0, 4)) {
if (gameState.talkedDongelev) {
scene_mc.blocks_mc.gotoAndStop("noArcher");
stageCollides.obj[1]._visible = false;
stageCollides.obj[1].stop();
}
}
if (isScene(5, 1)) {
if (gameState.knightCleared) {
stageCollides.obj[0].gotoAndPlay("move");
scene_mc.blocks_mc.gotoAndStop("open");
}
}
if (isScene(9, 1)) {
player.state = 9;
pl.gotoAndStop(playerStates[player.state] + "_r");
pl._x = 59;
pl._y = 311;
player.gMoveSpeed_x = 3;
player.gMoveSpeed_y = 3;
player.faceDir = "";
gAcceptInput = false;
showText("The beaded curtain slams shut behind you. There's no turning back now.");
displayText();
}
if (isScene(8, 1)) {
pl.gotoAndPlay(playerStates[player.state] + "_r");
player.faceDir = "";
if ((!gameState.keeper1Out) || (gameState.keeper1Done)) {
scene_mc.keeper1_mc._visible = false;
}
if ((!gameState.keeper2Out) || (gameState.keeper2Done)) {
scene_mc.keeper2_mc._visible = false;
}
if ((!gameState.keeper3Out) || (gameState.keeper3Done)) {
scene_mc.keeper3_mc._visible = false;
}
if ((gameState.keeper1Done && (gameState.keeper2Done)) && (gameState.keeper3Done)) {
scene_mc.curtain_mc.gotoAndStop("opened");
}
}
if (isScene(5, 2)) {
if (gameState.wearingPot) {
addEvent("removePot", -1);
showText("Phew! You discard the big black pot and wipe the horse grease from your eyes. The hood of your robe is still covered in highly flammable horse grease, though.");
if (!gameState.pointAwardedPotRemove) {
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gameState.pointAwardedPotRemove = true;
}
pl.gotoAndStop("robes_d");
player.faceDir = "";
gAcceptInput = false;
player.state = 2;
gameState.wearingPot = false;
displayText();
}
if (gameState.fishermanLeft) {
stageCollides.obj[0].inn_note_mc._visible = false;
}
}
if (isScene(0, 3)) {
if (gameState.richesGiven) {
stageCollides.obj[0].gotoAndStop("gone");
}
}
if (isScene(4, 2)) {
if (gameState.fishermanLeft) {
scene_mc.fisherman._visible = false;
scene_mc.fisherman.stop();
}
scene_mc.background.wave2.gotoAndPlay(10);
scene_mc.background.wave3.gotoAndPlay(6);
scene_mc.background.wave4.gotoAndPlay(8);
}
}
function isScene(x, y) {
if ((gScene.x == x) && (gScene.y == y)) {
return(true);
}
return(false);
}
function updateKerreck() {
if (gAcceptInput) {
if (this._x > pl._x) {
this.gotoAndStop("left");
this._x = this._x - this.walkSpeed;
} else {
this.gotoAndStop("right");
this._x = this._x + this.walkSpeed;
}
if ((this._y + this._height) > (pl._y + pl._height)) {
this._y = this._y - this.walkSpeed;
} else {
this._y = this._y + this.walkSpeed;
}
if ((Math.abs((this._y + this._height) - (pl._y + pl._height)) + Math.abs(this._x - pl._x)) < 50) {
gAcceptInput = false;
this.onEnterFrame = kerreckIntoKillzone;
}
}
}
function kerreckIntoKillzone() {
if ((Math.abs((this._y + this._height) - (pl._y + pl._height)) + Math.abs(this._x - pl._x)) < 40) {
trace("updateKerreck(): getting killed");
pl._visible = false;
addEvent("kerreckKill", -1);
showText("Your mom always told you not to take head poundings from strange Kerreks. And NOW look what's happened. You dead. Thanks for playing.");
gameOver();
displayText();
delete this.onEnterFrame;
} else {
if (this._x > pl._x) {
this.gotoAndStop("left");
this._x = this._x - 2;
} else {
this.gotoAndStop("right");
this._x = this._x + 2;
}
if ((this._y + this._height) > (pl._y + pl._height)) {
this._y = this._y - 2;
} else {
this._y = this._y + 2;
}
}
}
function initGameState() {
gameState.hasShirt = true;
gameState.hasMap = false;
gameState.stoneMoved = false;
gameState.knucklesBleed = false;
gameState.richesTaken = false;
gameState.hasRiches = false;
gameState.nedCottageOpen = false;
gameState.hasBaby = false;
gameState.fenceBroken = false;
gameState.hasMask = false;
gameState.kerreckPresent = false;
gameState.talkedMendelev = false;
gameState.talkedDongelev = false;
gameState.pebblesTaken = false;
gameState.hasPebbles = false;
gameState.pebblesUsed = false;
gameState.crankWorking = false;
gameState.bucketDown = false;
gameState.maskInBucket = false;
gameState.babyInBucket = false;
gameState.hasMeatball = false;
gameState.hasArrow = false;
gameState.berriesSearched = 0;
gameState.TRberrySearched = false;
gameState.TLberrySearched = false;
gameState.BRberrySearched = false;
gameState.BLberrySearched = false;
gameState.trinketFound = false;
gameState.hasTrinket = false;
gameState.takenFeed = false;
gameState.hasFeed = false;
gameState.talkedWoman = false;
gameState.womanLeft = false;
gameState.talkedKnight = false;
gameState.stink = false;
gameState.dress = false;
gameState.fire = false;
gameState.knightCleared = false;
gameState.fishermanLeft = false;
gameState.hasPills = false;
gameState.kerreckDead = false;
gameState.kerreckPresent = false;
gameState.hasBow = false;
gameState.kerreckFaceDir = "right";
gameState.kerreckLocX = 0;
gameState.kerreckLocY = 0;
gameState.hasBelt = false;
gameState.wearingHay = false;
gameState.hayPointsAwarded = false;
gameState.gaveTrinket = false;
gameState.rainCounter = 5;
gameState.raining = false;
gameState.hasRained = false;
gameState.nedShowing = true;
gameState.muddy = false;
gameState.mudPointsAwarded = false;
gameState.richesGiven = false;
gameState.night = false;
gameState.potTaken = false;
gameState.drawerOpen = false;
gameState.drawerReclosed = false;
gameState.hasRobes = false;
gameState.wearingPot = false;
gameState.hasSoda = false;
gameState.hasHelmet = false;
gameState.hasShield = false;
gameState.hasSword = false;
gameState.keeper1Out = false;
gameState.keeper2Out = false;
gameState.keeper3Out = false;
gameState.keeper1Done = false;
gameState.keeper2Done = false;
gameState.keeper3Done = false;
gameState.trogdorAwake = false;
gameState.pointAwardedForDrawer = false;
gameState.pointAwardedPotGet = false;
gameState.pointAwardedPotRemove = false;
gameState.pointAwardedSleep = false;
gameState.screensSinceBeltTaken = 0;
for (var prop in gameState) {
inventoryHistory[prop] = gameState[prop];
}
}
function wait() {
}
function jumpInHay() {
trace("Jumping in the hay!");
walkTo(357, 216, "jumpHay");
}
function tossBaby() {
trace("Tossing the bebe!");
walkTo(358, 214, "tossBaby");
}
function walkToWell() {
trace("walking to well");
walkTo(198, 162, "faceWell");
}
function gotoPebbles() {
trace("Walking to pebbles");
walkTo(168, 142, "faceRightEvent");
}
function getPebbles() {
trace("Taking pebbles");
scene_mc.pebbles_mc._visible = false;
changeScore(1);
finishedEvent();
}
function talkJhonka(pS) {
if ((pS == "yes") || (pS == "y")) {
showText("\"I KILL YOU!!\" screams the Jhonka.", false);
showText("Club or turkey leg, the Jhonka sure just beat you senseless with whatever he was holding. You dead. Thanks for playing!");
gameOver();
gSpecial = false;
} else {
showText("Just answer him, you fool!\n");
}
return(true);
}
function hugTree() {
trace("Hugging tree!");
walkTo(183, 222, "hugTree");
}
function moveStone() {
stageCollides.obj[1]._x = stageCollides.obj[1]._x + 15;
stageCollides.obj[1]._y = stageCollides.obj[1]._y + 4;
finishedEvent();
}
function walkToStone() {
walkTo(328, 186, "hugTree");
}
function gotoTable() {
walkTo(443, 198, "hugTree");
}
function dropBucket() {
stageCollides.obj[1].bucket_mc.gotoAndPlay("dropEmpty");
}
function dropBucketWithBaby() {
stageCollides.obj[1].bucket_mc.gotoAndPlay("dropBaby");
}
function raiseBucket() {
gameState.bucketDown = false;
if (gameState.maskInBucket) {
stageCollides.obj[1].bucket_mc.gotoAndPlay("raiseMask");
return(true);
}
if (gameState.babyInBucket) {
stageCollides.obj[1].bucket_mc.gotoAndPlay("raiseBaby");
return(true);
}
stageCollides.obj[1].bucket_mc.gotoAndPlay("raiseEmpty");
}
function raiseEmpty() {
stageCollides.obj[1].bucket_mc.gotoAndPlay("raiseEmpty");
}
function raiseMask() {
stageCollides.obj[1].bucket_mc.gotoAndPlay("raiseMask");
}
function raiseBaby() {
stageCollides.obj[1].bucket_mc.gotoAndPlay("raiseBaby");
}
function emptyBucket() {
stageCollides.obj[1].bucket_mc.gotoAndPlay("empty");
}
function gotoGary() {
walkTo(213, 214, "faceWell");
}
function garyAttack() {
stageCollides.obj[1].gotoAndPlay("kick");
}
function scareGary() {
pl.gotoAndStop("wearMask");
stageCollides.obj[1].gotoAndPlay("scare");
}
function walkToArrowTree() {
walkTo(230, 130, "faceWell");
}
function walkToArrowKill() {
stageCollides.obj[1].archerWait = true;
walkTo(275, 142, "faceWell");
}
function getArrowed() {
stageCollides.obj[0].removeMovieClip();
scene_mc.obj1._visible = true;
trace("GettingArrowed");
stageCollides.obj[1].gotoAndPlay("kill");
}
function archerLeaves() {
stageCollides.obj[1].gotoAndPlay("leave");
}
function gotoTLBush() {
walkTo(148, 171, "hugTree");
}
function gotoBLBush() {
walkTo(78, 267, "hugTree");
}
function gotoTRBush() {
walkTo(413, 163, "hugTree");
}
function gotoBRBush() {
walkTo(478, 255, "hugTree");
}
function walkToBabyCottageDoor() {
walkTo(344, 210, "faceWell");
}
function enterBabyCottage() {
changeScene("pants", 0, 3);
finishedEvent();
}
function walkToShelf() {
walkTo(170, 218, "hugTree");
}
function leaveCottage() {
changeScene("pants", 4, 3);
finishedEvent();
}
function knightAllowPassage() {
stageCollides.obj[0].gotoAndPlay("move");
scene_mc.blocks_mc.gotoAndStop("open");
}
function walkToFeedThrow() {
walkTo(404, 118, "faceWell");
}
function throwFeed() {
switch (player.state) {
case 0 :
pl.gotoAndPlay("feedFish");
return;
case 1 :
pl.gotoAndPlay("feedFishMud");
return;
case 2 :
pl.gotoAndPlay("feedFishRobes");
return;
default :
pl.gotoAndPlay("feedFish");
}
}
function walkToInnDoor() {
walkTo(128, 198, "faceWell");
}
function enterInn() {
changeScene("pants", 0, 2);
finishedEvent();
}
function kerreckKill() {
if (stageCollides.obj[1]._x > pl._x) {
stageCollides.obj[1].gotoAndPlay("killLeft");
} else {
stageCollides.obj[1].gotoAndPlay("killRight");
}
}
function plArrowKerreck() {
delete stageCollides.obj[1].onEnterFrame;
if (stageCollides.obj[1]._x > pl._x) {
pl.gotoAndPlay("shootRight");
} else {
pl.gotoAndPlay("shootLeft");
}
}
function kerreckGetArrowed() {
if (stageCollides.obj[1]._x > pl._x) {
gameState.kerreckFaceDir = "left";
stageCollides.obj[1].gotoAndPlay("dieLeft");
} else {
gameState.kerreckFaceDir = "right";
stageCollides.obj[1].gotoAndPlay("dieRight");
}
gameState.kerreckDead = true;
gameState.kerreckLocX = stageCollides.obj[1]._x;
gameState.kerreckLocY = stageCollides.obj[1]._y;
gameState.kerrekScene = new Object({x:gScene.x, y:gScene.y});
gameState.kerreckPresent = false;
}
function walkToJhonkaCave() {
walkTo(410, 189, "faceRightEvent");
}
function jhonkaKill() {
stageCollides.obj[0].gotoAndPlay("kill");
gameOver();
}
function jhonkaTalk() {
gSpecial = true;
gSpecialState = "jhonkaTalk";
finishedEvent();
}
function walkToRiches() {
walkTo(238, 104, "hayPreRemove");
}
function removeRiches() {
stageCollides.obj[1]._visible = false;
trace("removeRiches called " + pl._name);
gameState.richesTaken = true;
gameState.hasRiches = true;
inventoryHistory.hasRiches = true;
gameState.wearingHay = false;
player.state = 0;
scene_mc.blocks_mc.gotoAndStop("noRiches");
pl.gotoAndPlay("hayRemove");
}
function hayRemove() {
pl.gotoAndPlay("hayRemove");
}
function playArcheryGame() {
returnToGameX = pl._x;
returnToGameY = pl._y;
gotoAndPlay (1056);
}
function playClimbingGame() {
returnToGameX = pl._x;
returnToGameY = pl._y;
gotoAndPlay (1074);
}
function walkToDeadKerrek() {
if (gameState.dress) {
walkTo(stageCollides.obj[1]._x, stageCollides.obj[1]._y + stageCollides.obj[1]._height, "takeBeltRobes");
} else {
walkTo(stageCollides.obj[1]._x, stageCollides.obj[1]._y + stageCollides.obj[1]._height, "takeBelt");
}
}
function startRain() {
scene_mc.rainSound_mc.gotoAndPlay("sound");
}
function finishRain() {
showRain();
finishedEvent();
}
function walkToMudPuddle() {
walkTo(253, 200, "faceRightEvent");
}
function slipInMudPuddle() {
pl.gotoAndPlay("slipInMud");
}
function applyHay() {
gameState.wearingHay = true;
gameState.muddy = false;
player.state = 4;
finishedEvent();
}
function hideBabyLady() {
stageCollides.obj[0].gotoAndStop("gone");
playSound("babylady.wav");
finishedEvent();
}
function walkToBabyNedCottage() {
walkTo(398, 172, "faceWell");
}
function babyNedCottage() {
var temp_mc = scene_mc.naked_ned_mc.duplicateMovieClip("naked_ned_reals", 10000);
trace((((("babyNedCottage(): " + temp_mc._name) + " ") + scene_mc.naked_ned_reals._name) + " ") + scene_mc.naked_ned_reals.getDepth());
temp_mc._x = scene_mc.naked_ned_mc._x;
temp_mc._y = scene_mc.naked_ned_mc._y;
temp_mc.gotoAndPlay("play");
trace("temp_mc._currentframe" + temp_mc._currentframe);
}
function changeDrawerState() {
scene_mc.dresser_mc.gotoAndPlay(gameState.drawerOpen.toString());
if (gameState.hasRobes) {
scene_mc.dresser_mc.robes_mc._visible = false;
}
finishedEvent();
}
function walkToDrawer() {
walkTo(353, 232, "faceRightEvent");
}
function takeRobes() {
scene_mc.dresser_mc.robes_mc._visible = false;
finishedEvent();
}
function walkToBed() {
walkTo(478, 178, "faceRightEvent");
}
function nightfall() {
scene_mc.foreground_real.nightCoverup_mc.gotoAndPlay("coverup");
}
function revealNightScene() {
scene_mc.background.gotoAndStop("night");
scene_mc.innkeeper_mc._visible = false;
gameState.night = true;
scene_mc.foreground_real.nightCoverup_mc.gotoAndPlay("reveal");
if (gameState.potTaken) {
scene_mc.background.pot_mc._visible = false;
}
pl.gotoAndPlay("sleeper");
}
function walkToPantry() {
walkTo(368, 113, "hugTree");
}
function reachForPot() {
pl.gotoAndPlay("get_pot");
}
function getHorseGrease() {
gameState.potTaken = true;
gameState.wearingPot = true;
player.state = 5;
scene_mc.background.pot_mc.gotoAndPlay("play");
}
function removePot() {
pl.gotoAndPlay("remove_pot");
}
function tossBaby() {
walkTo(168, 178, "tossBaby");
}
function babyReturns() {
pl.gotoAndPlay("babyReturns");
}
function walkToCliffBase() {
walkTo(265, 166, "hugTree");
}
function walkToThrowSwordAtTrogdor() {
walkTo(171, 324, "faceRightEvent");
}
function throwSwordAtTrogdor() {
pl._visible = false;
scene_mc.finalScene_mc.gotoAndPlay("sword");
}
function startTrogdorTimer() {
scene_mc.finalScene_mc.timer = 120;
scene_mc.finalScene_mc.onEnterFrame = trogTimerTick;
finishedEvent();
}
function trogTimerTick() {
if (gAcceptInput) {
this.timer--;
}
if (this.timer < 0) {
if (gAcceptInput) {
gAcceptInput = false;
addEvent("burnination", -1);
showText("Congratulations! You've won! No one can kill Trogdor but you came closer than anybody ever! Way to go!", false);
showText("Peasants are bound to talk about you for years and years. You'll be a legend! Maybe they'll even make a statue of you one day! Congratulations!", true);
addEvent("wonGame", 1);
displayText();
}
delete this.onEnterFrame;
}
trace("trogTimerTick(): called, timer = " + this.timer);
}
function burnination() {
scene_mc.finalScene_mc.gotoAndPlay("burn");
}
function wonGame() {
gotoAndPlay (1075);
}
function gotSword() {
pl.gotoAndStop("sword_r");
finishedEvent();
}
function playDiskSound() {
trace("playDiskSound called");
playSound("diskdrive");
finishedEvent();
}
function headUpMountainPass() {
changeScene("pants", 6, 1);
pl._x = 250;
pl._y = 274;
pl.gotoAndStop("fire_u");
finishedEvent();
}
function trogdorSleepfire() {
scene_mc.trogdor_sleepfire.play();
}
function trogSpeak1() {
playSound("trogtalk1");
finishedEvent();
}
function trogSpeak2() {
playSound("trogtalk2");
finishedEvent();
}
function trogSpeak3() {
playSound("trogtalk3");
finishedEvent();
}
function silenceTrogdor() {
gameSound.stop();
finishedEvent();
}
function leaveGame() {
getURL ("games.html");
}
function leaveRoom(dir) {
gameState.kerreckPresent = false;
if (isScene(3, 4)) {
if (gameState.babyInBucket) {
showText("Nice try. Ditch the baby at the bottom of the well, eh? Thought you'd be able to just walk away and it's nothing but mead and wenches from now on, huh? Well guess what? You dead. Thanks for playing.");
gameOver();
pl.stop();
return(true);
}
}
if (isScene(0, 3)) {
trace("leaveRoom(): called for room 0,3");
if ((!gameState.womanLeft) && (!gameState.trinketFound)) {
showText("The baby lady calls after you, \"Hey, you're on some quest right? Well, the little squirt here lost something of mine in the yard the other day. It's yours if you can find it.\"");
} else {
showText("This place is dead anyway.");
}
pl.stop();
displayText();
gAcceptInput = false;
addEvent("leaveCottage", 0);
return(true);
}
return(false);
}
function triggerHit(trigNum) {
if (!gAcceptInput) {
return(false);
}
if (isScene(8, 1)) {
trace("trigger hit for trogkeepers" + trigNum);
var i = 1;
while (i <= 3) {
if (((trigNum == i) && (!eval (("gameState.keeper" + i) + "Out"))) && (!eval (("gameState.keeper" + i) + "Done"))) {
eval (("scene_mc.keeper" + i) + "_mc")._visible = true;
eval (("scene_mc.keeper" + i) + "_mc").gotoAndPlay("enter");
pl.stop();
gAcceptInput = false;
gSpecial = true;
gQuizNum = trigNum;
switch (trigNum) {
case 1 :
showText("Foolish peasant! How dare you enter this fairly sacred chamber!", false);
showText("You explain that you're here to smote Trogdor and if he doesn't get outta your way, him too!", true);
showText("You cannot vanquish Trogdor! Only the Three Keepers of Trogdor hold the tools with which to destroy the Burninator. The Trog-Shield, the Trog-Helmet, and the Trog-Sword.", true);
showText("And the only way we'll give them up is if you answer the three Trog-Trivia questions correctly.", true);
if (gameState.hasMeatball) {
showText("Unless you happen to have something to eat on ya. Then we could forego my question.", true);
gSpecialState = "keeperItem";
} else {
gSpecialState = "quiz";
startQuiz(1);
}
break;
case 2 :
showText("Hold, peasant! You must answer the second dreaded Trog-Trivia question!", true);
if (gameState.hasSoda) {
showText("Or we could call it even if I had an ice cold drink right now.", true);
gSpecialState = "keeperItem";
} else {
gSpecialState = "quiz";
startQuiz(2);
}
break;
case 3 :
showText("Think you're pretty hot stuff, eh? Let's see you answer the deadly and pretty impossible THIRD TROG-TRIVIA QUESTION!", false);
if (gameState.hasPills) {
showText("That is, unless you've got something for my lower back. Man, it's killin me!", true);
gSpecialState = "keeperItem";
} else {
gSpecialState = "quiz";
startQuiz(3);
}
break;
}
}
i++;
}
return(undefined);
}
if (isScene(0, 3) && (trigNum == 1)) {
trace("triggerHit(): Leaving cottage");
leaveRoom();
}
if (isScene(0, 2) && (trigNum == 1)) {
trace("triggerHit(): Leaving inn");
changeScene("pants", 5, 2);
return(undefined);
}
if (isScene(9, 1) && (trigNum == 1)) {
trace("triggerHit(): sleepfire!");
gAcceptInput = false;
pl.stop();
addEvent("trogdorSleepfire", -1);
showText("Yow. Looks like you got a little too close. You dead. Maybe next time don't get too close.");
displayText();
gameOver();
return(undefined);
}
if (isScene(0, 5) && ((trigNum == 1) || (trigNum == 2))) {
trace("triggerHit(): Leaving ned's cottage");
changeScene("pants", 1, 3);
return(undefined);
}
if ((isScene(1, 3) && (trigNum == 1)) && (gameState.nedCottageOpen)) {
trace("triggerHit(): Entering ned's cottage");
changeScene("pants", 0, 5);
finishedEvent();
}
if (isScene(5, 1)) {
trace("triggerHit(): Loading next screen");
pl.stop();
player.faceDir = "";
gAcceptInput = false;
showText("Please insert floppy disk 2 into Drive B and press enter.");
showText("Disk read error. Please insert floppy disk 2 into Drive B and press enter.", true);
addEvent("playDiskSound", 0);
addEvent("headUpMountainPass", 1);
displayText();
}
if ((((isScene(2, 1) && (trigNum == 1)) && (!gameState.muddy)) && (gameState.hasRained)) && (!gameState.richesTaken)) {
gameState.muddy = true;
trace("triggerHit(): Slip in mud");
gAcceptInput = false;
addEvent("slipInMudPuddle", -1);
showText("Now you've done it! You're covered in sticky, albeit fine smelling, mud. Your \"Scalding Lake\" T-shirt is all soiled, too. You just washed it last harvest!", true);
if (!gameState.mudPointsAwarded) {
gLastPointAmount = 2;
addEvent("scoreSomePoints", 0);
gameState.mudPointsAwarded = true;
}
player.state = 1;
displayText();
}
if (((isScene(0, 4) && (trigNum == 1)) && (!gameState.talkedDongelev)) && (!gGameOver)) {
gAcceptInput = false;
trace("triggerHit(): getting killed");
addEvent("walkToArrowKill", -1);
showText("Hopefully this guy will have some sense and not shoot you.");
addEvent("getArrowed", 0);
gameOver();
showText("That guy has no sense. He shot you.", true);
showText("Dumb, dumb, dumb. Nice one, William Tell. You dead. Thanks for playing.", true);
displayText();
}
if ((((isScene(5, 3) && (trigNum == 1)) && (gameState.potTaken)) && (!gameState.fire)) && (gameState.night)) {
gAcceptInput = false;
trace("triggerHit(): lighting afire");
playSound("garyneigh");
showText("Whoa! The horse grease on your robe caught fire! You're a for-real peasant now.", true);
gLastPointAmount = 10;
addEvent("scoreSomePoints", 0);
player.state = 3;
gameState.fire = true;
player.walking = false;
pl.gotoAndStop("fire_r");
displayText();
}
}
function talkJhonka(pS) {
if (pS == "yes") {
gSpecial = false;
showText("\"I KILL YOU!!\" screams the Jhonka.");
addEvent("jhonkaKill", 0);
showText("Club or turkey leg, the Jhonka sure just beat you senseless with whatever he was holding. You dead. Thanks for playing!", true);
return(true);
}
if (pS == "no") {
gSpecial = false;
showText("\"Okay. Lemme know if you see riches anywhere,\" he grunts and goes back to his hopping. You smooth talker, you.");
gLastPointAmount = 7;
addEvent("scoreSomePoints", 0);
return(true);
}
showText("Just answer him, yes or no, you fool!");
return(true);
}
function saveGame(gameNumber) {
var gameSaves;
trace("saveGame called: " + gameNumber);
if (gameSave_so.data.gameSaves == undefined) {
trace("saveGame : gameSaves was undefined");
gameSaves = new Array();
} else {
trace("saveGame : gameSaves was defined");
gameSaves = gameSave_so.data.gameSaves;
}
gameSaves[gameNumber] = new Object();
gameSaves[gameNumber].gameState = new Object();
for (var prop in gameState) {
gameSaves[gameNumber].gameState[prop] = gameState[prop];
}
gameSaves[gameNumber].inventoryHistory = new Object();
for (var prop in inventoryHistory) {
gameSaves[gameNumber].inventoryHistory[prop] = inventoryHistory[prop];
}
gameSaves[gameNumber].gScene = new Object({x:gScene.x, y:gScene.y});
trace("saveGame: not object returnTogameX = " + returnToGameX);
gameSaves[gameNumber].player = new Object();
for (var prop in player) {
gameSaves[gameNumber].player[prop] = player[prop];
}
gameSaves[gameNumber].player.playerCoordX = returnToGameX;
gameSaves[gameNumber].player.playerCoordY = returnToGameY;
trace("saveGame: new object returntogameX = " + gameSaves[gameNumber].player.playerCoordX);
gameSaves[gameNumber].mapHistory = new Array();
var i = 0;
while (i < 6) {
gameSaves[gameNumber].mapHistory[i] = new Array();
var j = 0;
while (j < 5) {
gameSaves[gameNumber].mapHistory[i][j] = mapHistory[i][j];
trace((((("map_mc.mapSq at save " + i) + "x") + j) + " ") + gameSaves[gameNumber].mapHistory[i][j]);
j++;
}
i++;
}
gameSaves[gameNumber].saveDate = new Date();
gameSave_so.data.gameSaves = gameSaves;
gameSave_so.flush();
trace("saveGame: new object returntogameX = " + gameSave_so.data.gameSaves[gameNumber].player.playerCoordX);
trace("gameSave_so.data.gameSaves[1].mapHistory[1][1] after flush " + gameSave_so.data.gameSaves[1].mapHistory[1][1]);
return(gameSave_so.data.gameSaves != undefined);
}
function loadGame(gameNumber) {
gShowString = new Array();
gEventsList = new Array();
if (gameSave_so.data.gameSaves == undefined) {
trace("loadGame: gameSaves was undefined");
return(false);
}
if (gameSave_so.data.gameSaves[gameNumber] == null) {
trace("loadGame: gameSaves for this number was undefined");
return(false);
}
for (var prop in gameSave_so.data.gameSaves[gameNumber].gameState) {
gameState[prop] = gameSave_so.data.gameSaves[gameNumber].gameState[prop];
}
for (var prop in gameSave_so.data.gameSaves[gameNumber].inventoryHistory) {
inventoryHistory[prop] = gameSave_so.data.gameSaves[gameNumber].inventoryHistory[prop];
}
gScene.x = gameSave_so.data.gameSaves[gameNumber].gScene.x;
gScene.y = gameSave_so.data.gameSaves[gameNumber].gScene.y;
for (var prop in gameSave_so.data.gameSaves[gameNumber].player) {
player[prop] = gameSave_so.data.gameSaves[gameNumber].player[prop];
}
map_initialize();
var i = 0;
while (i < 6) {
var j = 0;
while (j < 5) {
trace((((("map_mc.mapSq at load " + i) + "x") + j) + " ") + gameSave_so.data.gameSaves[gameNumber].mapHistory[i][j]);
mapHistory[i][j] = gameSave_so.data.gameSaves[gameNumber].mapHistory[i][j];
j++;
}
i++;
}
pl.gotoAndStop(playerStates[player.state] + "_r");
trace("loadGame(): returnToGameX " + gameSave_so.data.gameSaves[gameNumber].player.playerCoordX);
returnToGameX = gameSave_so.data.gameSaves[gameNumber].player.playerCoordX;
returnToGameY = gameSave_so.data.gameSaves[gameNumber].player.playerCoordY;
gSpecial = false;
updateScore();
return(true);
}
function clearGameSaves() {
gameSave_so.clear();
}
function showGameFiles() {
showText("The game files you have are: \n", false);
var i = 1;
while (i <= 5) {
showText(("Save Slot #" + i) + ": ", false);
if (gameSave_so.data.gameSaves[i] == undefined) {
showText("Empty\n", false);
} else {
showText(((((newline + (gameSave_so.data.gameSaves[i].saveDate.getMonth() + 1)) + "/") + gameSave_so.data.gameSaves[i].saveDate.getDate()) + "/") + gameSave_so.data.gameSaves[i].saveDate.getFullYear());
var theMinutes = gameSave_so.data.gameSaves[i].saveDate.getMinutes();
if (theMinutes < 10) {
theMinutes = "0" + theMinutes;
}
showText((((" " + gameSave_so.data.gameSaves[i].saveDate.getHours()) + ":") + theMinutes) + newline);
}
i++;
}
}
function parseForSaveGame(pS) {
var savenum;
if (((pS == "file") || (isAction(pS, "load"))) || (isAction(pS, "save"))) {
if (gameState.kerreckPresent) {
showText("You can't be fumbling with a floppy while the Kerrek is bearing down on you.", false);
return(true);
}
returnToGameX = pl._x;
returnToGameY = pl._y;
gotoAndStop (1055);
return(true);
}
if (isAction(pS, "save")) {
if (pS == "save 1") {
savenum = 1;
}
if (pS == "save 2") {
savenum = 2;
}
if (pS == "save 3") {
savenum = 3;
}
if (pS == "save 4") {
savenum = 4;
}
if (pS == "save 5") {
savenum = 5;
}
if (savenum == undefined) {
showText("Como se dice 'huh?' You can save up to five games by typing \"save 1\" or \"save 2\" or \"save 3\" ... stop me when you catch on.");
return(false);
}
if (saveGame(savenum)) {
showText(((("Game saved to slot " + savenum) + ". To load it again type \"load ") + savenum) + "\"");
} else {
showText(("Game save to slot " + savenum) + " failed.");
}
return(true);
}
if (isAction(pS, "load")) {
if (pS == "load 1") {
savenum = 1;
}
if (pS == "load 2") {
savenum = 2;
}
if (pS == "load 3") {
savenum = 3;
}
if (pS == "load 4") {
savenum = 4;
}
if (pS == "load 5") {
savenum = 5;
}
if (savenum == undefined) {
showText("Sorry, I'm not picking up what you're putting down. To load a game type \"load 1\" for game saves 1-5");
return(false);
}
if (loadGame(savenum)) {
showText(("Game loaded from slot " + savenum) + ".");
} else {
showText(("Game load from slot " + savenum) + " failed.");
}
return(true);
}
return(false);
}
function initFileMenu(dead) {
var i = 1;
while (i <= 4) {
var savebox = eval ("fileMenu_mc.savebox" + i);
savebox.myID = i;
savebox.playerIcon_mc = eval ("fileMenu_mc.playerIcon_mc" + i);
savebox.playerIcon_mc.thisDontLoop = false;
trace((("Save Slot #" + i) + ":") + savebox._name);
savebox.playerIcon_mc.collide._visible = false;
if (dead) {
savebox.saveButton_mc._visible = false;
}
if (i == 4) {
savebox.saveButton_mc._visible = false;
}
if (gameSave_so.data.gameSaves[i] == undefined) {
trace("Empty slot");
savebox.date_txt.text = "EMPTY";
savebox.sceneName_txt.text = "";
savebox.heart1_mc._visible = false;
savebox.playerIcon_mc.gotoAndStop("bones");
savebox.loadButton_mc._visible = false;
} else {
trace("Full slot");
savebox.date_txt.text = ((((gameSave_so.data.gameSaves[i].saveDate.getMonth() + 1) + "/") + gameSave_so.data.gameSaves[i].saveDate.getDate()) + "/") + gameSave_so.data.gameSaves[i].saveDate.getFullYear();
var points = gameSave_so.data.gameSaves[i].gameState.score;
trace("points = " + points);
var theMinutes = gameSave_so.data.gameSaves[i].saveDate.getMinutes();
if (theMinutes < 10) {
theMinutes = "0" + theMinutes;
}
savebox.date_txt.text = savebox.date_txt.text + (((" " + gameSave_so.data.gameSaves[i].saveDate.getHours()) + ":") + theMinutes);
savebox.date_txt.text = savebox.date_txt.text + " - ";
savebox.date_txt.text = savebox.date_txt.text + (points + " pt");
if (points != 1) {
savebox.date_txt.text = savebox.date_txt.text + "s";
}
savebox.sceneName_txt.text = getSceneName(gameSave_so.data.gameSaves[i].gScene.x, gameSave_so.data.gameSaves[i].gScene.y);
if (points < 15) {
savebox.heart1_mc._visible = false;
}
var j = 2;
while (j <= Math.floor(points / 15)) {
newheart_mc = savebox.heart1_mc.duplicateMovieClip("heart" + j, j);
newheart_mc._x = savebox.heart1_mc._x + ((j - 1) * (savebox.heart1_mc._width + 2));
newheart_mc._y = savebox.heart1_mc._y;
j++;
}
trace("playerStates: " + playerStates[gameSave_so.data.gameSaves[i].player.state]);
savebox.playerIcon_mc.gotoAndPlay(playerStates[gameSave_so.data.gameSaves[i].player.state] + "_d");
}
i++;
}
}
function saveButtonPressed(theID) {
if (saveGame(theID)) {
showText(("Game saved to slot " + theID) + ".");
} else {
showText(("Game save to slot " + theID) + " failed. Make sure you have cookies enabled.");
}
saveGame(theID);
returnToGame();
}
function loadButtonPressed(theID) {
if (loadGame(theID)) {
showText(("Game loaded from slot " + theID) + ".");
} else {
showText(("Game load from slot " + theID) + " failed.");
}
gAcceptInput = false;
returnToGame();
}
function main() {
if (gAcceptInput && (!gSpecial)) {
playerMove();
}
maintainDepths();
}
function returnToGame() {
gGameOver = false;
trace("returnToGame() reached");
gotoAndPlay ("gameLoop");
textShow_mc._visible = false;
textShow_mc.textInstance.autoSize = "center";
scene_mc.gotoAndStop((("screen" + gScene.x) + "x") + gScene.y);
pl = scene_mc.player_mc.duplicateMovieClip("real_player", 99);
pl.gotoAndStop(playerStates[player.state] + "_r");
scene_mc.player_mc._visible = false;
scene_mc.player_mc.stop();
pl.collide._visible = false;
sceneInit(true);
finishedEvent();
map_mc._visible = false;
debugger_mc._visible = false;
player.faceDir = "";
player.walking = false;
pl._x = returnToGameX;
trace("returnToGame(): returnToGameX " + returnToGameX);
pl._y = returnToGameY;
pl.thisDontLoop = false;
updateScore();
if (!gameState.raining) {
hideRain();
} else {
showRain();
}
}
function hideRain() {
rain_top_mc.stop();
rain_top_mc._visible = false;
scene_mc.rain_bottom_mc.stop();
scene_mc.rain_bottom_mc._visible = false;
gameState.raining = false;
}
function showRain() {
rain_top_mc.play();
rain_top_mc._visible = true;
scene_mc.rain_bottom_mc.play();
scene_mc.rain_bottom_mc._visible = true;
gameState.raining = true;
}
function gameInit() {
gScene.x = 5;
gScene.y = 1;
scene_mc.gotoAndStop((("screen" + gScene.x) + "x") + gScene.y);
gGameOver = false;
pl = scene_mc.player_mc;
pl.stop();
player.faceDir = "r";
player.gMoveSpeed_x = 5;
player.gMoveSpeed_y = 4;
player.state = 0;
stageCollides.block = new Array();
stageCollides.obj = new Array();
stageCollides.exit = new Array();
stageCollides.trigger = new Array();
pl = scene_mc.player_mc.duplicateMovieClip("real_player", 99);
scene_mc.player_mc._visible = false;
pl.collide._visible = false;
pl.stop();
pl._x = 263.7;
pl._y = 168.5;
textShow_mc._visible = false;
textShow_mc.textInstance.autoSize = "center";
gShowString.length = 0;
gCurrentShowString = 0;
gEventsList.length = 0;
gRunningEvent = false;
gInventory = false;
var gSpecial = false;
var gSpecialState = "";
gQuizNum = -1;
map_mc._visible = false;
map_initialize();
gAcceptInput = true;
initGameState();
debugger_mc._visible = false;
if (!gameState.raining) {
hideRain();
} else {
showRain();
}
sceneInit();
updateScore();
pl.stop();
}
function sceneInit(stayStill) {
stuff = stageCollides.obj.length;
var i = 0;
while (i < stuff) {
stageCollides.obj[i].removeMovieClip();
i++;
}
stageCollides.obj = new Array();
scene_mc.blocks_mc._visible = false;
for (var prop in stageCollides) {
if (prop === "trigger") {
trace("Trigger added to array");
}
if (prop != "obj") {
stageCollides[prop] = new Array();
var i = 0;
while (eval ((("scene_mc." + prop) + (i + 1)) + "._name") == (prop + (i + 1))) {
i++;
if (prop != "obj") {
eval (("scene_mc." + prop) + i)._visible = false;
stageCollides[prop].push(eval (("scene_mc." + prop) + i));
} else {
eval (("scene_mc." + prop) + i).baseline._visible = false;
}
}
}
}
var i = 0;
while (eval (("scene_mc.hotSpot" + (i + 1)) + "._name") == ("hotSpot" + (i + 1))) {
eval ("scene_mc.hotSpot" + (i + 1))._visible = false;
i++;
}
var i = 0;
while (eval (("scene_mc.obj" + (i + 1)) + "._name") == ("obj" + (i + 1))) {
var orig_obj = eval ("scene_mc.obj" + (i + 1));
stageCollides.obj[i] = orig_obj.duplicateMovieClip("real_obj" + i, 100 + i);
trace(stageCollides.obj[i]._name);
orig_obj._visible = false;
orig_obj.stop();
stageCollides.obj[i]._x = orig_obj._x;
stageCollides.obj[i]._y = orig_obj._y;
stageCollides.obj[i]._xscale = orig_obj._xscale;
stageCollides.obj[i]._yscale = orig_obj._yscale;
stageCollides.obj[i].baseline._visible = false;
i++;
}
scene_mc.foreground_real.removeMovieClip();
scene_mc.foreground.duplicateMovieClip("foreground_real", 500);
pl.gotoAndPlay((playerStates[player.state] + "_") + player.faceDir);
if (stayStill) {
pl.stop();
}
initRoom();
}
function keyMove(dir) {
if ((player.faceDir == dir) && (player.walking)) {
player.walking = false;
pl.stop();
} else {
pl.gotoAndPlay((playerStates[player.state] + "_") + dir.charAt(0));
player.walking = true;
player.faceDir = dir;
}
}
function maintainDepths() {
stageCollides.obj;
var i = 0;
while (i < stageCollides.obj.length) {
var i_y_coord;
var pl_coord;
pl_coord = pl._y + pl._height;
if (stageCollides.obj[i].baseline._name == "baseline") {
i_y_coord = stageCollides.obj[i]._y + stageCollides.obj[i].baseline._y;
} else {
i_y_coord = stageCollides.obj[i]._y + stageCollides.obj[i]._height;
}
if (((pl_coord < i_y_coord) && (pl.getDepth() > stageCollides.obj[i].getDepth())) || ((pl_coord > i_y_coord) && (pl.getDepth() < stageCollides.obj[i].getDepth()))) {
pl.swapDepths(stageCollides.obj[i]);
}
i++;
}
}
function playerMove() {
var x_offset = 0;
var y_offset = 0;
var store_x;
var store_y;
store_x = pl._x;
store_y = pl._y;
var x_movable = true;
var y_movable = true;
targetPoint = new Object();
if (player.walking) {
switch (player.faceDir.charAt(0)) {
case "r" :
x_offset = player.gMoveSpeed_x;
break;
case "l" :
x_offset = -player.gMoveSpeed_x;
break;
case "u" :
y_offset = -player.gMoveSpeed_y;
break;
case "d" :
y_offset = player.gMoveSpeed_y;
break;
default :
trace("error in playerMove() - invalid direction");
}
switch (player.faceDir.charAt(1)) {
case "u" :
y_offset = (-player.gMoveSpeed_y) / 2;
break;
case "d" :
y_offset = player.gMoveSpeed_y / 2;
break;
}
if (gameState.wearingPot) {
var xholder = x_offset;
x_offset = y_offset * -1;
y_offset = xholder * -1;
}
pl._x = pl._x + x_offset;
x_movable = (!testBlockHit()) || (gRunningEvent);
pl._x = pl._x - x_offset;
pl._y = pl._y + y_offset;
y_movable = (!testBlockHit()) || (gRunningEvent);
if (x_movable) {
pl._x = pl._x + x_offset;
}
if (!y_movable) {
pl._y = pl._y - y_offset;
}
if ((x_offset != 0) && (!x_movable)) {
if (player.faceDir.length > 1) {
player.faceDir = player.faceDir.charAt(1);
if (y_offset != 0) {
pl.gotoAndPlay((playerStates[player.state] + "_") + player.faceDir);
}
} else {
player.faceDir = "";
}
}
if ((y_offset != 0) && (!y_movable)) {
if (player.faceDir.length > 1) {
player.faceDir = player.faceDir.charAt(0);
} else {
player.faceDir = "";
}
}
if (player.faceDir == "") {
player.walking = false;
pl.stop();
}
if (testCollision("exit")) {
trace("leaving the area!");
if (!leaveRoom()) {
if (pl.collide.hitTest(scene_mc.exit1)) {
changeScene(1);
}
if (pl.collide.hitTest(scene_mc.exit2)) {
changeScene(2);
}
if (pl.collide.hitTest(scene_mc.exit3)) {
changeScene(3);
}
if (pl.collide.hitTest(scene_mc.exit4)) {
changeScene(4);
}
} else {
gAcceptInput = false;
displayText();
}
}
if (pl.collide.hitTest(scene_mc.trigger1)) {
triggerHit(1);
}
if (pl.collide.hitTest(scene_mc.trigger2)) {
triggerHit(2);
}
if (pl.collide.hitTest(scene_mc.trigger3)) {
triggerHit(3);
}
}
}
function walkTo(x, y, doneFrameLabel) {
pl.walkTox = x;
pl.walkToy = y;
pl.doneFrameLabel = doneFrameLabel;
pl.thisDontLoop = false;
trace("walkTo(): pl.targetFrame = " + pl.targetFrame);
pl.onEnterFrame = function () {
var xString;
var yString = "";
trace((("walkTo onEnterFrame called. " + this.walkTox) + ",") + this.walkToy);
if (((this.walkTox + (player.gMoveSpeed_x / 2)) + 0.5) < pl._x) {
xString = "l";
}
if (((this.walkTox - (player.gMoveSpeed_x / 2)) - 0.5) > pl._x) {
xString = "r";
}
if (((this.walkToy + (player.gMoveSpeed_y / 2)) + 0.5) < pl._y) {
yString = "u";
}
if (((this.walkToy - (player.gMoveSpeed_y / 2)) - 0.5) > pl._y) {
yString = "d";
}
if ((xString + yString) == "") {
pl.thisDontLoop = true;
trace("deleting the onEnterFrame");
pl.gotoAndPlay(doneFrameLabel);
delete this.onEnterFrame;
return(false);
}
trace("walkTo has not arrived yet");
if (player.faceDir != (xString + yString)) {
keyMove(xString + yString);
}
trace("executing keyMove and playerMove");
playerMove();
};
}
function finishedEvent() {
trace("finishedEvent - remove event from queue and rerun displaytext");
gRunningEvent = false;
player.faceDir = "";
pl.stop();
displayText();
}
function resetPlayer() {
pl.removeMovieClip();
pl = scene_mc.player_mc.duplicateMovieClip("real_player", 99);
scene_mc.player_mc._visible = false;
pl.collide._visible = false;
}
function changeScene(dir, x, y) {
var xstore = pl._x;
var ystore = pl._y;
var cframe = pl._currentframe;
resetPlayer();
if ((x != undefined) && (y != undefined)) {
scene_mc.gotoAndStop((("screen" + x) + "x") + y);
gScene.x = x;
gScene.y = y;
if (isScene(0, 3)) {
pl._x = 355;
pl._y = 250;
}
if (isScene(1, 3)) {
trace("changing scene to outside cottage");
pl._x = 178;
pl._y = 204;
}
if (isScene(4, 3)) {
pl._x = 344;
pl._y = 210;
}
if (isScene(5, 2)) {
pl._x = 114;
pl._y = 196;
}
if (isScene(0, 2)) {
pl._x = 145;
pl._y = 204;
}
pl.stop();
pl.gotoAndStop(cframe);
player.walking = false;
player.faceDir = "";
} else {
trace("change scene");
var correction;
if (dir == 1) {
gScene.y--;
if (gScene.y < 1) {
gScene.y = 4;
}
if (isScene(4, 4)) {
if (xstore < 220) {
xstore = 40;
} else {
xstore = 460;
}
}
var stuff = true;
trace("Here's the result of isScene(5,3) : " + isScene(5, 3));
if ((((isScene(5, 1) || (isScene(5, 2))) || (isScene(5, 3))) || (isScene(5, 4))) && (xstore >= 400)) {
xstore = 400;
trace("setting stuff to false");
stuff = false;
}
trace("got it");
scene_mc.gotoAndStop((("screen" + gScene.x) + "x") + gScene.y);
pl._y = 280;
pl._x = xstore;
pl.gotoAndPlay(cframe);
if (stuff) {
correctPlayerLocation("y");
}
if (gameState.wearingHay) {
pl._y = pl._y - 60;
}
}
if (dir == 2) {
gScene.x++;
scene_mc.gotoAndStop((("screen" + gScene.x) + "x") + gScene.y);
pl._x = 40;
pl._y = ystore;
pl.gotoAndPlay(cframe);
if (isScene(1, 4)) {
pl._x = 70;
pl._y = 196;
}
if (isScene(4, 1)) {
pl._x = 40;
pl._y = 120;
}
correctPlayerLocation("x");
if (isScene(6, 1)) {
pl._x = 245;
pl._y = 262;
pl.gotoAndPlay("fire_u");
player.faceDir = "u";
}
}
if (dir == 3) {
gScene.y++;
if (gScene.y > 4) {
gScene.y = 1;
}
scene_mc.gotoAndStop((("screen" + gScene.x) + "x") + gScene.y);
pl._x = xstore;
pl._y = 100;
if (isScene(3, 2)) {
if (pl._x > 440) {
pl._x = 440;
}
pl._y = 56;
}
if (isScene(4, 2)) {
if (pl._x < 230) {
pl._x = 230;
}
pl._y = 55;
}
if (isScene(1, 2) && (gameState.wearingHay)) {
pl._x = 288;
}
var stuff = true;
trace("Here's the result of isScene(5,4) : " + isScene(5, 4));
if ((((isScene(5, 1) || (isScene(5, 2))) || (isScene(5, 3))) || (isScene(5, 4))) && (pl._x >= 450)) {
pl._x = 450;
trace("setting stuff to false");
stuff = false;
}
trace((("Autocorrected pl coord to be: " + pl._x) + ",") + pl._y);
if (isScene(5, 4)) {
pl._y = 40;
}
pl.gotoAndPlay(cframe);
if (stuff) {
trace("calling correctPlayerLocation here.");
correctPlayerLocation("y");
} else {
trace("calling correctPlayerLocation was cancelled.");
}
if (gameState.wearingHay) {
pl._y = pl._y - 60;
}
}
if (dir == 4) {
gScene.x--;
scene_mc.gotoAndStop((("screen" + gScene.x) + "x") + gScene.y);
pl._x = 520;
pl._y = ystore;
if (isScene(7, 1)) {
pl._x = 355;
pl._y = 262;
}
pl.gotoAndPlay(cframe);
correctPlayerLocation("x");
}
trace((("moving to: " + gScene.x) + "x") + gScene.y);
}
sceneInit();
}
function testBlockHit() {
targetPoint.x = pl.collide._x + (pl.collide._width / 2);
targetPoint.y = pl.collide._y + (pl.collide._height / 2);
pl.collide.localToGlobal(targetPoint);
return(scene_mc.blocks_mc.hitTest(targetPoint.x, targetPoint.y, true));
}
function correctPlayerLocation(dir) {
if (dir == "x") {
if (testBlockHit()) {
if (pl._y > (stage_mc._height / 2)) {
correction = 5;
} else {
correction = -5;
}
while (testBlockHit()) {
pl._y = pl._y + correction;
}
}
} else if (testBlockHit()) {
trace("correctPlayerLocation() found a hit with one of the blocks, I guess");
if (pl._x > (stage_mc._width / 2)) {
correction = 5;
} else {
correction = -5;
}
while (testBlockHit()) {
pl._x = pl._x + correction;
}
}
}
function testCollision(type) {
var i = 0;
while (i < stageCollides[type].length) {
if (pl.collide.hitTest(stageCollides[type][i])) {
return(true);
}
i++;
}
return(false);
}
function gameOver() {
gGameOver = true;
}
function setWalkSpeed(offset) {
if (isScene(9, 1)) {
return(false);
}
if (offset > 0) {
if (player.gMoveSpeed_x < 8) {
player.gMoveSpeed_x++;
player.gMoveSpeed_y++;
}
} else if (player.gMoveSpeed_x > 4) {
player.gMoveSpeed_x--;
player.gMoveSpeed_y--;
}
}
function setDebugger() {
trace("setDebugger(): called");
var counter = 0;
for (var prop in gameState) {
temp_mc = debugger_mc.attachMovie("debugPropPair", "debugPropPair" + counter, counter);
temp_mc.propName_txt.text = prop;
temp_mc.propValue_txt.text = gameState[prop];
if (temp_mc.propValue_txt.text == "true") {
temp_mc.propValue_txt.text = true;
}
if (temp_mc.propValue_txt.text == "false") {
temp_mc.propValue_txt.text = false;
}
temp_mc._y = counter * (temp_mc._height + 3);
counter++;
}
gAcceptInput = false;
}
function applyDebugger() {
trace("applyDebugger(): called");
var counter = 0;
for (var prop in gameState) {
temp_mc = eval ("debugger_mc.debugPropPair" + counter);
gameState[temp_mc.propName_txt.text] = ((!isNaN(Number(temp_mc.propValue_txt.text))) ? (Number(temp_mc.propValue_txt.text)) : (temp_mc.propValue_txt.text));
if (gameState[temp_mc.propName_txt.text] == "true") {
gameState[temp_mc.propName_txt.text] = true;
}
if (gameState[temp_mc.propName_txt.text] == "false") {
gameState[temp_mc.propName_txt.text] = false;
}
counter++;
}
var plX = pl._x;
var plY = pl._y;
changeScene("r", gScene.x - 1, gScene.y);
changeScene("r", gScene.x + 1, gScene.y);
pl._x = plX;
pl._y = plY;
pl.stop();
gAcceptInput = true;
}
function printMapOut() {
trace("printMapOut(): called");
map_hideHeads();
map_mc.printer_mc._visible = false;
printAsBitmap ("map_mc", "bmovie");
map_showCurrentHead();
map_mc.printer_mc._visible = true;
}
function smartLoop(theFrameName, the_mc) {
if ((the_mc.thisDontLoop == false) || (the_mc.thisDontLoop == undefined)) {
the_mc.gotoAndPlay(theFrameName);
} else {
the_mc.gotoAndPlay(the_mc.doneFrameLabel);
the_mc.thisDontLoop = false;
}
}
function resetSmartLoop(the_mc) {
if (the_mc == undefined) {
the_mc = pl;
}
the_mc.thisDontLoop = false;
}
function startQuiz(quizNum) {
trace(("startQuiz(" + quizNum) + ") called");
var quizChoice = (Math.floor(Math.random() * 3) + 1);
gQuizNum = quizNum;
switch (quizNum) {
case 1 :
gQuizTextPrefix = "Okay here goes. ";
switch (quizChoice) {
case 1 :
gQuizText = "What is the only creature the Jhonka fears?\nA. Poor Gary\nB. The Baby\nC. The Kerrek";
gQuizAnswer = 3;
break;
case 2 :
gQuizText = "What does Mendelev have you tell Dongolev?\nA. Haldo\nB. Hallo\nC. Allo";
gQuizAnswer = 1;
break;
case 3 :
gQuizText = "What did you win from the Archery game?\nA. SuperBow FunTime TM\nB. SuperTime FunBow TM\nC. SuperFun BowTime TM";
gQuizAnswer = 2;
}
break;
case 2 :
gQuizTextPrefix = "Listen careful now. ";
switch (quizChoice) {
case 1 :
gQuizText = "How many berry bushes are there in the whole kingdom of Peasantry?\nA. 4\nB. 5\nC. 6";
gQuizAnswer = 2;
break;
case 2 :
gQuizText = "What was the Innkeeper's pantry full of?\nA. Epsom Salts\nB. Epson Printers\nC. Old Man Rub";
gQuizAnswer = 3;
break;
case 3 :
gQuizText = "Which one of these letters is the letter C?\nA. B\nB. C\nC. A";
gQuizAnswer = 2;
}
break;
case 3 :
gQuizTextPrefix = "Riddle me this. ";
switch (quizChoice) {
case 1 :
gQuizText = "Which way does the river that runs through Peasantry flow?\nA. West to East\nB. Northwest to South\nC. Northeast to Southwest";
gQuizAnswer = 3;
break;
case 2 :
gQuizText = "To whom did the robe you're wearing originally belong?\nA. Nobleman Nicholas\nB. Nina Neverawesome\nC. Naked Ned";
gQuizAnswer = 3;
break;
case 3 :
gQuizText = "What color are the leaves on the tree that grows by the well?\nA. Orange\nB. Green\nC. Yellow";
gQuizAnswer = 1;
}
break;
}
showText(gQuizTextPrefix + gQuizText, true);
}
function getQuizAnswer(pS) {
var playerAnswer = 0;
pS = pS.toLowerCase();
if (pS == "a") {
playerAnswer = 1;
}
if (pS == "b") {
playerAnswer = 2;
}
if (pS == "c") {
playerAnswer = 3;
}
if (playerAnswer == 0) {
showText("Peasant fool! Choose A, B, or C!\n");
showText(gQuizText, false);
return(true);
}
if (playerAnswer == gQuizAnswer) {
switch (gQuizNum) {
case 1 :
showText("\"Ah crap! You're right. Here, take this stupid Trog-Shield!\"");
awardPrize();
break;
case 2 :
showText("\"That's right. Oh. This sucks. Guess I have to give you this Trog-Helmet. Dang.\"");
awardPrize();
break;
case 3 :
eval (("scene_mc.keeper" + gQuizNum) + "_mc").gotoAndPlay("speak");
gSpecial = false;
showText("\"Uh oh. You got it right. Trogdor's gonna kill me. Okay, you can have the Trog-Sword. Just promise not to kill any Trogdor's with it, kay?\"");
showText("You just stare at the Keeper blankly.", true);
showText("\"Okay fine! You can have the dumb thing anyways. Trogdor's through the beaded curtain over there.\"", true);
addEvent("gotSword", 2);
showText("The fabled Trog-Sword is yours. You now have the means to strike down Trogdor. Good luck, peasant.", true);
addEvent("keeperLeave", 3);
addEvent("brandishSword", 3);
addEvent("openCurtain", 3);
gameState.keeper3Out = false;
gameState.keeper3Done = true;
gameState.hasSword = true;
inventoryHistory.hasSword = true;
player.state = 8;
gLastPointAmount = 5;
addEvent("scoreSomePoints", 3);
break;
}
} else {
switch (gQuizNum) {
case 1 :
gameState.keeper1Out = false;
showText("\"Sorry peasant! You fail! And as punishment, you will be turned into...RON CUMBERDALE!!\"");
showText("You ask who the crap Ron Cumberdale is.", true);
showText("\"Just this kid from 4th grade that I really hated. But he was a BIG LOSER and HE SMELLED!\"", true);
addEvent("quizFailed", 2);
showText("Well, you not exactly dead. But there's no way you could defeat Trogdor as Ron Cumberdale. Your quest ends here. Thanks for playing.", true);
break;
case 2 :
gameState.keeper2Out = false;
showText("\"WRONG! You are hereby cursed to write corny folk songs for the rest of eternity! The kind that only OLD PEOPLE LIKE!!\"");
addEvent("quizFailed", 0);
showText("Well, you not exactly dead. But you certainly can't face Trogdor after writing 'Wheat Grows Sweet, But My Gal's Sweeter'. Your quest ends here. Thanks for playing.", true);
break;
case 3 :
gameState.keeper3Out = false;
showText("YES! I was hoping you'd get mine wrong. No Trog-Sword for you. In fact, no skin for you either!");
addEvent("quizFailed", 0);
showText("Wow. You sure dead. You had a good run, though. Thanks for playin.", true);
break;
}
gameOver();
}
}
function getKeeperItem(pS) {
if ((pS == "take the quiz") || (pS == "take quiz")) {
showText("You shake off the Keeper of Trogdor's request. Seriously - this guy should get a job.");
gSpecialState = "quiz";
startQuiz(gQuizNum);
return(true);
}
if ((pS == "inv") || (pS == "inventory")) {
gInventory = true;
gRunningEvent = true;
gotoAndPlay ("inventory");
return(true);
}
trace((((("pre-give clause" + pS) + ",") + isObj(pS, "meatball")) + ",") + gQuizNum);
if ((isAction(pS, "give") || (isAction(pS, "offer"))) || (isAction(pS, "hand over"))) {
if ((((((isObj(pS, "meatball") || (isObj(pS, "sandwich"))) || (isObj(pS, "sammich"))) || (isObj(pS, "hero"))) || (isObj(pS, "submarine"))) || (isObj(pS, "sub"))) && (gQuizNum == 1)) {
showText("No way! I was just kidding but you've really got a meatball sub. This rules! Here, you can have the Trog-Shield.");
gameState.hasMeatball = false;
awardPrize();
return(true);
}
if (((((isObj(pS, "soda") || (isObj(pS, "pop"))) || (isObj(pS, "drink"))) || (isObj(pS, "sprite"))) || (isObj(pS, "beverage"))) && (gQuizNum == 2)) {
showText("Sweet deal, peasant. I underestimated you. Wear this Trog-Helmet with style.");
gameState.hasSoda = false;
awardPrize();
return(true);
}
if ((isObj(pS, "pills") || (isObj(pS, "medicine"))) && (gQuizNum == 3)) {
showText("Whoa! Where'd you find this stuff? I don't think this is even legal anymore. These babies'll definitely smote LUMBAGO the, um, LOWER BACKINATOR!!");
gameState.hasPills = false;
addEvent("gotSword", 0);
showText("The fabled Trog-Sword is yours. You now have the means to strike down Trogdor. Good luck, peasant.", true);
addEvent("keeperLeave", 1);
addEvent("brandishSword", 1);
addEvent("openCurtain", 1);
gameState.keeper3Out = false;
gameState.keeper3Done = true;
gameState.hasSword = true;
inventoryHistory.hasSword = true;
awardPrize();
player.state = 8;
gLastPointAmount = 5;
addEvent("scoreSomePoints", 1);
return(true);
}
}
showText("I think he wants something from your inventory. Or you could just tell him \"take the quiz\"");
return(true);
}
function keeperLeave() {
eval (("scene_mc.keeper" + gQuizNum) + "_mc").gotoAndPlay("exit");
finishedEvent();
}
function brandishSword() {
pl.gotoAndPlay("brandish");
}
function awardPrize(eventOffset) {
if (eventOffset == undefined) {
eventOffset = 0;
}
addEvent("keeperLeave", eventOffset);
eval (("scene_mc.keeper" + gQuizNum) + "_mc").gotoAndPlay("speak");
gSpecial = false;
player.state = 5 + gQuizNum;
switch (gQuizNum) {
case 1 :
gameState.keeper1Out = false;
gameState.keeper1Done = true;
gameState.hasShield = true;
inventoryHistory.hasShield = true;
pl.gotoAndStop("shield_r");
playSound("mudslip");
gLastPointAmount = 5;
addEvent("scoreSomePoints", eventOffset);
return;
case 2 :
gameState.keeper2Out = false;
gameState.keeper2Done = true;
gameState.hasHelmet = true;
inventoryHistory.hasHelmet = true;
pl.gotoAndStop("helmet_r");
playSound("mudslip");
gLastPointAmount = 5;
addEvent("scoreSomePoints", eventOffset);
return;
case 3 :
return;
}
}
function quizFailed() {
eval (("scene_mc.keeper" + gQuizNum) + "_mc").gotoAndPlay("cast");
pl.gotoAndPlay("failedQuiz" + gQuizNum);
}
function openCurtain() {
scene_mc.curtain_mc.gotoAndPlay("open");
finishedEvent();
}
function parseFinalScene(pS) {
if (pS == "look") {
showText("You're in a giant cavern which houses a giant dragon. You didn't shrink or anything.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "trogdor") || (isObj(pS, "dragon"))) || (isObj(pS, "burninator")))) {
if (!gameState.trogdorAwake) {
showText("Holy crap! Trogdor's way bigger in person than he looks in most tapestries you've seen. All of the sudden, losing your cottage doesn't seem so bad anymore.");
} else {
showText("Trogdor is looming menacingly over you with a tiny wee sword stuck in his belly. He looks like he's gonna kill you really soon.");
}
return(true);
}
if ((pS == "talk") || (((isAction(pS, "talk") || (isAction(pS, "speak"))) || (isAction(pS, "shout"))) && (((isObj(pS, "trogdor") || (isObj(pS, "dragon"))) || (isObj(pS, "burninator"))) || (isObj(pS, "monster"))))) {
if (gameState.trogdorAwake) {
delete scene_mc.finalScene_mc.onEnterFrame;
showText("You scream that your name is Rather Dashing and that Trogdor burninated your cottage and you're here for revenge!");
addEvent("trogSpeak1", 0);
showText("\"Sup, mortal,\" booms Trogdor. \"I really appreciate you making the effort to come all the way up here and vanquish me and all. But, I'm kinda indestructible.\"", true);
addEvent("trogSpeak2", 1);
showText("\"Yeah, I can't be killed. I'm surprised nobody mentioned that to you. I'll admit though, you've gotten farther than anybody else ever has. I bet they'll make a statue or something in honor of you somewheres.", true);
addEvent("trogSpeak3", 2);
showText("\"I can honestly say it'll be a pleasure and an honor to burninate you, Rather Dashing.\"", true);
addEvent("silenceTrogdor", 3);
showText("Aw that sure was nice of him!", true);
gLastPointAmount = 10;
addEvent("scoreSomePointsNoSave", 4);
addEvent("burnination", 4);
showText("Congratulations! You've won! No one can kill Trogdor but you came closer than anybody ever! Way to go!", true);
addEvent("wonGame", 5);
} else {
showText("You yell some choice expletives at Trogdor but he doesn't wake up. There's a cool echo, though.");
}
return(true);
}
if (!gameState.trogdorAwake) {
if (((isAction(pS, "kill") || (isAction(pS, "attack"))) || (isAction(pS, "slay"))) && (((isObj(pS, "trogdor") || (isObj(pS, "dragon"))) || (isObj(pS, "burninator"))) || (isObj(pS, "monster")))) {
showText("Like how?");
return(true);
}
if ((isAction(pS, "wake") || (isAction(pS, "awaken"))) && (((isObj(pS, "trogdor") || (isObj(pS, "dragon"))) || (isObj(pS, "burninator"))) || (isObj(pS, "monster")))) {
showText("\"Troggie...,\" you murmur. \"Troggie, wake up it's time for Burnination school.\" He's not budging.");
return(true);
}
if (((((isAction(pS, "throw") || (isAction(pS, "use"))) || (isAction(pS, "hurl"))) || (isAction(pS, "lob"))) || (isAction(pS, "huck"))) && ((((isObj(pS, "sword") || (isObj(pS, "sword at trogdor"))) || (isObj(pS, "sword at dragon"))) || (isObj(pS, "sword at burninator"))) || (isObj(pS, "sword at monster")))) {
showText("This is it! You hurl the Trog-Sword with all your might at the sleeping Burninator.");
gameState.trogdorAwake = true;
addEvent("walkToThrowSwordAtTrogdor", 0);
gLastPointAmount = 7;
addEvent("scoreSomePointsNoSave", 0);
addEvent("throwSwordAtTrogdor", 0);
showText("Now you've done it! Trogdor's awake and the Trog-Sword doesn't seem to be doing a whole lot.", true);
showText("Your legs lock in fear, your eyes glaze over and you wish for some Depeasant adult undergarments. But you think you hear Trogdor whimpering!", true);
showText("Aw crap, that's you whimpering. At least your voice still works, I guess.", true);
addEvent("startTrogdorTimer", 3);
return(true);
}
} else {
showText("Trogdor is awake and a couple seconds from a Rather Dashing BBQ. Might as well say your peace with him.");
return(true);
}
}
function map_hideHeads() {
var i = 0;
while (i < 10) {
var j = 0;
while (j < 10) {
eval ((("map_mc.head" + i) + "x") + j)._visible = false;
j++;
}
i++;
}
}
function map_showCurrentHead() {
eval ((("map_mc.head" + gScene.x) + "x") + gScene.y)._visible = true;
}
function map_showMap() {
map_mc._visible = true;
map_hideHeads();
map_showCurrentHead();
}
function map_hideMap() {
map_mc._visible = false;
finishedEvent();
}
function map_initialize() {
var i = 0;
while (i < 6) {
mapHistory[i] = new Array();
var j = 0;
while (j < 5) {
mapHistory[i][j] = false;
j++;
}
i++;
}
}
function map_updateSquares() {
var i = 0;
while (i < 6) {
var j = 0;
while (j < 5) {
eval ((("map_mc.mapSq" + i) + "x") + j)._visible = mapHistory[i][j];
j++;
}
i++;
}
}
function playSound(soundname) {
gameSound.stop();
gameSound.attachSound(soundname);
gameSound.start();
trace("playSound " + soundname);
}
function changeScore(amount, autosave) {
gameState.score = gameState.score + amount;
playSound("getpoint");
updateScore();
returnToGameX = pl._x;
returnToGameY = pl._y;
if ((autosave == undefined) || (autosave == true)) {
saveGame(4);
}
}
function updateScore() {
score_txt.text = ("Score : " + gameState.score) + " of 150";
}
function scoreSomePoints() {
changeScore(gLastPointAmount);
finishedEvent();
}
function scoreSomePointsNoSave() {
changeScore(gLastPointAmount, false);
finishedEvent();
}
function createSceneName(x, y, sceneName) {
if (sceneNames[x] == undefined) {
sceneNames[x] = new Array();
}
sceneNames[x][y] = sceneName;
}
function getSceneName(x, y) {
return(sceneNames[x][y]);
}
function inventoryStart() {
gAcceptInput = false;
gRunningEvent = true;
Inventory.currentItem = "hasArrow";
Inventory.currentPos = new Object({col:0, row:0});
Inventory.rows = 9;
Inventory.cols = 2;
Inventory.showingDetail = false;
inventory_mc.detailText_txt._visible = false;
initInventoryPage();
}
function addInventoryItem(propname, textname, descrip, synonyms) {
Inventory.propNames.push(propname);
Inventory.readNames.push(textname);
Inventory.detailText.push(descrip);
Inventory.synonyms[propname] = synonyms;
trace((("addInventoryItem(): " + propname) + " ") + Inventory.synonyms[propname].length);
}
function initInventoryPage() {
for (var i in Inventory.propNames) {
trace("inventoryHistory[Inventory.propNames[i]]" + inventoryHistory[Inventory.propNames[i]]);
if (inventoryHistory[Inventory.propNames[i]]) {
inventory_mc[Inventory.propNames[i]].text = Inventory.readNames[i];
if (!gameState[Inventory.propNames[i]]) {
inventory_mc[Inventory.propNames[i]].textColor = 15132390 /* 0xE6E6E6 */;
}
} else {
inventory_mc[Inventory.propNames[i]].text = "???";
}
}
inv_updateButton();
}
function inv_key(xoff, yoff) {
trace("inv_key() : called");
Inventory.currentPos.x = Inventory.currentPos.x + xoff;
Inventory.currentPos.y = Inventory.currentPos.y + yoff;
if (Inventory.currentPos.y >= Inventory.rows) {
Inventory.currentPos.y = 0;
}
if (Inventory.currentPos.y < 0) {
Inventory.currentPos.y = Inventory.rows - 1;
}
if (Inventory.currentPos.x >= Inventory.cols) {
Inventory.currentPos.x = 0;
}
if (Inventory.currentPos.x < 0) {
Inventory.currentPos.x = Inventory.cols - 1;
}
inv_updateButton();
}
function inv_updateButton() {
if (!Inventory.showingDetail) {
var target = inventory_mc[Inventory.propNames[(Inventory.currentPos.x * Inventory.rows) + Inventory.currentPos.y]];
inventory_mc.inv_buttonhighlight_mc._x = target._x + 2;
inventory_mc.inv_buttonhighlight_mc._y = target._y + 2;
inventory_mc.inv_buttonhighlight_mc._height = target.textHeight;
inventory_mc.inv_buttonhighlight_mc._width = target.textWidth;
Inventory.currentItem = Inventory.propNames[(Inventory.currentPos.x * Inventory.rows) + Inventory.currentPos.y];
newInventoryPage(Inventory.currentItem);
if (gameState[Inventory.propNames[(Inventory.currentPos.x * Inventory.rows) + Inventory.currentPos.y]]) {
inventory_mc.instructions_txt.text = "Press return for description\nPress ESC or Backspace to exit";
} else {
inventory_mc.instructions_txt.text = "\nPress ESC or Backspace to exit";
}
}
}
function newInventoryPage(propertyName) {
trace("newInventoryPage(): " + propertyName);
if (inventoryHistory[propertyName]) {
inventory_mc.inventoryItem_mc.gotoAndStop(propertyName);
} else {
inventory_mc.inventoryItem_mc.gotoAndStop("unknown");
}
Inventory.currentItem = propertyName;
}
function newDetailPage() {
if (inventoryHistory[Inventory.currentItem] && (!Inventory.showingDetail)) {
for (var prop in Inventory.propNames) {
inventory_mc[Inventory.propNames[prop]]._visible = false;
}
inventory_mc.inv_buttonhighlight_mc._x = -500;
inventory_mc.detailText_txt._visible = true;
inventory_mc.detailText_txt.text = Inventory.detailText[(Inventory.currentPos.x * Inventory.rows) + Inventory.currentPos.y];
if (!gameState[Inventory.currentItem]) {
inventory_mc.detailText_txt.text = inventory_mc.detailText_txt.text + ("\n\n" + Inventory.noHas);
}
Inventory.showingDetail = true;
inventory_mc.instructions_txt.text = "Hit return to go back to list";
} else {
inventory_mc.instructions_txt.text = "Press return for description\nPress ESC or Backspace to exit";
for (var prop in Inventory.propNames) {
inventory_mc[Inventory.propNames[prop]]._visible = true;
}
inventory_mc.detailText_txt._visible = false;
Inventory.showingDetail = false;
inv_updateButton();
}
}
function returnToList() {
inventory_mc.gotoAndPlay("list_" + Inventory.currentItem);
initInventoryPage();
}
function inv_ReturnKey() {
if (Inventory.showingDetail) {
newDetailPage();
} else {
gInventory = false;
gRunningEvent = false;
gAcceptInput = true;
gotoAndPlay ("gameLoop");
}
}
function parseForInventoryItem(pS) {
if (((isAction(pS, "look") || (isAction(pS, "examine"))) || (isAction(pS, "check"))) || (isAction(pS, "peep"))) {
for (var prop in Inventory.synonyms) {
var i = 0;
while (i < Inventory.synonyms[prop].length) {
if (isObj(pS, Inventory.synonyms[prop][i])) {
if (inventoryHistory[prop]) {
if (gameState[prop]) {
showText("You've totally got one of those! Check your INVENTORY to give'r a serious looksee.");
} else {
showText("You used to have one, before the great item blight of 402. Check your INVENTORY to read about it.");
}
return(true);
}
return(false);
}
i++;
}
}
}
return(false);
}
function parseAnyRoom(pS) {
trace("parseAnyRoom");
if (gameState.wearingHay) {
if (((((isAction(pS, "exit") || (isAction(pS, "leave"))) || (isAction(pS, "remove"))) || (isAction(pS, "shake off"))) || (isAction(pS, "escape"))) && ((isObj(pS, "straw") || (isObj(pS, "hay"))) || (isObj(pS, "bale")))) {
showText("This hay is stuck to you and you can't shake it. Like that kid Philo from art school.", false);
return(true);
}
}
if ((((((((((pS == "mendelev says haldo") || (pS == "haldo")) || (pS == "tell Dongolev haldo")) || (pS == "tell the archer haldo")) || (pS == "tell archer haldo")) || (isAction(pS, "say haldo"))) || (pS == "tell man haldo")) || (pS == "tell guy haldo")) || (pS == "tell the man haldo")) || (pS == "tell the guy haldo")) {
showText("That's totally not Dongolev.");
return(true);
}
if ((pS == "map") || (((isAction(pS, "look") || (isAction(pS, "show"))) || (isAction(pS, "show"))) && (isObj(pS, "map")))) {
if (gameState.hasMap) {
showText("You peep the map.");
map_showMap();
addEvent("map_hideMap", 0);
} else {
showText("We are neither confirming nor denying the presence of a map in this game, but irridisregardless, you don't have one.");
}
return(true);
}
if (isAction(pS, "throw baby") || (isAction(pS, "throw the baby"))) {
if (gameState.hasBaby) {
showText("Hmm. Maybe try someplace else.");
} else {
showText("You don't even have two babies to rub together.");
}
return(true);
}
if (isAction(pS, "drop") && (isObj(pS, "baby"))) {
if (gameState.hasBaby) {
showText("Quit tryin to ditch the baby!");
} else {
showText("You don't even have two babies to rub together.");
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "trees"))) {
showText("You are an incredibly boring person.");
return(true);
}
if (isAction(pS, "climb") && (isObj(pS, "trees") || (isObj(pS, "tree")))) {
showText("But then your hands would get all sappy.");
return(true);
}
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && (isObj(pS, "belt"))) {
if (gameState.hasBelt) {
showText("You're already wearing it. Too bad you smell like the trash barge off Peasant Isle.");
return(true);
}
}
if (((isTake(pS, "pebbles") || (isTake(pS, "rocks"))) || (isTake(pS, "stones"))) && (gameState.pebblesTaken)) {
showText("Come now. We've been through this jaunty little bit before. You took them from the half lake screen with the cattail and stuff.");
return(true);
}
if (gameState.hasMask) {
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && (isObj(pS, "maskus") || (isObj(pS, "mask")))) {
showText("Not on this screen. You've got your image to think about. Actually, you might want to start deliberating on that right now.", false);
return(true);
}
}
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && ((isObj(pS, "clothes") || (isObj(pS, "robe"))) || (isObj(pS, "robes")))) {
if (gameState.hasRobes) {
if (gameState.dress) {
showText("You're already in the old skool robe. Represent.");
} else {
showText("You slip into the vintage robe. It smells like grampa's lap. Now you're lookin like a serious peasant.", false);
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gameState.dress = true;
player.state = 2;
pl.gotoAndStop("robes_d");
}
} else {
showText("You don't have anything but your 'Scalding Lake' t-shirt.", false);
showText("And pants. Forgot to mention the pants.", true);
}
return(true);
}
if ((isAction(pS, "look") && (isObj(pS, "mask"))) && (gameState.hasMask)) {
showText("It's a hideous monster maskus, for wearing on your face.");
return(true);
}
if (isObj(pS, "dan")) {
showText("Dan's still okay. Got a place on Dekalb with Rick and his wife. Slimmed up a bit and looking towards the future.");
return(true);
}
if (isObj(pS, "cheat") || (isAction(pS, "cheat"))) {
showText("Meh.");
return(true);
}
if (pS == "party") {
showText("You are part of the Whig party. They are making gangrene-awareness their number one campaign priority.");
return(true);
}
if ((pS == "inv") || (pS == "inventory")) {
gInventory = true;
gRunningEvent = true;
gotoAndPlay ("inventory");
return(true);
}
if ((pS == "sniff") || (pS == "smell")) {
showText("Smells like a computer game.");
}
if ((pS == "what the fuck") || (pS == "give me a break")) {
showText("Come now. Don't get discouraged.");
return(true);
}
if (((((pS.slice(0, 3) == "go ") || (pS == "north")) || (pS == "south")) || (pS == "west")) || (pS == "east")) {
showText("Use the arrow keys, pal. Just like a joypad only more like your day job.");
return(true);
}
if ((pS.slice(0, 4) == "get ") || (pS.slice(0, 5) == "take ")) {
showText("You probably WISH you could get that.");
return(true);
}
if (pS.slice(0, 4) == "ask ") {
showText("Ask about what?");
return(true);
}
if ((isAction(pS, "give") || (isAction(pS, "offer"))) || (isAction(pS, "hand over"))) {
showText("You don't need to give that now.");
return(true);
}
if ((isAction(pS, "use") || (isAction(pS, "employ"))) || (isAction(pS, "operate"))) {
showText("You don't need to use that now.");
return(true);
}
if (pS.slice(0, 5) == "talk ") {
showText("It's sad when you have to make up people to talk to.");
return(true);
}
if (pS.slice(0, 4) == "drink") {
showText("Right, right. Wait, what?");
return(true);
}
if (pS.slice(0, 5) == "where") {
showText("You're hanging out in " + getSceneName(gScene.x, gScene.y));
return(true);
}
if (pS.slice(0, 5) == "look ") {
var lookObj;
lookObj = pS.slice(5);
if (pS.slice(0, 7) == "look at") {
lookObj = pS.slice(7);
}
showText("You don't need to look at that.");
return(true);
}
if (isAction(pS, "help")) {
showText("Type LOOK to see your surroundings. Type INVENTORY or INV to see your stuff. Type WHERE to see the name of the place you're in. Type SAVE or LOAD to save or load your game.");
if (gameState.hasMap) {
showText("Type MAP to read and maybe print your map of Peasantry", false);
}
return(true);
}
if (pS.slice(0, 5) == "dance") {
showText("You'd rather just stand here and soak in the scene.");
return(true);
}
if (pS.slice(0, 3) == "die") {
showText("That wasn't very smart. You dead.");
gameOver();
return(true);
}
if (pS == "pwd") {
showText("~peasantsquest/" + getSceneName(gScene.x, gScene.y));
return(true);
}
if (pS.slice(0, 3) == "use") {
showText("No. No. No. No. No. Maybe. Wait, No.");
return(true);
}
showText("I don't understand. Type HELP for assistance.");
return(false);
}
function parseRoom1x1(pS) {
if (pS == "look") {
showText("Well, there's that big bale of hay over there.");
return(true);
}
if (((isAction(pS, "search") || (isAction(pS, "search"))) || (isAction(pS, "look in"))) && (isObj(pS, "hay") || (isObj(pS, "bale")))) {
showText("You search and search through the haystack. Nope. No needles.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "straw") || (isObj(pS, "hay"))) || (isObj(pS, "bale")))) {
showText("It reminds you of a warm, safe place where as a child you'd hide.");
return(true);
}
if ((isTake(pS, "hay") || (isTake(pS, "bale"))) || (isTake(pS, "straw"))) {
showText("Who do you think you are? Some kind of Thy Dungeonman? You don't need any hay.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "fence"))) {
showText("A standard peasant fence. Trogdor makes milk's meat outta these things.");
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "jump"))) && (isObj(pS, "fence"))) {
showText("No, you have business to attend to here in Peasantry.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree"))) {
showText("It's Arbor Day, Charlie Brown!");
return(true);
}
if (isAction(pS, "hug") && (isObj(pS, "tree"))) {
addEvent("hugTree", -1);
showText("To every thing, turn, turn, turn. There is a season, turn, turn, turn.");
return(true);
}
if ((pS == "hide") || (((((isAction(pS, "get in") || (isAction(pS, "hide"))) || (isAction(pS, "jump in"))) || (isAction(pS, "enter"))) || (isAction(pS, "hide in"))) && ((isObj(pS, "straw") || (isObj(pS, "hay"))) || (isObj(pS, "bale"))))) {
if (gameState.muddy) {
if (pl.collide.hitTest(scene_mc.hotSpot1)) {
showText("You've not known much better than a roll in the hay alone.", true);
addEvent("jumpInHay", 0);
showText("You leap in the hay like a two years old boy. Uh oh. The hay sticks to your muddy body. You're a walking hay bale! Just like that one guy from that one show!", true);
addEvent("applyHay", 1);
if (!gameState.hayPointsAwarded) {
gLastPointAmount = 3;
addEvent("scoreSomePoints", 1);
gameState.hayPointsAwarded = true;
}
} else {
showText("Who do you think you are, MJ? Try from a little closer.", true);
}
} else {
showText("Not right now, man. You're feeling fairly clean given you just bathed 3 fortnights ago.", true);
}
return(true);
}
}
function parseRoom5x4(pS) {
if (pS == "look") {
showText("There's a beautiful, magical waterfall cascading down the cliff side.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "water") || (isObj(pS, "waterfall")))) {
showText("Upon closer inspection, you discover it's not magical. That's just mist, not magic sparkles or anything.");
return(true);
}
if ((isAction(pS, "climb") || (isAction(pS, "scale"))) && ((isObj(pS, "mountain") || (isObj(pS, "cliff"))) || (isObj(pS, "rocks")))) {
showText("There aren't enough footholds and you don't have any carabeaners on you.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "tree") || (isObj(pS, "trees")))) {
showText("You see some trees in the distance. You hold your fingers up to one eye and pretend to squash it.");
return(true);
}
if ((((isAction(pS, "dive") || (isAction(pS, "swim"))) || (isAction(pS, "get in"))) || (isAction(pS, "jump"))) && (((isObj(pS, "rock") || (isObj(pS, "fall"))) || (isObj(pS, "stream"))) || (isObj(pS, "water")))) {
showText("That waterfall would probably churn you into one of those weight-gain protein smoothies.");
return(true);
}
if (pS == "swim") {
showText("That waterfall would probably churn you into one of those weight-gain protein smoothies.");
return(true);
}
}
function parseRoom0x5(pS) {
if (pS == "look") {
showText("This place could use some serious sprucing of the 'up' variety. There's a dresser over there and a broom kind of silhouetted all mysterious like.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "dresser") || (isObj(pS, "drawer")))) {
showText("This dresser needs a good wipe down with new Indenture(tm), the dust busting miracle spray. ");
if (gameState.drawerOpen) {
showText("There is a drawer open");
if (gameState.hasRobes) {
showText(", but it's empty.");
} else {
showText("and there are some brown lumpy clothes in it.");
}
} else {
showText("There is an especially enticing top drawer that is currently closed.");
}
return(true);
}
if (isAction(pS, "use") && (isObj(pS, "drawer") || (isObj(pS, "dresser")))) {
pS = (gameState.drawerOpen ? "close drawer" : "open drawer");
}
if ((isAction(pS, "open") || (isAction(pS, "use"))) && (isObj(pS, "drawer") || (isObj(pS, "dresser")))) {
addEvent("walkToDrawer", -1);
if (gameState.drawerReclosed) {
showText("You already closed it, which was nice, and so we gave you some points. Let sleeping drawers lie.");
return(true);
}
if (gameState.drawerOpen) {
showText("Yeah, totally! Except it's already open you moron.");
return(true);
}
if (!gameState.hasRobes) {
showText("There's a vintage peasant robe in there! Just like grampa used to wear.");
} else {
showText("There used to be a robe in there but now... well, let's just say there's not a robe in there.");
}
gameState.drawerOpen = true;
addEvent("changeDrawerState", -1);
return(true);
}
if (isTake(pS, "drawer") || (isTake(pS, "dresser"))) {
addEvent("walkToDrawer", -1);
showText("You get a hernia from lifting it. -2 Movement points, -10 Constitution. Don't do that again.");
return(true);
}
if ((((isTake(pS, "clothes") || (isTake(pS, "robes"))) || (isTake(pS, "robe"))) || (pS == "empty drawer")) || (ps == "empty dresser")) {
addEvent("walkToDrawer", -1);
if (!gameState.drawerOpen) {
showText("You reach into the closed drawer and nearly break your hand slamming it. Just like a bird on a pane of glass minus the blamelessness.");
return(true);
}
if (!gameState.hasRobes) {
showText("Yeah! Get that robe!");
gameState.hasRobes = true;
inventoryHistory.hasRobes = true;
addEvent("takeRobes", -1);
gLastPointAmount = 10;
addEvent("scoreSomePoints", 0);
} else {
showText("You still remember the time when you took them. Oh, the times have changed ... but the robes?");
}
return(true);
}
if (isAction(pS, "close") && (isObj(pS, "drawer") || (isObj(pS, "dresser")))) {
addEvent("walkToDrawer", -1);
if (!gameState.drawerOpen) {
showText("A riddle: What can be closed that is already closed? (hint: not this drawer)");
return(true);
}
if (!gameState.hasRobes) {
showText("Right, right. Wouldn't want to leave the robes out where any old guy trying to beat an adventure game could take them.");
} else {
showText("Aww, how thoughtful and boring of you. Break into this peasant's home, steal his clothes, but remember to tidy up after yourself. You're a real saint.");
gameState.drawerReclosed = true;
if (!gameState.pointAwardedForDrawer) {
gameState.pointAwardedForDrawer = true;
gLastPointAmount = 1;
addEvent("scoreSomePoints", 0);
}
}
gameState.drawerOpen = false;
addEvent("changeDrawerState", -1);
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "broom") || (isObj(pS, "foreground")))) {
showText("The broom is all black and artistic, implying perhaps that it is closer to the viewer's eye but unlit to avoid emphasis.");
return(true);
}
if (isTake(pS, "broom")) {
showText("No, no. The broom is in the foreground and you can't take things from the foreground. You don't see me all typing \"get browser window\", do you?");
return(true);
}
}
function parseRoom5x2(pS) {
if (pS == "look") {
showText("There's a giant Inn here. It takes up, like, the entire screen.");
return(true);
}
if (isAction(pS, "look") && ((isObj(pS, "inn") || (isObj(pS, "building"))) || (isObj(pS, "house")))) {
showText("Looks okay from out here. But do they have a free breakfast buffet?");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "sign") || (isObj(pS, "placard")))) {
showText("If you can't read that sign, you need to quit playing this game.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "window"))) {
showText("Check it out! There's an INN in there.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "door"))) {
if (!gameState.fishermanLeft) {
showText("Just a door. A door with a note on it.");
} else {
showText("Just a door.");
}
return(true);
}
if (((isAction(pS, "read") || (isAction(pS, "examine"))) || (isAction(pS, "look"))) && (isObj(pS, "note"))) {
if (gameState.fishermanLeft) {
showText("The note is gone.");
} else {
showText("It says, \"Gone Fishin\" just like that grog coozie your cousin got you.");
}
return(true);
}
if (isTake(pS, "note") || (isTake(pS, "paper"))) {
if (gameState.fishermanLeft) {
showText("The note is gone.");
} else {
showText("What is it with you and notes?! No!!");
}
return(true);
}
if ((pS == "open") || ((isAction(pS, "use") || (isAction(pS, "open"))) && (isObj(pS, "door") || (isObj(pS, "inn"))))) {
if (gameState.fishermanLeft) {
addEvent("walkToInnDoor", -1);
showText("You open the door and step inside the inn.");
addEvent("enterInn", 0);
} else {
showText("It's locked fast!");
}
return(true);
}
if ((pS == "knock") || (isAction(pS, "knock") && (isObj(pS, "door")))) {
if (gameState.fishermanLeft) {
showText("Just open it, man!");
} else {
showText("No answer.");
}
return(true);
}
}
function parseRoom5x1(pS) {
trace("testing" + isScene(5, 1));
if ((pS == "look") || (isAction(pS, "look") && (isObj(pS, "pass") || (isObj(pS, "mountain"))))) {
showText("You've reached the mountain pass that leads to Trogdor's lair. A royal knight blocks the entrance.");
return(true);
}
if (isAction(pS, "look") && (((isObj(pS, "knight") || (isObj(pS, "man"))) || (isObj(pS, "guy"))) || (isObj(pS, "dude")))) {
showText("He looks way cooler than you.");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "sign") || (isObj(pS, "post")))) {
showText("What that sign there? That sign says 'Trogdor.'");
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "trogdor"))) {
showText("I know it's labeled 'Trogdor,' but it's really just a sign, silly. I mean, attack it if you want...");
return(true);
}
if (isAttack(pS, "sign") || (isAttack(pS, "post"))) {
showText("I was being facetious, Mr. Smarty-short-pants. No sign attacking for you.");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && (isObj(pS, "jhonka"))) {
showText("\"Since the Kerrek showed up, we don't see the Jhonka so much anymore. He lives in that little cave over in west Peasantry.\"");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && (isObj(pS, "ned"))) {
showText("\"That weirdo used to live over in west Peasantry but now I guess he just prances around the forest in his birthday suit.\"");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && (isObj(pS, "trogdor"))) {
showText("\"If I had a gold coin for every whining peasant's cottage that freaking dragon burninated, I'd be rich as a jhonka.\"");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && (isObj(pS, "kerrek"))) {
showText("\"I call him Big Stinky. He's slow and stupid, but he'll pound you into milks meat without a second thought.\"");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && ((((isObj(pS, "dress") || (isObj(pS, "robes"))) || (isObj(pS, "clothing"))) || (isObj(pS, "clothes"))) || (isObj(pS, "robe")))) {
showText("\"Peasants wear those brown robes. You know, with the rope around the waist. Get yourself one of those.\"");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && (isObj(pS, "fire"))) {
showText("\"Well, whenever I see peasants, they seem to be on fire. So get yourself on fire. I hear horse grease gives a nice, controlled burn.\"");
return(true);
}
if ((((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) && ((isObj(pS, "smell") || (isObj(pS, "stink"))) || (isObj(pS, "smelling")))) {
showText("\"I never met a peasant that didn't stink. If you wanna smell bad, get the Kerrek involved. That thing reeks!\"");
return(true);
}
if (((isAskAbout(pS, "knight") || (isAskAbout(pS, "man"))) || (isAskAbout(pS, "guy"))) || (isAskAbout(pS, "dude"))) {
showText("\"I don't know anything about that, short pants.\"");
return(true);
}
if ((pS == "talk") || (((isTalk(pS, "knight") || (isTalk(pS, "man"))) || (isTalk(pS, "guy"))) || (isTalk(pS, "dude")))) {
if (gameState.talkedKnight && (((!gameState.stink) || (!gameState.dress)) || (!gameState.fire))) {
showQuestStatus(false);
stageCollides.obj[0].gotoAndPlay("block");
}
if ((!gameState.talkedKnight) && (((!gameState.stink) || (!gameState.dress)) || (!gameState.fire))) {
showText("You explain your situation to the knight. That Trogdor burninated your cottage and you've sworn revenge. You ask for passage up the mountain to settle your score. \n(Press RETURN to advance through conversations)");
showText("\"Hang on there, Trogdorkilla,\" says the knight.\"I can only allow actual peasants up the mountain pass to face Trogdor. And you CLEARLY are not one.\"", true);
showQuestStatus(true);
showText("\"Be sure to LOOK around lots. TALK to everyone you see and ASK ABOUT stuff. Type HELP if you get confused and INVENTORY to see your worldly stuff. Type SAVE or LOAD to save or load your game. Duh.\"", true);
gameState.talkedKnight = true;
stageCollides.obj[0].gotoAndPlay("block");
}
if ((gameState.stink && (gameState.dress)) && (gameState.fire)) {
showText("Lookin good, Mr. Peasant. Good luck with ol' Beefy Arm up there.");
if (!gameState.knightCleared) {
showText("This is it! You can finally get revenge on Trogdor! Nice work so far, stupid!", true);
gameState.knightCleared = true;
gLastPointAmount = 7;
addEvent("scoreSomePoints", 0);
addEvent("knightAllowPassage", 0);
}
}
return(true);
}
}
function showQuestStatus(newPage) {
if ((!gameState.stink) && (gameState.dress)) {
showText("\"My dear Adso, you are dressed well but you don't STINK and you're not ON FIRE. Let us instead exercise our brains and try to solve this tantalizing conundrum.\"", newPage);
return(undefined);
}
if (!gameState.stink) {
showText("\"Look, Dragonheart...\"", newPage);
showText("\"You don't STINK like a peasant.\"", true);
showText("\"You don't DRESS like a peasant.\"", true);
showText("\"And you're definitely not ON FIRE like a peasant.\"", true);
showText("\"Once you're those 3 things, come back and maybe we can talk.\"", true);
return(undefined);
}
if (gameState.stink && (!gameState.dress)) {
showText("\"Frankly, Matthew Broderick, you sure stink like a peasant. But you still don't DRESS like a peasant and you're not ON FIRE like a peasant.\"", newPage);
return(undefined);
}
if ((gameState.stink && (gameState.dress)) && (!gameState.fire)) {
showText("\"Almost there, Dirk the Daring. You stink like a peasant and you dress like one too. But you're clearly still not ON FIRE.\"", newPage);
return(undefined);
}
}
function parseAnyRoom(pS) {
trace("parseAnyRoom() called");
trace("is it quit?: " + pS);
if (pS == "quit") {
trace("Well fine Boring Sanders! Hope you saved your game cause it is OVER between us!!");
showText("Well fine Boring Sanders! Hope you saved your game cause it is OVER between us!!");
addEvent("leaveGame", 0);
return(true);
}
if (isAction(pS, "why")) {
showText("I wish I knew.");
return(true);
}
if (gameState.wearingHay) {
if (((((isAction(pS, "exit") || (isAction(pS, "leave"))) || (isAction(pS, "remove"))) || (isAction(pS, "shake off"))) || (isAction(pS, "escape"))) && ((isObj(pS, "straw") || (isObj(pS, "hay"))) || (isObj(pS, "bale")))) {
showText("This hay is stuck to you and you can't shake it. Like that kid Philo from art school.", false);
return(true);
}
}
if ((((((((((pS == "mendelev says haldo") || (pS == "haldo")) || (pS == "tell Dongolev haldo")) || (pS == "tell the archer haldo")) || (pS == "tell archer haldo")) || (isAction(pS, "say haldo"))) || (pS == "tell man haldo")) || (pS == "tell guy haldo")) || (pS == "tell the man haldo")) || (pS == "tell the guy haldo")) {
showText("That's totally not Dongolev.");
return(true);
}
if ((pS == "map") || (((isAction(pS, "look") || (isAction(pS, "show"))) || (isAction(pS, "show"))) && (isObj(pS, "map")))) {
if (gameState.hasMap) {
showText("You peep the map.");
map_showMap();
addEvent("map_hideMap", 0);
} else {
showText("We are neither confirming nor denying the presence of a map in this game, but irridisregardless, you don't have one.");
}
return(true);
}
if (isAction(pS, "throw baby") || (isAction(pS, "throw the baby"))) {
if (gameState.hasBaby) {
showText("Hmm. Maybe try someplace else.");
} else {
showText("You don't even have two babies to rub together.");
}
return(true);
}
if (isAction(pS, "drop") && (isObj(pS, "baby"))) {
if (gameState.hasBaby) {
showText("Quit tryin to ditch the baby!");
} else {
showText("You don't even have two babies to rub together.");
}
return(true);
}
if (isAction(pS, "look") && (isObj(pS, "trees"))) {
showText("You are an incredibly boring person.");
return(true);
}
if (isAction(pS, "climb") && (isObj(pS, "trees") || (isObj(pS, "tree")))) {
showText("But then your hands would get all sappy.");
return(true);
}
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && (isObj(pS, "belt"))) {
if (gameState.hasBelt) {
showText("You're already wearing it. Too bad you smell like the trash barge off Peasant Isle.");
return(true);
}
}
if (((isTake(pS, "pebbles") || (isTake(pS, "rocks"))) || (isTake(pS, "stones"))) && (gameState.pebblesTaken)) {
showText("Come now. We've been through this jaunty little bit before. You took them from the half lake screen with the cattail and stuff.");
return(true);
}
if (gameState.hasMask) {
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && (isObj(pS, "maskus") || (isObj(pS, "mask")))) {
showText("Not on this screen. You've got your image to think about. Actually, you might want to start deliberating on that right now.", false);
return(true);
}
}
if ((((isAction(pS, "use") || (isAction(pS, "show"))) || (isAction(pS, "wear"))) || (isAction(pS, "put on"))) && ((isObj(pS, "clothes") || (isObj(pS, "robe"))) || (isObj(pS, "robes")))) {
if (gameState.hasRobes) {
if (gameState.dress) {
showText("You're already in the old skool robe. Represent.");
} else {
showText("You slip into the vintage robe. It smells like grampa's lap. Now you're lookin like a serious peasant.", false);
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gameState.dress = true;
player.state = 2;
pl.gotoAndStop("robes_d");
}
} else {
showText("You don't have anything but your 'Scalding Lake' t-shirt.", false);
showText("And pants. Forgot to mention the pants.", true);
}
return(true);
}
if ((isAction(pS, "look") && (isObj(pS, "mask"))) && (gameState.hasMask)) {
showText("It's a hideous monster maskus, for wearing on your face.");
return(true);
}
if (isObj(pS, "dan")) {
showText("Dan's still okay. Got a place on Dekalb with Rick and his wife. Slimmed up a bit and looking towards the future.");
return(true);
}
if (isObj(pS, "cheat") || (isAction(pS, "cheat"))) {
showText("Meh.");
return(true);
}
if (pS == "party") {
showText("You are part of the Whig party. They are making gangrene-awareness their number one campaign priority.");
return(true);
}
if ((pS == "inv") || (pS == "inventory")) {
gInventory = true;
gRunningEvent = true;
gotoAndPlay ("inventory");
return(true);
}
if (pS == "boo") {
showText("Scared me.");
return(true);
}
if ((pS == "sniff") || (pS == "smell")) {
showText("Smells like a computer game.");
return(true);
}
if (((pS == "what the fuck") || (pS == "give me a break")) || (pS == "this sucks")) {
showText("Come now. Don't get discouraged.");
return(true);
}
if (((((pS.slice(0, 3) == "go ") || (pS == "north")) || (pS == "south")) || (pS == "west")) || (pS == "east")) {
showText("Use the arrow keys, pal. Just like a joypad only more like your day job.");
return(true);
}
if ((pS.slice(0, 4) == "get ") || (pS.slice(0, 5) == "take ")) {
showText("You probably WISH you could get that.");
return(true);
}
if (pS.slice(0, 4) == "ask ") {
showText("Ask about what?");
return(true);
}
if (isAction(pS, "drink")) {
showText("For simplicity's sake you are immune to hunger and thirst in this game. So you got that going for you.");
showText("Which is nice.", true);
return(true);
}
if ((isAction(pS, "give") || (isAction(pS, "offer"))) || (isAction(pS, "hand over"))) {
showText("You don't need to give that now.");
return(true);
}
if ((isAction(pS, "use") || (isAction(pS, "employ"))) || (isAction(pS, "operate"))) {
showText("You don't need to use that now.");
return(true);
}
if (pS.slice(0, 5) == "talk ") {
showText("It's sad when you have to make up people to talk to.");
return(true);
}
if (pS.slice(0, 4) == "drink") {
showText("Right, right. Wait, what?");
return(true);
}
if (pS.slice(0, 5) == "where") {
showText("You're hanging out in " + getSceneName(gScene.x, gScene.y));
return(true);
}
if (pS.slice(0, 5) == "look ") {
var lookObj;
lookObj = pS.slice(5);
if (pS.slice(0, 7) == "look at") {
lookObj = pS.slice(7);
}
showText("You don't need to look at that.");
return(true);
}
if (isAction(pS, "help")) {
showText("Type LOOK to see your surroundings. Type INVENTORY or INV to see your stuff. Type WHERE to see the name of the place you're in. Type SAVE or LOAD to save or load your game.");
if (gameState.hasMap) {
showText("Type MAP to read and maybe print your map of Peasantry", false);
}
return(true);
}
if (pS.slice(0, 5) == "dance") {
showText("You'd rather just stand here and soak in the scene.");
return(true);
}
if (pS.slice(0, 3) == "die") {
showText("That wasn't very smart. You dead.");
gameOver();
return(true);
}
if (pS == "pwd") {
showText("~peasantsquest/" + getSceneName(gScene.x, gScene.y));
return(true);
}
if (pS.slice(0, 3) == "use") {
showText("No. No. No. No. No. Maybe. Wait, No.");
return(true);
}
showText("I don't understand. Type HELP for assistances.");
return(false);
}
Key.removeListener(keyListener);
keyListener = new Object();
keyListener.onKeyDown = function () {
lastKeyPressed = String.fromCharCode(Key.getAscii());
a = Key.getCode();
if ((a == 13) && (!gInventory)) {
trace((pl._x + ",") + pl._y);
if (gAcceptInput) {
inputSubmitted();
} else if (!gRunningEvent) {
displayText();
}
return(true);
}
if ((a == 8) || (a == 46)) {
input_mc.input.text = input_mc.input.text.slice(0, input_mc.input.text.length - 1);
return(true);
}
b = lastKeyPressed.toLowerCase();
if (gSpecial && (gSpecialState == "quiz")) {
displayText();
input_mc.input.text = b;
inputSubmitted();
}
if (gAcceptInput && (!(((((((((((a == 37) || (a == 39)) || (a == 40)) || (a == 38)) || (a == 34)) || (a == 33)) || (a == 36)) || (a == 35)) || (b == "-")) || (b == "+")) || (b == "~")))) {
input_mc.input.text = input_mc.input.text + lastKeyPressed;
}
};
Key.addListener(keyListener);
gameSave_so = SharedObject.getLocal("peasantquest");
var player = new Object();
var pl;
var stageObjects = new Array();
var playerStates = new Array("nor", "mud", "robes", "fire", "hay", "pot", "shield", "helmet", "sword", "tiny");
var stageCollides = new Array();
var gScene = new Object();
var gAcceptInput;
var gShowString = new Array();
var gEventsList = new Array();
var gCurrentShowString;
var gRunningEvent;
var gameState = new Object();
var gSpecial;
var gSpecialState;
var gGameOver;
var gInventory;
var returnToGameX;
var returnToGameY;
gameState.score = 0;
var inventoryHistory = new Object();
var mapHistory = new Array();
gameInit();
var gQuizText;
var gQuizTextPrefix;
var gQuizAnswer;
var gQuizNum;
var gameSound = new Sound(level0);
gLastPointAmount = 1;
sceneNames = new Array();
createSceneName(0, 4, "Hidden glen");
createSceneName(1, 4, "Poor Gary's glen");
createSceneName(2, 4, "Kerrek tracks 1");
createSceneName(3, 4, "Old well");
createSceneName(4, 4, "Yellow tree");
createSceneName(1, 1, "That hay bale");
createSceneName(2, 1, "That mud puddle");
createSceneName(3, 1, "Archery range");
createSceneName(4, 1, "River and stone");
createSceneName(5, 1, "Mountain pass");
createSceneName(6, 1, "Cliff base");
createSceneName(1, 2, "Jhonka's cave");
createSceneName(2, 2, "Your burninated cottage");
createSceneName(3, 2, "Pebble lake west");
createSceneName(4, 2, "Pebble lake west");
createSceneName(5, 2, "Outside giant inn");
createSceneName(1, 3, "Outside mysterious cottage");
createSceneName(2, 3, "Wavy tree");
createSceneName(3, 3, "Kerrek tracks 2");
createSceneName(4, 3, "Outside baby lady cottage");
createSceneName(5, 3, "Burninated trees");
createSceneName(0, 3, "Baby lady cottage");
createSceneName(0, 2, "Inside giant inn");
createSceneName(0, 5, "Mysterious cottage");
createSceneName(7, 1, "Cliffland heights");
createSceneName(8, 1, "Trogdor's outer sanctum");
createSceneName(9, 1, "Trogdor's posh lair");
Inventory = new Object();
Inventory.propNames = new Array();
Inventory.readNames = new Array();
Inventory.detailText = new Array();
Inventory.synonyms = new Array();
addInventoryItem("hasArrow", "arrow", "Boy, you sure know how to pick em! This arrow's kinda pointy even!!", new Array("arrow", "arrows"));
addInventoryItem("hasBaby", "baby", "Awww! Peasant babies are adorable. No wonder they fetch such a pretty penny on the black market.", new Array("baby", "tot", "toddler", "child", "kid"));
addInventoryItem("hasBelt", "kerrek belt", "Phew! This thing stinks like all getout. Why couldn't the Kerrek have kidnapped a hot wench or something that you coulda saved?", new Array("belt", "buckle"));
addInventoryItem("hasFeed", "chicken feed", "Woah! Gold nuggets! Oh wait...This is just chicken feed. Crap.", new Array("feed", "food", "pellets", "grain"));
addInventoryItem("hasBow", "SuperTime FunBow TM", "This is a pretty fancy bow. You're surprised those shady archers give away such decent prizes. You half-expected gold fish in a bag.", new Array("bow"));
addInventoryItem("hasMask", "monster maskus", "Man, those pagans sure can make a freaky lookin mask when they want to. It's like those theatre masks' evil uncle or something.", new Array("mask", "maskus"));
addInventoryItem("hasPebbles", "pebbles", "Woah! Gray chicken feed! Oh wait... those are just pebbles. Heavier than they look, though.", new Array("pebbles", "rocks", "stones"));
addInventoryItem("hasPills", "pills", "The innkeeper's medication says it's supposed to treat \"general oldness. May cause checkers playing, hiked-up pants, and overall pee smell.\"", new Array("pills", "drugs"));
addInventoryItem("hasRiches", "riches", "Riches, dude. Riches. That peasant lady totally has to share some of this with you, right? At least that shiny, clawed sceptre thing.", new Array("riches", "gold", "money"));
addInventoryItem("hasRobes", "robe", "A propa peasant robe. It smells freshly washed and has the initials 'N.N.' sewn onto the tag.", new Array("robe", "robes", "clothes"));
addInventoryItem("hasSoda", "soda", "A full bottle of popular soda.", new Array("soda", "pop", "drink"));
addInventoryItem("hasMeatball", "meatball sub", "A piping hot meatball sub fresh from the bottom of a dingy old well. All you need is a bag of chips and you've got a combo meal!", new Array("meatball", "sub", "sandwich", "hero", "sammich"));
addInventoryItem("hasTrinket", "super trinket", "This super trinket is weird. It looks like it could either kill you or make you the hit of your Christmas party.", new Array("trinket"));
addInventoryItem("hasHelmet", "TrogHelmet", "The TrogHelmet is not screwing around. It's a serious helmet. It also protects against harmful UV rays.", new Array("helmet", "hat"));
addInventoryItem("hasShield", "TrogShield", "Behold the TrogShield! No seriously, behold it. There's no way Trogdor's fire breath can penetrate this thing.", new Array("shield"));
addInventoryItem("hasSword", "TrogSword", "The TrogSword is for real. Hands-down the coolest item in this whole game. You can't wait to lop off that beefy arm of Trogdor's with this guy.", new Array("sword", "blade"));
addInventoryItem("hasMap", "map", "What's brown and brown and read all over? This map!", new Array("map", "guide"));
addInventoryItem("hasShirt", "shirt", "This has got to be your favorite T-Shirt ever. Oh, the times you had at Scalding Lake. Canoeing, fishing, stoning heathens. What a Blast!", new Array("shirt", "tee"));
Inventory.noHas = "You no longer has this item.";
gameState.hasShirt = true;
Frame 996
main();
Frame 997
gotoAndPlay ("gameLoop");
Frame 1005
inventoryStart();
stop();
Frame 1010
updateScore();
Frame 1054
initFileMenu(true);
stop();
Frame 1055
initFileMenu(false);
stop();
Frame 1056
function ar_initArchery() {
shotNum = 0;
shotsPerGame = 5;
origIndicatorY = indicatorL._y;
arrowOriginalLoc.x = arrow_mc._x;
arrowOriginalLoc.y = arrow_mc._y;
arrowOriginalLoc.scale = arrow_mc._xscale;
bowOriginalLoc.x = bow_mc._x;
bowOriginalLoc.y = bow_mc._y;
arrow_mc._visible = false;
ar_initShot();
bullseyeCollide_mc._visible = false;
targetCollide_mc._visible = false;
var i = 1;
while (i <= 5) {
eval ("Success" + i)._visible = false;
i++;
}
hits = 0;
ar_gameOver = false;
}
function ar_updateShotsMeter() {
eval ("arrowsLeft" + (shotsPerGame - (shotNum - 1)))._visible = false;
}
function ar_initShot() {
trace(arrowOriginalLoc.x);
currentArrow_mc = arrowClip_mc.attachMovie("arrow_mc", "arrow_mc" + shotNum, shotNum);
trace(currentArrow_mc._x);
currentArrow_mc._x = arrowOriginalLoc.x;
currentArrow_mc._y = arrowOriginalLoc.y;
trace(currentArrow_mc._x);
currentArrow_mc._xscale = (currentArrow_mc._yscale = arrowOriginalLoc.scale);
shotNum++;
if (shotNum > shotsPerGame) {
ar_endGame();
delete this.onEnterFrame;
return(false);
}
aimAllowed = true;
shotAllowed = true;
ar_updateWind();
buttonPress = 0;
meterDir = -1;
arrowFlying = false;
indicatorL._y = (indicatorR._y = origIndicatorY);
bow_mc._x = bowOriginalLoc.x;
bow_mc._y = bowOriginalLoc.y;
this.onEnterFrame = ar_main;
}
function ar_main() {
if (aimAllowed) {
if (Key.isDown(37)) {
ar_shiftAim(-2);
}
if (Key.isDown(39)) {
ar_shiftAim(2);
}
}
if (buttonPress > 0) {
ar_updateMeter();
}
}
function ar_shiftAim(dir) {
currentArrow_mc._x = currentArrow_mc._x + dir;
bow_mc._x = bow_mc._x + dir;
if ((bow_mc._x < 80) || (bow_mc._x > 430)) {
currentArrow_mc._x = currentArrow_mc._x - dir;
bow_mc._x = bow_mc._x - dir;
}
}
function ar_updateWind() {
var oldWind = windDir;
while (windDir == oldWind) {
windDir = Math.floor(Math.random() * 5) + 1;
}
trace("ar_updateWind(): New wind direction chosen " + windDir);
trace("wind" + windDir);
flag_mc.gotoAndPlay("wind" + windDir);
}
function ar_spacePressed() {
if (!ar_gameOver) {
bow_mc.gotoAndStop("cocked");
if (buttonPress >= 2) {
this.onEnterFrame = ar_shootArrow;
}
buttonPress++;
}
}
function ar_updateMeter() {
if (buttonPress == 1) {
indicatorL._y = indicatorL._y + (10 * meterDir);
indicatorR._y = indicatorR._y + (10 * meterDir);
} else {
indicatorR._y = indicatorR._y + (12 * meterDir);
}
if (indicatorR._y < meter_mc._y) {
meterDir = 1;
indicatorR._y = meter_mc._y;
}
if (indicatorL._y < meter_mc._y) {
indicatorL._y = meter_mc._y;
}
if (indicatorR._y > (meter_mc._y + meter_mc._height)) {
buttonPress++;
indicatorL._y = (indicatorR._y = origIndicatorY);
this.onEnterFrame = ar_shootArrow;
}
}
function ar_shootArrow() {
if (!arrowFlying) {
arrowFlying = true;
bow_mc.gotoAndStop("idle");
currentArrow_mc.gotoAndPlay("shoot");
playSound("arrowshoot");
ar_updateShotsMeter();
horizOffset = (indicatorL._y - indicatorR._y) / 5;
if (horizOffset > 15) {
horizOffset = 15;
}
if (horizOffset < -15) {
horizOffset = -15;
}
hitmarkCenter = hitmark_mc._y + (hitmark_mc._height / 2);
vertOffset = (-((hitmarkCenter - indicatorL._y) + (hitmarkCenter - indicatorR._y))) / 3;
if (vertOffset > 15) {
vertOffset = 15;
}
if (vertOffset < -15) {
vertOffset = -15;
}
}
switch (windDir) {
case 1 :
currentArrow_mc._x = currentArrow_mc._x - 12;
break;
case 2 :
currentArrow_mc._x = currentArrow_mc._x - 6;
break;
case 3 :
break;
case 4 :
currentArrow_mc._x = currentArrow_mc._x + 6;
break;
case 5 :
currentArrow_mc._x = currentArrow_mc._x + 12;
}
currentArrow_mc._x = currentArrow_mc._x + horizOffset;
currentArrow_mc._y = currentArrow_mc._y + vertOffset;
}
function ar_doneShooting() {
delete this.onEnterFrame;
if (ar_hitMovieClip(bullseyeCollide_mc)) {
playSound("bullseye");
hits++;
eval ("Success" + hits)._visible = true;
} else {
playSound("mudsplat");
}
ar_initShot();
}
function ar_endGame() {
ar_gameOver = true;
if (hits < 3) {
showText("\"Sorry!\" says Dongolev.", true);
if (hits == 1) {
showText("\"Only 1 hit. ", false);
} else if (hits == 2) {
showText("\"Only 2 hits. ", false);
} else {
showText("\"Not a single hit. ", false);
}
showText("Your game face must be on back-order. Maybe come back when your shipment comes in.", false);
showText("\"But since you gave us this trinket, and you obviously don't have a prayer of winning, you can play again whenever you want.\"", true);
} else {
showText(("\"Nice shootin! " + hits) + " hits.\" Says Mendelev. \"Here's your prize!\" You got the SuperTime FunBow TM! We don't sell ammo, so you'll have to find your own arrows for it.", true);
gLastPointAmount = 3;
addEvent("scoreSomePoints", gCurrentShowString);
gameState.hasBow = true;
inventoryHistory.hasBow = true;
}
gotoAndPlay ("ar_gameOver");
trace("end game");
}
function ar_targetLevelReached() {
if (ar_hitMovieClip(targetCollide_mc)) {
currentArrow_mc.gotoAndPlay("hit");
} else {
currentArrow_mc.gotoAndPlay("miss");
}
}
function ar_hitMovieClip(the_mc) {
var arrowTip = new Object({x:currentArrow_mc.arrowCollide_mc._x, y:currentArrow_mc.arrowCollide_mc._y});
currentArrow_mc.localToGlobal(arrowTip);
return(the_mc.hitTest(arrowTip.x, arrowTip.y, true));
}
var windDir;
var aimAllowed;
var meterState;
var windStateCounter;
var buttonPress;
var shotNum;
var meterDir;
var arrowFlying;
var vertOffset;
var horizOffset;
var shotsPerGame;
var origIndicatorY;
var arrowOriginalLoc = new Object();
var bowOriginalLoc = new Object();
var currentArrow_mc;
var hits;
var ar_gameOver;
ar_initArchery();
stop();
Frame 1073
returnToGame();
Frame 1074
function InitClimberGame() {
climber.stop();
climberBusy = false;
climberDying = false;
climber.mX = 0;
climber.mY = 0;
clm_gravity = 7;
climber.collide._visible = false;
clm_screenNum = 0;
clm_boulderDepthCounter = 0;
clm_InitClimberScreen();
this.onEnterFrame = clm_main;
textShow_mc._visible = false;
updateScore();
}
function clm_main() {
clm_boulderCounter--;
if (clm_boulderCounter <= 0) {
clm_popBoulder();
clm_boulderCounter = Math.floor(Math.random() * 12) + 6;
}
clm_birdCounter--;
if (clm_birdCounter <= 0) {
clm_popBird();
clm_birdCounter = Math.floor(Math.random() * 60) + 24;
}
}
function clm_popBird() {
trace("bird_mc popped");
temp_mc = boulders_mc.attachMovie("bird_mc", "fallingRock" + clm_boulderDepthCounter, clm_boulderDepthCounter);
clm_boulderDepthCounter++;
if (clm_boulderDepthCounter > 60000) {
clm_boulderDepthCounter = 0;
}
temp_mc._x = this._width;
temp_mc._y = climber._y - 80;
temp_mc._xscale = 176;
temp_mc._yscale = 176;
temp_mc.collide._visible = false;
temp_mc.onEnterFrame = clm_animateBird;
}
function clm_popBoulder() {
if ((climber.mY - 2) > clm_topBound) {
var boulderType = (Math.floor(Math.random() * 3) + 1);
temp_mc = boulders_mc.attachMovie("fallingrock" + boulderType, "fallingRock" + clm_boulderDepthCounter, clm_boulderDepthCounter);
temp_mc.boulderType = boulderType;
clm_boulderDepthCounter++;
if (clm_boulderDepthCounter > 60000) {
clm_boulderDepthCounter = 0;
}
temp_mc._x = Math.random() * this._width;
temp_mc._xscale = 176;
temp_mc._yscale = 176;
temp_mc.collide._visible = false;
temp_mc.onEnterFrame = clm_animateBoulder;
}
}
function clm_animateBoulder() {
this._y = this._y + clm_gravity;
if (this._y > this._parent._parent._height) {
this.removeMovieClip();
}
if (this.hitTest(this._parent._parent.climber.collide) && (!climberDying)) {
trace("Hit by a rock!");
climberDying = true;
this._parent._parent.climber.onEnterFrame = clm_tumbleDown;
this._parent._parent.climber.gotoAndPlay("die");
}
if ((this._y > clm_groundLevelY) && (clm_screenNum <= 0)) {
temp_mc = boulders_mc.attachMovie("breakingrock" + this.boulderType, "breakingRock" + clm_boulderDepthCounter, clm_boulderDepthCounter);
clm_boulderDepthCounter++;
temp_mc._x = this._x;
temp_mc._y = this._y;
this.removeMovieClip();
}
}
function clm_animateBird() {
this._x = this._x - 8;
if (this._x < -20) {
this.removeMovieClip();
}
if (this.hitTest(this._parent._parent.climber.collide) && (!climberDying)) {
trace("Hit by a bird");
climberDying = true;
this._parent._parent.climber.onEnterFrame = clm_tumbleDown;
this._parent._parent.climber.gotoAndPlay("die");
}
}
function clm_InitClimberScreen() {
clm_boulderDepthCounter = 0;
clm_birdCounter = 36;
clm_updateBackground();
switch (clm_screenNum) {
case 0 :
clm_leftBound = -12;
clm_rightBound = 12;
clm_bottomBound = 0;
clm_topBound = -8;
invalidPoints = new Array({x:9, y:0}, {x:10, y:0}, {x:11, y:0}, {x:12, y:0}, {x:13, y:0}, {x:11, y:-1}, {x:12, y:-1}, {x:13, y:-1}, {x:11, y:-2}, {x:12, y:-2}, {x:5, y:-8}, {x:6, y:-8}, {x:-8, y:-8}, {x:-9, y:-8});
return;
case 1 :
clm_leftBound = -13;
clm_rightBound = 13;
clm_bottomBound = 2;
clm_topBound = -14;
invalidPoints = new Array({x:2, y:-14}, {x:2, y:-13}, {x:3, y:-13}, {x:2, y:-13});
return;
case 2 :
clm_leftBound = -13;
clm_rightBound = 13;
clm_bottomBound = 2;
clm_topBound = -14;
invalidPoints = new Array();
return;
}
}
function testIsValidPoint(x, y) {
var i = 0;
while (i < invalidPoints.length) {
if ((invalidPoints[i].x == x) && (invalidPoints[i].y == y)) {
return(false);
}
i++;
}
return(true);
}
function clm_updateBackground() {
clm_background.gotoAndPlay("screen" + clm_screenNum);
clm_trees.gotoAndPlay("screen" + clm_screenNum);
}
function clm_step(x_offset, y_offset) {
if ((!climberBusy) && (!climberDying)) {
if (((climber.mX + x_offset) < clm_leftBound) || ((climber.mX + x_offset) > clm_rightBound)) {
return(false);
}
if ((climber.mY + y_offset) < clm_topBound) {
clm_upScreen();
}
if ((climber.mY + y_offset) > clm_bottomBound) {
return(false);
}
if (!testIsValidPoint(climber.mX + x_offset, climber.mY + y_offset)) {
return(false);
}
climber.gotoAndPlay(clm_returnMoveDirName(x_offset, y_offset));
climberBusy = true;
climber.x_offset = x_offset;
climber.y_offset = y_offset;
climber.mX = climber.mX + x_offset;
climber.mY = climber.mY + y_offset;
trace((("clm_step(): moving to " + climber.mX) + ",") + climber.mY);
climber.onEnterFrame = clm_climberAnimate;
}
}
function clm_upScreen() {
clm_screenNum++;
if (clm_screenNum >= 3) {
gScene.x = 7;
gScene.y = 1;
returnToGame();
pl._x = 280;
pl._y = 281;
pl.gotoAndStop(playerStates[player.state] + "_u");
showText("Nice jorb climbing the cliff. You have a real way with those arrow keys.", false);
gLastPointAmount = 3;
addEvent("scoreSomePoints", 0);
gAcceptInput = false;
displayText();
delete climber.onEnterFrame;
delete this.onEnterFrame;
}
clm_updateBackground();
climber._y = 345;
clm_InitClimberScreen();
climber.mY = clm_bottomBound;
clm_clearRocks();
}
function clm_returnMoveDirName(x, y) {
if (x == 0) {
return("up");
}
return(((x < 0) ? "left" : "right"));
}
function clm_climberAnimate() {
this._x = this._x + (this.x_offset * 2.5);
this._y = this._y + (this.y_offset * 2.5);
}
function clm_doneClimbing() {
climberBusy = false;
if (!climberDying) {
climber.gotoAndStop(1);
delete climber.onEnterFrame;
}
}
function clm_clearRocks() {
for (var clips in boulders_mc) {
if (boulders_mc[clips]._name != undefined) {
boulders_mc[clips].removeMovieClip();
}
}
}
function clm_tumbleDown() {
this._y = this._y + clm_gravity;
if ((this._y > (clm_groundLevelY + 40)) && (clm_screenNum <= 0)) {
this.gotoAndPlay("dead");
}
if ((this._y > 400) && (clm_screenNum > 0)) {
clm_screenNum--;
clm_updateBackground();
this._y = this._y - 380;
for (var clips in boulders_mc) {
if (boulders_mc[clips]._name != undefined) {
boulders_mc[clips]._y = boulders_mc[clips]._y - 380;
}
}
}
}
function clm_doneDying() {
trace("clm_doneDying(): called");
textShow_mc._visible = true;
textShow_mc.textInstance.text = "Oops! You climbed real bad. You knew that you were AVOIDING the rocks right? Not collecting them. Anyways, nice try. You dead. Thanks for playing.";
resizeTextShow();
gAcceptInput = false;
gameOver();
}
function clm_enterPressed() {
if (gGameOver) {
gotoAndPlay (1010);
}
}
var climberBusy;
var clm_leftBound;
var clm_screenNum;
var clm_boulderCounter;
var clm_birdCounter;
var clm_boulderDepthCounter;
var clm_gravity;
var clm_groundLevelY = climber._y;
var invalidPoints;
InitClimberGame();
stop();
Frame 1075
updateScore();
Frame 1118
tellTarget ("fish_end") {
gotoAndPlay ("catchfish");
};
Frame 1558
stop();
Symbol 36 MovieClip [breakingrock3] Frame 5
this.removeMovieClip();
Symbol 39 MovieClip [breakingrock2] Frame 5
this.removeMovieClip();
Symbol 40 MovieClip [breakingrock1] Frame 5
this.removeMovieClip();
Symbol 60 MovieClip [arrow_mc] Frame 1
stop();
Symbol 60 MovieClip [arrow_mc] Frame 12
_parent._parent.ar_targetLevelReached();
Symbol 60 MovieClip [arrow_mc] Frame 13
_parent._parent.ar_doneShooting();
Symbol 60 MovieClip [arrow_mc] Frame 21
stop();
Symbol 60 MovieClip [arrow_mc] Frame 28
_parent._parent.ar_doneShooting();
Symbol 60 MovieClip [arrow_mc] Frame 34
stop();
Symbol 70 Button
on (release) {
gotoAndPlay (153);
}
Symbol 86 Button
on (release) {
gotoAndPlay (489);
}
Symbol 104 Button
on (release) {
gotoAndPlay (490);
}
Symbol 118 Button
on (release) {
gotoAndPlay (995);
}
Symbol 163 Button
on (keyPress "<Left>") {
trace((("gAcceptInput && !gSpecial" + gAcceptInput) + ",") + (!gSpecial));
if (gAcceptInput && (!gSpecial)) {
keyMove("l");
}
}
on (keyPress "<Right>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("r");
}
}
on (keyPress "<Up>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("u");
}
}
on (keyPress "+") {
setWalkSpeed(1);
trace("+ key pressed");
}
on (keyPress "-") {
setWalkSpeed(-1);
trace("- key pressed");
}
on (keyPress "<Down>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("d");
}
}
on (keyPress "<Home>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("lu");
}
}
on (keyPress "<End>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("ld");
}
}
on (keyPress "<PgUp>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("ru");
}
}
on (keyPress "<PgDn>") {
if (gAcceptInput && (!gSpecial)) {
keyMove("rd");
}
}
Symbol 425 MovieClip Frame 7
_parent._parent.smartLoop("nor_r", this);
Symbol 425 MovieClip Frame 14
_parent._parent.smartLoop("nor_d", this);
Symbol 425 MovieClip Frame 21
_parent._parent.smartLoop("nor_u", this);
Symbol 425 MovieClip Frame 28
_parent._parent.smartLoop("nor_l", this);
Symbol 425 MovieClip Frame 35
_parent._parent.smartLoop("mud_r", this);
Symbol 425 MovieClip Frame 42
_parent._parent.smartLoop("mud_d", this);
Symbol 425 MovieClip Frame 49
_parent._parent.smartLoop("mud_u", this);
Symbol 425 MovieClip Frame 56
_parent._parent.smartLoop("mud_l", this);
Symbol 425 MovieClip Frame 63
_parent._parent.smartLoop("robes_r", this);
Symbol 425 MovieClip Frame 70
_parent._parent.smartLoop("robes_d", this);
Symbol 425 MovieClip Frame 77
_parent._parent.smartLoop("robes_u", this);
Symbol 425 MovieClip Frame 84
_parent._parent.smartLoop("robes_l", this);
Symbol 425 MovieClip Frame 91
_parent._parent.smartLoop("pot_r", this);
Symbol 425 MovieClip Frame 98
_parent._parent.smartLoop("pot_d", this);
Symbol 425 MovieClip Frame 105
_parent._parent.smartLoop("pot_u", this);
Symbol 425 MovieClip Frame 112
_parent._parent.smartLoop("pot_l", this);
Symbol 425 MovieClip Frame 113
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 132
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 137
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 158
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 168
_parent._parent.smartLoop("fire_r", this);
Symbol 425 MovieClip Frame 175
_parent._parent.smartLoop("fire_d", this);
Symbol 425 MovieClip Frame 182
_parent._parent.smartLoop("fire_u", this);
Symbol 425 MovieClip Frame 189
_parent._parent.smartLoop("fire_l", this);
Symbol 425 MovieClip Frame 201
_parent._parent.smartLoop("hay_r", this);
Symbol 425 MovieClip Frame 208
_parent._parent.smartLoop("hay_d", this);
Symbol 425 MovieClip Frame 215
_parent._parent.smartLoop("hay_u", this);
Symbol 425 MovieClip Frame 222
_parent._parent.smartLoop("hay_l", this);
Symbol 425 MovieClip Frame 223
_parent._parent.finishedEvent();
Symbol 425 MovieClip Frame 225
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 234
this._y = this._y + 45;
_parent._parent.finishedEvent();
this.gotoAndStop("nor_d");
Symbol 425 MovieClip Frame 239
trace("Got to hay jump");
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 253
gotoAndStop ("hay_r");
this._x = 433;
this._y = 176;
_parent._parent.finishedEvent();
_parent._parent.stageCollides.obj[0]._visible = false;
_parent.blocks_mc.gotoAndStop("noHay");
Symbol 425 MovieClip Frame 255
trace((("hugTree: _parent._parent.playerStates[_parent._parent.player.state]" + _parent._parent.player.state) + ",") + _parent._parent.playerStates[_parent._parent.player.state]);
_parent._parent.resetSmartLoop(this);
_parent._parent.finishedEvent();
gotoAndStop((_parent._parent.playerStates[_parent._parent.player.state] + "_") + "u");
Symbol 425 MovieClip Frame 256
stop();
Symbol 425 MovieClip Frame 261
_parent._parent.resetSmartLoop(this);
_parent._parent.finishedEvent();
gotoAndStop((_parent._parent.playerStates[_parent._parent.player.state] + "_") + "l");
Symbol 425 MovieClip Frame 262
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 268
_parent._parent.resetSmartLoop(this);
_parent._parent.finishedEvent();
gotoAndStop((_parent._parent.playerStates[_parent._parent.player.state] + "_") + "r");
Symbol 425 MovieClip Frame 269
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 274
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 308
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 310
_parent._parent.resetSmartLoop(this);
stop();
Symbol 425 MovieClip Frame 321
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 343
_parent.fisherman.gotoAndPlay("catchFish");
gotoAndStop ("nor_l");
Symbol 425 MovieClip Frame 344
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 379
_parent.fisherman.gotoAndPlay("catchFish");
gotoAndStop ("mud_l");
Symbol 425 MovieClip Frame 380
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 418
_parent.fisherman.gotoAndPlay("catchFish");
gotoAndStop ("robes_l");
Symbol 425 MovieClip Frame 419
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 453
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 455
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 470
_parent._parent.kerreckGetArrowed();
Symbol 425 MovieClip Frame 471
stop();
Symbol 425 MovieClip Frame 472
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 484
_parent._parent.kerreckGetArrowed();
Symbol 425 MovieClip Frame 485
stop();
Symbol 425 MovieClip Frame 486
trace("takeBelt pl reached");
_parent._parent.resetSmartLoop(this);
_parent._parent.stageCollides.obj[1].kerrekBelt_mc._visible = false;
Symbol 425 MovieClip Frame 513
gotoAndStop ("nor_d");
_parent._parent.finishedEvent();
Symbol 425 MovieClip Frame 514
trace("takeBelt pl reached");
_parent._parent.resetSmartLoop(this);
_parent._parent.stageCollides.obj[1].kerrekBelt_mc._visible = false;
Symbol 425 MovieClip Frame 544
gotoAndStop ("robe_d");
_parent._parent.finishedEvent();
Symbol 425 MovieClip Frame 545
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 583
stop();
_parent._parent.finishedEvent();
Symbol 425 MovieClip Frame 584
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 641
gotoAndStop ("robes_l");
_parent._parent.finishedEvent();
Symbol 425 MovieClip Frame 642
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 672
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 673
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 706
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 713
_parent._parent.smartLoop("shield_r", this);
Symbol 425 MovieClip Frame 720
_parent._parent.smartLoop("shield_d", this);
Symbol 425 MovieClip Frame 727
_parent._parent.smartLoop("shield_u", this);
Symbol 425 MovieClip Frame 734
_parent._parent.smartLoop("shield_l", this);
Symbol 425 MovieClip Frame 741
_parent._parent.smartLoop("helmet_r", this);
Symbol 425 MovieClip Frame 748
_parent._parent.smartLoop("helmet_d", this);
Symbol 425 MovieClip Frame 755
_parent._parent.smartLoop("helmet_u", this);
Symbol 425 MovieClip Frame 762
_parent._parent.smartLoop("helmet_l", this);
Symbol 425 MovieClip Frame 769
_parent._parent.smartLoop("sword_r", this);
Symbol 425 MovieClip Frame 776
_parent._parent.smartLoop("sword_d", this);
Symbol 425 MovieClip Frame 783
_parent._parent.smartLoop("sword_u", this);
Symbol 425 MovieClip Frame 790
_parent._parent.smartLoop("sword_l", this);
Symbol 425 MovieClip Frame 791
_parent._parent.resetSmartLoop(this);
Symbol 425 MovieClip Frame 826
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 865
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 955
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 1004
_parent._parent.finishedEvent();
stop();
Symbol 425 MovieClip Frame 1009
_parent._parent.smartLoop("tiny_r", this);
Symbol 425 MovieClip Frame 1014
_parent._parent.smartLoop("tiny_l", this);
Symbol 425 MovieClip Frame 1019
_parent._parent.smartLoop("tiny_u", this);
Symbol 425 MovieClip Frame 1024
_parent._parent.smartLoop("tiny_d", this);
Symbol 425 MovieClip Frame 1025
_parent._parent.resetSmartLoop(this);
trace("burncrisp reached");
Symbol 425 MovieClip Frame 1056
_parent._parent.finishedEvent();
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 5
stop();
Symbol 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 5
stop();
Symbol 469 MovieClip Frame 1
stop();
Symbol 469 MovieClip Frame 4
stop();
Symbol 474 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 5
stop();
Symbol 478 MovieClip Frame 1
stop();
Symbol 478 MovieClip Frame 5
stop();
Symbol 489 MovieClip Frame 96
gotoAndPlay ("bored");
Symbol 489 MovieClip Frame 112
gotoAndPlay ("bored");
Symbol 489 MovieClip Frame 129
this._y = this._y + 20;
gotoAndPlay ("bored");
_parent._parent.finishedEvent();
Symbol 492 MovieClip Frame 1
stop();
Symbol 492 MovieClip Frame 5
stop();
Symbol 509 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 5
stop();
Symbol 522 MovieClip Frame 20
gotoAndPlay ("hop");
Symbol 522 MovieClip Frame 29
_parent._parent.pl._visible = false;
Symbol 522 MovieClip Frame 66
_parent._parent.finishedEvent();
stop();
Symbol 526 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 6
stop();
Symbol 526 MovieClip Frame 11
stop();
Symbol 553 MovieClip Frame 1
stop();
Symbol 553 MovieClip Frame 5
stop();
Symbol 566 MovieClip Frame 11
gotoAndPlay ("bored");
Symbol 566 MovieClip Frame 53
this._visible = false;
_parent._parent.finishedEvent();
Symbol 574 MovieClip Frame 1
stop();
Symbol 574 MovieClip Frame 6
stop();
Symbol 579 MovieClip Frame 1
stop();
Symbol 579 MovieClip Frame 6
stop();
Symbol 584 MovieClip Frame 1
stop();
Symbol 584 MovieClip Frame 6
stop();
Symbol 589 MovieClip Frame 1
stop();
Symbol 589 MovieClip Frame 6
stop();
Symbol 618 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 3
play();
Symbol 618 MovieClip Frame 4
trace("Got to naked ned cutaway");
Symbol 618 MovieClip Frame 103
_parent._parent.finishedEvent();
_parent._parent.stageCollides.obj[0].gotoAndStop("open");
this.removeMovieClip();
Symbol 631 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 13
stop();
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 6
stop();
Symbol 675 MovieClip Frame 45
_parent._parent.finishedEvent();
stop();
Symbol 675 MovieClip Frame 80
_parent._parent.finishedEvent();
stop();
Symbol 675 MovieClip Frame 111
_parent._parent.finishedEvent();
Symbol 675 MovieClip Frame 113
stop();
Symbol 675 MovieClip Frame 144
_parent._parent.finishedEvent();
Symbol 675 MovieClip Frame 146
stop();
Symbol 675 MovieClip Frame 155
stop();
Symbol 675 MovieClip Frame 162
stop();
Symbol 675 MovieClip Frame 169
stop();
Symbol 675 MovieClip Frame 176
stop();
Symbol 677 MovieClip Frame 1
stop();
Symbol 677 MovieClip Frame 35
_parent._parent.finishRain();
Symbol 683 MovieClip Frame 1
stop();
Symbol 683 MovieClip Frame 5
stop();
Symbol 686 MovieClip Frame 1
stop();
Symbol 686 MovieClip Frame 6
stop();
Symbol 689 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 6
stop();
Symbol 692 MovieClip Frame 1
stop();
Symbol 692 MovieClip Frame 6
stop();
Symbol 695 MovieClip Frame 1
stop();
Symbol 695 MovieClip Frame 6
stop();
Symbol 698 MovieClip Frame 1
stop();
Symbol 698 MovieClip Frame 6
stop();
Symbol 704 MovieClip Frame 1
stop();
Symbol 704 MovieClip Frame 6
stop();
Symbol 707 MovieClip Frame 1
stop();
Symbol 707 MovieClip Frame 6
stop();
Symbol 710 MovieClip Frame 1
stop();
Symbol 710 MovieClip Frame 6
stop();
Symbol 716 MovieClip Frame 1
stop();
Symbol 716 MovieClip Frame 4
play();
Symbol 716 MovieClip Frame 8
gotoAndPlay ("night");
Symbol 721 MovieClip Frame 1
stop();
Symbol 721 MovieClip Frame 4
stop();
Symbol 742 MovieClip Frame 100
gotoAndPlay ("rest");
Symbol 742 MovieClip Frame 110
trace("gary wants to know the pl name" + _parent.pl._name);
_root.pl.gotoAndPlay("getKicked");
Symbol 742 MovieClip Frame 133
gotoAndPlay ("rest");
Symbol 742 MovieClip Frame 168
_parent.background.gotoAndStop("fenceBroken");
_parent.blocks_mc.gotoAndStop("noFence");
trace("stageCollides[\"obj\"][2]._name = " + stageCollides.obj[2]._name);
_parent._parent.stageCollides.obj[2]._visible = true;
Symbol 742 MovieClip Frame 173
_parent._parent.finishedEvent();
stop();
Symbol 745 MovieClip Frame 1
stop();
Symbol 745 MovieClip Frame 7
stop();
Symbol 776 MovieClip Frame 1
stop();
Symbol 776 MovieClip Frame 4
_parent._parent._parent.finishedEvent();
stop();
Symbol 776 MovieClip Frame 20
_parent._parent._parent.finishedEvent();
stop();
Symbol 776 MovieClip Frame 23
stop();
Symbol 776 MovieClip Frame 44
_parent._parent._parent.finishedEvent();
stop();
Symbol 776 MovieClip Frame 55
_parent._parent._parent.finishedEvent();
stop();
Symbol 776 MovieClip Frame 73
_parent._parent._parent.finishedEvent();
stop();
Symbol 776 MovieClip Frame 91
_parent._parent._parent.finishedEvent();
stop();
Symbol 824 MovieClip Frame 1
archerWait = false;
Symbol 824 MovieClip Frame 41
if (!archerWait) {
gotoAndPlay (2);
} else {
stop();
}
Symbol 824 MovieClip Frame 86
_parent.blocks_mc.gotoAndStop("noArcher");
this._visible = false;
this.stop();
_parent._parent.finishedEvent();
Symbol 824 MovieClip Frame 102
_parent._parent.pl.gotoAndPlay("arrowed");
trace("telling pl to get arrowed" + _parent._parent.pl._name);
Symbol 824 MovieClip Frame 107
stop();
Symbol 827 MovieClip Frame 1
stop();
Symbol 827 MovieClip Frame 7
stop();
Symbol 843 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 13
stop();
Symbol 846 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 7
stop();
Symbol 867 MovieClip Frame 1
stop();
Symbol 867 MovieClip Frame 25
_parent._parent._parent.pl.gotoAndPlay("pot_r");
Symbol 867 MovieClip Frame 33
_parent._parent._parent.finishedEvent();
stop();
Symbol 868 MovieClip Frame 1
stop();
Symbol 868 MovieClip Frame 6
stop();
Symbol 878 MovieClip Frame 2
stop();
Symbol 878 MovieClip Frame 29
trace("nightCoverup_mc attempting to end event");
_parent._parent._parent.finishedEvent();
Symbol 878 MovieClip Frame 30
stop();
Symbol 885 MovieClip Frame 2
stop();
Symbol 885 MovieClip Frame 6
stop();
Symbol 907 MovieClip Frame 1
stop();
Symbol 907 MovieClip Frame 13
stop();
Symbol 918 MovieClip Frame 1
stop();
Symbol 918 MovieClip Frame 25
_parent._parent.finishedEvent();
stop();
Symbol 918 MovieClip Frame 45
stop();
Symbol 918 MovieClip Frame 55
stop();
Symbol 954 MovieClip Frame 35
stop();
Symbol 954 MovieClip Frame 205
stop();
_parent._parent.finishedEvent();
Symbol 954 MovieClip Frame 257
stop();
_parent._parent.finishedEvent();
Symbol 957 MovieClip Frame 1
stop();
Symbol 957 MovieClip Frame 6
_parent._parent.pl.gotoAndPlay("burncrisp");
Symbol 957 MovieClip Frame 10
stop();
Symbol 961 MovieClip Frame 2
stop();
Symbol 961 MovieClip Frame 10
stop();
Symbol 961 MovieClip Frame 18
stop();
Symbol 961 MovieClip Frame 27
stop();
Symbol 961 MovieClip Frame 36
stop();
Symbol 961 MovieClip Frame 44
stop();
Symbol 961 MovieClip Frame 55
stop();
Symbol 961 MovieClip Frame 63
stop();
Symbol 961 MovieClip Frame 71
stop();
Symbol 961 MovieClip Frame 79
stop();
Symbol 961 MovieClip Frame 87
stop();
Symbol 961 MovieClip Frame 95
stop();
Symbol 961 MovieClip Frame 103
stop();
Symbol 961 MovieClip Frame 111
stop();
Symbol 961 MovieClip Frame 119
stop();
Symbol 961 MovieClip Frame 127
stop();
Symbol 961 MovieClip Frame 135
stop();
Symbol 961 MovieClip Frame 143
stop();
Symbol 961 MovieClip Frame 151
stop();
Symbol 961 MovieClip Frame 159
stop();
Symbol 961 MovieClip Frame 167
stop();
Symbol 961 MovieClip Frame 175
stop();
Symbol 961 MovieClip Frame 183
stop();
Symbol 961 MovieClip Frame 191
stop();
Symbol 1020 Button
on (release) {
_parent._parent.printMapOut();
}
Symbol 1023 Button
on (keyPress "<Escape>") {
inv_ReturnKey();
}
on (keyPress "<Backspace>") {
inv_ReturnKey();
}
Symbol 1025 Button
on (keyPress "<Down>") {
_parent._parent.inv_key(0, 1);
}
on (keyPress "<Right>") {
_parent._parent.inv_key(1, 0);
}
on (keyPress "<Up>") {
_parent._parent.inv_key(0, -1);
}
on (keyPress "<Left>") {
_parent._parent.inv_key(-1, 0);
}
on (keyPress "<Space>") {
_parent._parent.newDetailPage();
}
on (keyPress "<Enter>") {
_parent._parent.newDetailPage();
}
Symbol 1066 MovieClip Frame 1
stop();
Symbol 1067 MovieClip Frame 1
_parent.newInventoryPage("hasArrow");
stop();
Symbol 1099 MovieClip Frame 1
stop();
Symbol 1100 Button
on (release) {
trace((("reset pressed" + this._name) + " and ") + this._parent._name);
gotoAndPlay (153);
}
Symbol 1111 Button
on (release) {
_parent._parent._parent.saveButtonPressed(_parent.myID);
}
Symbol 1114 Button
on (release) {
_parent._parent._parent.loadButtonPressed(_parent.myID);
}
Symbol 1121 Button
on (release) {
trace("this._name:" + this._parent._name);
_parent.returnToGame();
}
Symbol 1126 MovieClip Frame 1
stop();
Symbol 1126 MovieClip Frame 7
stop();
Symbol 1137 MovieClip Frame 2
gotoAndPlay("wind" + _parent.windDir);
Symbol 1137 MovieClip Frame 9
gotoAndPlay("wind" + _parent.windDir);
Symbol 1137 MovieClip Frame 15
gotoAndPlay("wind" + _parent.windDir);
Symbol 1137 MovieClip Frame 21
gotoAndPlay("wind" + _parent.windDir);
Symbol 1137 MovieClip Frame 27
gotoAndPlay("wind" + _parent.windDir);
Symbol 1140 Button
on (keyPress "`") {
trace((("bow_mc @ " + bow_mc._x) + ",") + bow_mc._y);
}
on (keyPress "<Space>") {
ar_spacePressed();
}
Symbol 1158 MovieClip Frame 1
stop();
Symbol 1158 MovieClip Frame 8
stop();
Symbol 1158 MovieClip Frame 15
stop();
Symbol 1181 MovieClip Frame 1
stop();
Symbol 1181 MovieClip Frame 2
Symbol 1181 MovieClip Frame 9
_parent.clm_doneClimbing();
Symbol 1181 MovieClip Frame 17
_parent.clm_doneClimbing();
Symbol 1181 MovieClip Frame 25
_parent.clm_doneClimbing();
Symbol 1181 MovieClip Frame 33
gotoAndPlay ("die");
Symbol 1181 MovieClip Frame 36
delete this.onEnterFrame;
Symbol 1181 MovieClip Frame 75
_parent.clm_doneDying();
stop();
Symbol 1183 Button
on (keyPress "<Left>") {
clm_step(-1, 0);
}
on (keyPress "<Right>") {
clm_step(1, 0);
}
on (keyPress "<Up>") {
clm_step(0, -1);
}
on (keyPress "<Down>") {
clm_step(0, 1);
}
on (keyPress "<Enter>") {
clm_enterPressed();
}