var talkToGirl = 0;
var talkToGirl2 = 0;
var talkToGirl3 = 0;
var talkToGirl4 = 0;
var talkToGirl5 = 0;
var talkToGirl6 = 0;

var phoneCord = 0;
var kickFerret = 0;
var fishyFishy = 0;
var pictureOfFlint = 0;
var entryForm = 0;
var sPaint = 0;
var locationArcade = 0;

var dollDescription = 0;

var samMoney = 0;

sub outoffice () {
        thisRoom = 1;
        spawnSub (scrollSam);
        setSceneDimensions (1869, 600);
	addOverlay ('outoffice/room.tga', 0, 0);
	setFloor ('outoffice/room.flo');
	setScale (0, 600);
        setZBuffer ('outoffice/room.zbu');
     if (phoneCord == 0) {
        addCharacter (cord, 608, 374, costume (anim ('iface/act1-1.duc', 29), NULL, NULL));
        setCharacterExtra (cord, FIXEDSIZE + NOZBUFFER);
     }
     if (sPaint == 0) {
        addCharacter (paint, 426, 432, costume (anim ('iface/act1-1.duc', 49), NULL, NULL));
     }
     if (locationArcade == 0) {
        addCharacter (keychain, 1430, 500, costume (anim ('iface/act1-1.duc', 74), NULL, NULL));
     }
        addScreenRegion (phonebox, 25, 309, 154, 511, 85, 505, NORTH);
        addScreenRegion (killgraffiti, 309, 324, 361, 359, 460, 442, WEST);
        addScreenRegion (backtoofficedoor, 166, 270, 267, 409, 291, 426, NORTH);
        addScreenRegion (garbage, 8, 544, 710, 599, 401, 514, SOUTH);
        addScreenRegion (bike, 524, 367, 576, 453, 475, 450, EAST);
        addScreenRegion (ferret, 1097, 336, 1248, 418, 1082, 421, EAST);
        addScreenRegion (manpasign, 875, 141, 1082, 242, 967, 236, NORTH);
        addScreenRegion (firehydrant, 994, 437, 1060, 500, 1036, 430, SOUTH);
        addScreenRegion (giantfish, 1255, 98, 1432, 336, 1082, 421, EAST);
        addScreenRegion (manholecover, 1368, 388, 1494, 444, 1082, 421, EAST);
        addScreenRegion (clownpicture, 428, 351, 466, 382, 454, 442, NORTH);
        addScreenRegion (streetcones, 1375, 441, 1575, 600, 1356, 540, NORTH);
        addScreenRegion (postbox, 599, 395, 675, 470, 552, 474, EAST);
        addScreenRegion (toMaNPas, 892, 229, 1083, 387, 969, 432, NORTH);
  if (littleGirl < 4) {
        addCharacter (littlegirl, 659, 478, costume (
                         anim ('outoffice/littlegirl.duc', wait (0, 20), wait (1, 5)),
                         NULL,
                         anim ('outoffice/littlegirl.duc', wait (2, 4), wait (3, 4), wait (4, 4), wait (0, 4), wait (3, 4), wait (2, 4), wait (4, 4))));
  }
  else {
       addCharacter (littlegirl, 659, 478, costume (
                  anim ('outoffice/littlegirl.duc', wait (11, 30), wait (12, 2)), NULL, anim ('outoffice/littlegirl.duc', wait (13, 2), wait (14, 2), wait (15, 2), wait (14, 2), wait (13, 2), wait (15, 2))));
  }

  if (lastRoom == officehallway) {
	addCharacter (sam, 256, 415, makeEgoAnim ());
        addCharacter (max, 246, 414, makeMaxAnim ());
        moveCharacter (sam, 324, 500);
  }
  if (lastRoom == manpa) {
        stopSound ('ma-n-pa/greasy.mp3');
        loopSound ('inoffice/lounging.mp3');
	addCharacter (sam, 961, 397, makeEgoAnim ());
        addCharacter (max, 956, 390, makeMaxAnim ());
        moveCharacter (sam, 961, 500);
  }
  if (lastRoom == map) {
        stopSound ('map/map.mp3');
        loopSound ('inoffice/lounging.mp3');
        addCharacter (sam, 1355, 549, makeEgoAnim ());
        addCharacter (max, 1402, 541, makeMaxAnim ());
  }
}

objectType littlegirl ("little girl") {
  speechColour 255, 200, 200;
  speechGap 25;
    event lookAt {
       moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
      if (littleGirl < 4) {
       Say (sam, "A little girl is standing there, looking miffed.");
      }
      else {
       Say (sam, "A sweet little girl reunited with her sweet little dolly.");
       Say (max, "I may vomit profusely.");
      }
    }
    event beerbottle {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       Say (sam, "Hey little girl...want a drink?");
       Say (littlegirl, "Forget it, morons!");
    }
    event invflintpic {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       if (littleGirl > 1) {
       if (littleGirl < 4) {
         Say (sam, "Have you seen this man?");
         Say (littlegirl, "Why should I tell you?");
       }
       else {
         Say (sam, "Have you seen this man?");
         Say (littlegirl, "Hmmm....");
         Say (littlegirl, "As a matter of fact...yes I have!");
         Say (littlegirl, "I saw him a few minutes ago.");
         Say (sam, "That's Flint Paper.");
         Say (littlegirl, "Oh...");
         pictureOfFlint = 1;
       }
    }
      else {
         Say (sam, "She wouldn't know what to do with that.");
      }
    }

    event invflintpichole {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       if (littleGirl > 1) {
       if (littleGirl < 4) {
         Say (sam, "Have you seen this man?");
         Say (littlegirl, "Why should I tell you?");
       }
       else {
         Say (sam, "Have you seen this man?");
         Say (littlegirl, "Hmmm....");
         Say (littlegirl, "As a matter of fact...yes I have!");
         Say (littlegirl, "I saw him a few minutes ago.");
         Say (sam, "That's Flint Paper.");
         Say (littlegirl, "Oh.");
         pictureOfFlint = 1;
       }
    } 
      else {
         Say (sam, "She wouldn't know what to do with that.");
      }
    }

    event samhead {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
        Say (sam, "Have you seen this man?");
        Say (littlegirl, "Idiot.");
        Say (sam, "Well I thought it was funny.");
    }
    event invrubberducky {
         moveCharacter (sam, 509, 471);
         turnCharacter (sam, EAST);
         Say (sam, "As much as I'd love to hit this girl with a laser beam and wipe her off the face of the planet...");
         Say (sam, "...we probably shouldn't.");
         Say (max, "That's why you should let ME have the duck!");
    }
    event pickUp {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       Say (sam, "She's not my type.");
       Say (max, "There's a bit of a species gap too.");
       Say (sam, "That doesn't mean I don't find women attractive.");
    }
    event use { #USE becomes BEAT UP
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       Say (max, "Come on, Sam!  Pleeease?");
       Say (sam, "Sorry, little buddy, but she doesn't quite deserve it. Not quite.");
    }
    event doll {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
      if (littleGirl == 0) {
       Say (sam, "Is this your doll?");
       Say (littlegirl, "NO!  Leave me alone, you jerks!");
       Say (max, "You little brat, I oughtta rip off one of your little ponytails!");
       Say (sam, "Now now, Max.  Remember, we're trying to be more kid-friendly!");
       Say (max, "In your dreams, Sam.");
      }
      else {
       Say (sam, "You wouldn't accept a replacement doll, would you?");
       Say (littlegirl, "No, I want MY doll, and I want it NOWWWWWWWWWW!!!!!!");
       Say (max, "Awfully adamant over a missing bag of stuffing.");
      }
    }
    event dollbh {
       moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       Say (sam, "Here's your stupid doll.");
             setCostume (littlegirl, costume (
                  anim ('outoffice/littlegirl.duc', wait (5, 3), wait (6, 10), wait (7, 3), wait (8, 3), wait (9, 2), wait (10, 4), wait (11, 4)), 
                  NULL, NULL));
             pause (29);
             setCostume (littlegirl, costume (
                  anim ('outoffice/littlegirl.duc', wait (11, 30), wait (12, 2)),
		  NULL, 
		  anim ('outoffice/littlegirl.duc', wait (13, 2), wait (14, 2), wait (15, 2), wait (14, 2), wait (13, 2), wait (15, 2))));
       Say (littlegirl, "Wowwies!");
       Say (littlegirl, "Thanks, Sam and Max!");
       pause (30);
       Say (littlegirl, "Hmm....what's that acrid smell?");
       Say (max, "Happiness.");
       littleGirl = 4;
       talkToGirl = 1;
       talkToGirl2 = 1;
       talkToGirl3 = 1;
       talkToGirl4 = 1;
       deleteFromStack (inventory, dollbh);
       return;
    }
    event talkTo {
         moveCharacter (sam, 509, 471);
       turnCharacter (sam, EAST);
       moveCharacter (max, 450, 500);
       turnCharacter (max, EAST);
     if (littleGirl == 0) {
       Say (sam, "Excuse me little girl...");
      if (firstTime == 1) {
       if (littleGirl >= 4) {
         Say (sam, "Happy with your doll?");
         Say (littlegirl, "Yeah.");
         Say (max, "We've made the world a happier and sicker place.");
         return;
       }
       else {
         Say (littlegirl, "Beat it losers!");
         return;
       }
      }
      else {
       Say (sam, "...but you wouldn't happen to have seen several gruff-looking men from Flint Paper's, have you?");
       Say (littlegirl, "First off, my name isnt 'little girl'...");
       Say (littlegirl, "It's Billie Jean.");
       Say (littlegirl, "Second off, I have no idea who 'Flint Paper' is, but if you can find my dolly...");
       Say (littlegirl, "...I might be inclined to cooperate with you guys."); 
       Say (max, "Gee Sam, seems like someone's just asking for the thrashing of a lifetime."); 
       Say (sam, "Max, this is a little girl, ya know.");
       Say (max, "I see that, but it's things like 'helping others so they can help you'...");
       Say (max, "...that seem to get us into some huge runaround mission.");
       Say (sam, "I've noticed...");
       Say (sam, "Okay Ms. Jean, we'll help find your dolly.");
       Say (littlegirl, "Well then, get to it, dorkfaces!");
       Say (max, "Why you dirty little....");
       Say (sam, "Max, act your age.");
       littleGirl = 1;
       return;
      }
     }
       loop {
         if (littleGirl == 1) {
       if (talkToGirl2 == 0) {
         addSpeechChoice ("You'd better'd help us out right now, little girl.", 6);
       }
       if (talkToGirl3 == 0) {
         addSpeechChoice ("What if we showed you a picture of Flint Paper?", 7);
       }
       if (talkToGirl4 == 0) {
         addSpeechChoice ("All right!  What's your stupid doll look like?", 1);
       }
         }
         if (littleGirl == 2) {
       if (talkToGirl6 == 0) {
         addSpeechChoice ("You wouldn't happen to accept a replacement doll?", 4);
       }
         }
         if (littleGirl == 3) {
         addSpeechChoice ("Here's your stupid doll.", 3);
         }
         if (littleGirl == 4) {
       if (talkToGirl5 == 0) {
         addSpeechChoice ("So, do you know anything about Flint Paper?", 8);
       }
          if (phonevalue == 3) {
            if (phoneCord == 0) {
            addSpeechChoice ("How would I fix a broken telephonic device?", 5);
         }}
         }
         addSpeechChoice ("See you later, Ms. Jean.", 0);
      var reply = getSpeechChoice (sam);
           if (reply == 0){
             Say (littlegirl, "Whatever.");
             return;
           }
           else if (reply == 1) {
             Say (littlegirl, "It's a doll with a cute face, blue shorts, and black hair. What's it supposed to look like?");
             dollDescription = 1;
             talkToGirl4 = 1;
           }
           else if (reply == 4) {
             Say (littlegirl, "No, I want MY doll, and I want it NOWWWWWWWWWW!!!!!!");
             Say (max, "This is why I never had children.");
             Say (sam, "Who told you that you could?");
             talkToGirl6 = 1;
           }
           else if (reply == 5) {
             Say (littlegirl, "I'd shove your big head into it.");
             Say (max, "Wow Sam, she sure showed you!");
	     Say (sam, "Yeah - I don't know if my ego will survive.");
           }
           else if (reply == 6) {
             Say (sam, "We're on the official police force of America, you know.");
             Say (max, "Plus we're bigger than you.");
             Say (sam, "And there's two of us and one of you.");
             Say (littlegirl, "Gee whiz, I guess you're right.  I guess I'll start cooperating with you now.");
             Say (sam, "Really?");           
             Say (littlegirl, "Of course not, dorks.  Get my doll and then we'll talk business.");
             Say (max, "Let's beat her up now, Sam.");
             talkToGirl2 = 1;
          }
          else if (reply == 7) {
             Say (sam, "Would you cooperate then?");
             Say (littlegirl, "Before or after you get my doll?");
             Say (max, "How about right now?");
             Say (littlegirl, "Get me my doll and quit stalling.");
             Say (sam, "I'm not so eager to go on such a trivial quest.");
             Say (max, "If we wanted to, we might as well go around saving kittens from trees and finding stolen bikes and wallets.");
             Say (sam, "That's what we do anyway, pinhead.");
             Say (max, "But only on the slow days.");
             talkToGirl3 = 1;
          }
         else if (reply == 3) { 
             setCostume (littlegirl, costume (
                  anim ('outoffice/littlegirl.duc', wait (5, 3), wait (6, 10), wait (7, 3), wait (8, 3), wait (9, 2), wait (10, 4), wait (11, 4)), NULL, NULL));
             pause (29);
             setCostume (littlegirl, costume (
                  anim ('outoffice/littlegirl.duc', wait (11, 30), wait (12, 2)), NULL, anim ('outoffice/littlegirl.duc', wait (13, 2), wait (14, 2), wait (15, 2), wait (14, 2), wait (13, 2), wait (15, 2))));
             Say (littlegirl, "Wowwies!");
             Say (littlegirl, "Thanks, Sam and Max!");
             pause (30);
             Say (littlegirl, "Hmm....what's that acrid smell?");
             Say (max, "Happiness.");
             deleteFromStack (inventory, dollbh);
             talkToGirl = 1;
             talkToGirl2 = 1;
             talkToGirl3 = 1;
             talkToGirl4 = 1;
             littleGirl = 4;
             return;
         }
        else if (reply == 8) {
           if (pictureOfFlint == 0) {
              Say (littlegirl, "You still need to show me a picture of him first.");
              Say (sam, "I thought you said you were willing to help.");
              Say (littlegirl, "I am, but I still don't know what this Flint looks like.");
              return;
           }
           else {
            Say (littlegirl, "I saw a bunch of thugs come out of that building over there carrying Flint tied up with ropes.");
            Say (littlegirl, "They laughed maniacally as they took him away.");
            Say (max, "Wow, did I miss the punchline or what?");
            Say (sam, "Well, it sounds like someone has some beef with Flint.");
            Say (max, "Is it rump roast?");
            Say (sam, "It may be mince meat if we don't get to the bottom of this mess soon!");
            Say (sam, "Anything else?");
            Say (littlegirl, "One of the thugs did drop his membership card.");
            Say (littlegirl, "Here.  Good luck.");
            setCostume (littlegirl, costume (
                   anim ('outoffice/littlegirl.duc', wait (16, 4), wait (17, 4), wait (18, 4), wait (19, 4), wait (20, 8)), NULL, NULL));
            pause (24);
             setCostume (littlegirl, costume (
                  anim ('outoffice/littlegirl.duc', wait (11, 30), wait (12, 2)), NULL, anim ('outoffice/littlegirl.duc', wait (13, 2), wait (14, 2), wait (15, 2), wait (14, 2), wait (13, 2), wait (15, 2))));
            thugCard = 1;
            phonevalue = 3;
            talkToGirl5 = 1;
            pushToStack (inventory, invThugCard);
            return;
          }
        }
    }
}
   event verbRename {
      rename (use, "Beat up ");
   }
}

var lookAtPhoneBox = 0;

objectType phonebox ("phone box") {
   event lookAt {
    if (lookAtPhoneBox == 0) {
      if (phoneCord < 3) {
        Say (sam, "It's a sadly vandalized phone, now missing it's cord...");
        Say (max, "What a terrible world we live in.");
        if (phonevalue == 3) {
          Say (sam, "It is, since this is our only phone now that our line was disconnected.");
        }
      }
      else {
        Say (sam, "It's a public phone, fixed with a bit of amateur electronics.");
      }
     lookAtPhoneBox = 1;
    }
    else {
      if (phoneCord < 3) Say (sam, "It's a broken phone box.");
      else Say (sam, "It's a public phone, fixed with a bit of amateur electronics.");
    }
   }
  event invcord {
      Say (sam, "In we go with the cord... perfect.");
      Say (max, "Now to prank call someone!");
      Say (sam, "Not now, Max. We have much better things to attend to.");
      Say (max, "Such as?");
      Say (sam, "Well, I can't think of anything...");
      Say (sam, "Where do we stand now?");
      Say (max, "In the street?");
      Say (sam, "It's just a figure of speech, Max.");
      Say (max, "The street?");
      Say (sam, "Forget it.");
      Say (sam, "Ah yes, fixing the phone box.");
      Say (sam, "Now all we need is a phone number to dial.");
      phoneCord = 3;
      deleteFromStack (inventory, invcord);
  }
  event use {
    if (phoneCord == 0) {
      Say (sam, "How am I supposed to use that? It's busted!");
    }
    else if (phoneCord == 1) {
      Say (sam, "In we go with the cord... perfect.");
      Say (max, "Now to prank call someone!");
      Say (sam, "Not now, Max. We have much better things to attend to.");
      Say (max, "Such as?");
      Say (sam, "Forget it...where were we now?");
      Say (sam, "Ah yes, fixing the phone box.");
      Say (sam, "Now all we need is a phone number to dial.");
      phoneCord = 3;
      deleteFromStack (inventory, invcord);
      return;
    }
    if (phoneCord == 3) {
      if (thugCard == 0) {
        Say (sam, "We don't have a number to dial.");
        Say (max, "How about 555-5555?");
        Say (sam, "Everyone seems to have that number, though.");
      }
      else if (thugCard == 1) {
        Say (sam, "I guess I'll try the number on the thug card.");
        Say (sam, "I hope this works.");
        turnCharacter (max, SOUTH);
        pause (40);
        Say (sam, "Oh yes!  Hello.");
        Say (sam, "My voice?  Oh yeah, I um, have a cold.");
        Say (sam, "No, I was transferred here today.  New orders.");
        Say (sam, "Yes...yes..okay with me.");
        Say (sam, "Yessir.  Okay sir.");
        Say (sam, "Viva le revolucion and so on.");
        turnCharacter (sam, EAST);
        turnCharacter (max, WEST);
        Say (max, "All done with your engaging conversation, Sam?");
        Say (max, "What did they say?");
        Say (sam, "Well, it was mostly static, but - ");
        Say (max, "You're a lousy electrician, that's why.");
        Say (sam, "Shut up and quit interrupting.");
        Say (sam, "I did make out something about the 'Who Doesn't Want to Be a Billionare?' gameshow in sunny Los Angeles, Texas.");
        if (mailboxCheck == 0) {
           Say (max, "Too bad we aren't contestants.  Sounds like fun.");
           Say (sam, "Yeah.  I'll remember the name anyway, for future reference.");
           thugCard = 2;
           return;
        }
        else if (mailboxCheck > 0) {
           Say (max, "Didn't we get an entry form for that same gameshow, Sam?");
           Say (sam, "We did, as a matter of fact!");
         if (entryForm == 0) {
           Say (sam, "We should fill out the entry form as soon as we can and get in!");
         }
         if (entryForm == 1) {
           Say (sam, "We should mail the entry form so we can get into the show properly.");
         }
         if (entryForm == 2) {
           Say (sam, "Good thing we mailed it.");
           Say (sam, "We'll be in the show in no time.");
         }
        }
           Say (max, "Let's go to the gameshow next, Sam!");
           Say (sam, "Okay.  Hop in the car.");
           Say (max, "Weeeeeeeee!  Another road trip!");
           Say (sam, "No more squealing as soon as we get inside the DeSoto.");
           Say (sam, "I don't want to have to replace the windshield again.");
           thugCard = 2;
      }
      else if (thugCard == 2) {
         Say (sam, "I have no need to call them again.");
         Say (sam, "I know where to go now.");
      }
    }
  }
   event verbRename {
      if (phoneCord == 1) rename (use, "Fix ");
      else rename (use, "Dial ");
   }
}

objectType killgraffiti ("'KILL'") {
  event lookAt {
    Say (sam, "Ooh! It's the artistic brilliance of the city's youth expressing themselves.");
  }
}

objectType backtoofficedoor ("door") {
  event lookAt {
    Say (sam, "It's the entrance back into our warm and loving offices.");
    Say (max, "Warm, loving, and fuzzy.");
  }
  event use {
    gotoRoom (officehallway);
  }
  event verbRename {
    rename (use, "Open ");
  }
}

objectType garbage ("garbage") {
  event lookAt {
   Say (sam, "It's trash.");
   Say (max, "Nutritious, and delicious!");
  }
  event pickUp {
   Say (sam, "Ew, no.");
   Say (max, "Come on! Please?");
   Say (sam, "I have the rest of my inventory to think about.");
  }
}

objectType bike ("bike") {
  event lookAt {
   if (phoneCord == 0) {
    Say (sam, "It's a bike, held up by a stolen electrical cable.");
   }
   if (phoneCord > 0) {
    Say (sam, "It's a bike, just sitting there, waiting to be stolen, now that the cord is completely gone.");
   }
  }
  event use { #USE becomes RIDE
    Say (sam, "No thanks...I prefer to drive my wonderful, polluting old car.");
    Say (max, "Sam is still recovering from that bike ride up an active volcano.");
  }
   event verbRename {
      rename (use, "Ride ");
   }
}

objectType ferret ("ferret") {
  event lookAt {
   Say (sam, "It's the mechanical, ride-on ferret.");
   }
  event pickUp { #PICK UP becomes STEAL
   Say (sam, "Although I can think of at least two dozen everyday uses for this thing, it's firmly welded to the ground.");
  }
  event use { #if kickFerret is 0, USE becomes RIDE
              #if kickFerret is 1, USE becomes KICK
  if (kickFerret == 0) {
   Say (sam, "Uh-oh. We don't have any money, Max.");
   moveCharacter (max, 1154, 429);
   turnCharacter (max, NORTH);
   Say (max, "And I spent all my money on that life-time supply of chocolate and tuna Wasabi and Cheese rolls!");
   think (max, "*kick*");
   Say (max, "Hey, that was really satisfying, in a strange, bone-shattering kind of way!");
   kickFerret = 1;
   return;
  }
  if (kickFerret == 1) {
   moveCharacter (max, 1154, 429);
   turnCharacter (max, NORTH);
   say (max, "*kick*");
   pushToStack (inventory, money);
   samMoney += 30;
   Say (max, "Hey look!  Free cash!  Violence and anger prevail!");
   Say (max, "I wanna ride the ferret!");
   Say (sam, "Sorry, little buddy, but after hearing about your last purchase, I've suddenly lost confidence in your ability to intelligently choose your monetary investments.");
   Say (max, "That's all right, Sam.  I've already consumed all of the wasabi rolls.");
   Say (sam, "Ugh...I'm glad I missed the results of that.");
   kickFerret = 2;
   return;
  }
  else {
   moveCharacter (max, 1154, 429);
   turnCharacter (max, NORTH);
   say (max, "*kick*");
   Say (sam, "Dang.  It must be empty.");
  }
  }
   event verbRename {
      rename (pickUp, "Steal ");
     if (kickFerret == 0) {
      rename (use, "Ride ");
     }
     else {
      rename (use, "Kick ");
     }
   }
}

var lookAtMaNPa = 0;

objectType manpasign ("Ma & Pa sign") {
event lookAt {
 if (lookAtMaNPa == 0) {
  Say (sam, "It's Ma and Pa's, our local stick-'em-up emporium and drugstore.");
  Say (max, "You can buy Fritos here that you can hammer nails with!");
  lookAtMaNPa = 1;
 }
 else {
  Say (sam, "It's Ma and Pa's.");
 }
}
}

var lookAtFireHydrant = 0;

objectType firehydrant ("the fire hydrant") {
 event lookAt {
  if (lookAtFireHydrant == 0) {
   Say (sam, "Max's bathroom.  It looks like it's been used recently, and not by the New Yawk Fire Department.");
   Say (sam, "Gross.");
   Say (max, "And all that coming from a dog.  Amazing.");
   Say (sam, "Touche.");
   lookAtFireHydrant = 1;
  }
  else {
   Say (sam, "Yeah, it's a bathroom.");
  }
}
}

objectType giantfish ("giant fish") {
  event lookAt {
   if (fishyFishy == 0) {
    Say (sam, "Holy flying cow-powered beanmobiles, Max! It's a giant fish! Run for your afterlife!");
    pause (30);
    Say (sam, "Oh wait. Cancel that. It's just an adorable lump of shaped plastic.");
    turnCharacter (max, SOUTH);
    Say (max, "I'm not with this guy.");
    Say (max, "The guy in the trench coat - I've never seen him before in my life!");
    fishyFishy = 1;
    return;
  }
   if (fishyFishy == 1) {
    turnCharacter (sam, SOUTH);
    Say (sam, "I'm not fallin' for that one again!");
  }
  }
}

objectType manholecover ("manhole") {
 event lookAt {
  Say (sam, "It's an open manhole.");
  Say (max, "Smells great, doesn't it?");
 }
 event use { #USE becomes DESCEND INTO
  Say (sam, "No, not with what I've seen Max stuff down the toilet.");
 }
   event verbRename {
      rename (use, "Enter ");
   }
}

objectType clownpicture ("clown picture") {
 event lookAt {
  Say (sam, "It's a disturbing clown thing.");
  Say (max, "I really like to see these guys suffer.");
  Say (sam, "I've noticed.");
 }
 event pickUp { #PICK UP becomes PEEL BACK
  Say (sam, "Maybe later.");
 }
   event verbRename {
      rename (pickUp, "Peel back ");
   }
}

objectType streetcones ("traffic cones") {
  event lookAt {
    Say (sam, "Strangely useless. You just run over them and people yell at you.");
    Say (sam, "Why not skip the middleman and just have people yell at you in the first place?"); 
  }
}

objectType postbox ("post box") {
 event lookAt {
   Say (sam, "Gotta love the post office.");
 }
 event use { #USE becomes MAIL
   Say (sam, "Tell me what you want to mail.");
   Say (max, "Who are you talking to, Sam?");
 }
 event envelopein {
   deleteFromStack (inventory, envelopein);
   Say (sam, "Now we're bona-fide contestants of the wonderfully rigged mass of nationally televised pain that is WDWTBB!");
   Say (max, "Huh?");
   Say (sam, "I'm using acronyms, Max. All the hip kids are doing it.");
   Say (max, "Sam, did you eat that slice of birthday cake from last November?");
   Say (sam, "Maybe...");
   if (thugCard > 1) {
    Say (sam, "...but I know how we can get to the gameshow!");
    Say (sam, "We can use the address the thug on the phone gave us!");
    Say (max, "Whatever.  Just get in the car, Sam!");
   }
   else {
     Say (sam, "I wish we knew where the show was, though...");
     Say (max, "We just entered a gameshow of which we don't know the location?!");
     Say (sam, "Yeah.  We'd better find out where it is to make up for our blatant act of stupidity.");
   }
 }
   event verbRename {
      rename (use, "Mail with ");
   }
}

objectType toMaNPas ("go into Ma & Pa's") {
    event oneCursor = arrowEast;
    event onlyAction {
        gotoRoom (manpa);
    }
}

objectType cord ("cord") {
   event lookAt {
      Say (sam, "It's some kind of electrical cable.");
      Say (sam, "Possibly a phone line.");
   }
   event pickUp {
      moveCharacter (sam, 506, 453);
      removeCharacter (cord);
      pushToStack (inventory, invcord);
      phoneCord = 1;
      Say (sam, "I'm sure I can find a use for this.");
      Say (sam, "If not, I can tie Max to the ceiling and use him as a pinata.");
   }
}

var lookAtPaint = 0;

objectType paint ("spray paint") {
   event lookAt {
    if (lookAtPaint == 0) {
      Say (sam, "It's the artist's paintbrush, so majestic in its tossed-away dignity.");
      Say (max, "Kids these days.  Leaving evidence of their illegal activities everywhere.");
      Say (sam, "Like you?");
      lookAtPaint = 1;
    }
    else {
      Say (sam, "Some spray paint.");
    }
   }
   event pickUp {
      moveCharacter (sam, 462, 432);
      removeCharacter (paint);
      pushToStack (inventory, spraypaint);
      Say (sam, "I doubt anyone will need this...");
      Say (max, "And if they do, fie on them!");
      Say (sam, "You and your archaic words, Max.");
      sPaint = 1;
   }
}

objectType keychain ("keychain") {
  event lookAt {
      Say (sam, "It's a brightly colored key-chain.");
  }
  event pickUp {
      moveCharacter (sam, 1427, 506);
      removeCharacter (keychain);
      pushToStack (inventory, invKeychain);
      Say (sam, "You can never have enough keys...");
      Say (sam, "Hey! It has the address for a video arcade.");
      Say (max, "Curse you, promotional material!");
      Say (max, "Now we won't be able to resist the sweet, sweet power of whatever junk you're shoving into our minds!");
      Say (sam, "Calm down, Max.");
      Say (max, "What's the address?");
      Say (sam, "Apparently, it's for Mel's Arcade Emporium located in Cowsville, Oklahoma.");
      locationArcade = 1;
  }
}