!\------------------------------------------------------------------------------------------------------------------
    SCAVENGER HUNT - Version 0.6
    Copyright (c) 2000-2002 by Gilles Duchesne

    Written using Hugo v3.0

    This document is part of my "Scavenger Hunt" tutorial. It should be distributed as a package,
    along the following:
    SCAVHUNT1.HTM - Core & rooms
    SCAVHUNT2.HTM - Scenery objects
    SCAVHUNT3.HTM - Inventory objects
    SCAVHUNT4.HTM - NPCs
    SCAVHUNT5.HTM - Time & score
    SCAVHUNT6.HTM - Misc info, credits & hints (THIS FILE)
    SCAVHUNT7.HTM - Sounds & pictures

    The package, as a whole, can be redistributed freely. However, I'd appreciate it if the issues &
    mistakes would be reported to me rather than directly edited. Please contact me at lonecleric@bigfoot.com.

    If you think parts of this code could be reused for your own purposes, feel free to do so.
------------------------------------------------------------------------------------------------------------------\!


!Originally (that is, before I seriously considered turning this project into a tutorial), this version was
!intended to be the last one. As such, it features all the "finishing touches" of a game: credits, comments, and
!hints. I guess it only makes sense to add these at the very end, since those are likely to change along the way.

#set DEBUG                              ! include HugoFix library and grammar
#set VERBSTUBS                          ! include verb stub routines
#set NO_AUX_MATH                        ! don't need advanced math routines

#switches -ls                           ! print statistics to SAMPLE.LST
#ifset DEBUG
#switches -d
#endif

!----------------------------------------------------------------------------
! NEW GRAMMAR:
verb "read", "peruse"
    *                                                       DoVague
    * readable                                              DoRead

verb "blow"
    *                                                       DoVague
    * object                                                DoBlow

verb "play"
    *                                                       DoVague
    * "with" living                                         DoPlayWith
    * object                                                DoPlay

! I pasted this one from verblib.g, then modified it to differenciate "on" and "in"
verb "put", "place"
    *                                                       DoVague
    * multiheld "on"/"onto" "ground"/"floor"                DoPutonGround
    * multiheld "outside" xobject                           DoPutonGround
    * "down" multiheld                                      DoDrop
    * multiheld "down"                                      DoDrop
    * multiheld "in"/"into"/"inside" container              DoPutIn
    * multiheld "on"/"onto" platform                        DoPutOn
    * multiheld                                             DoDrop

! Allowing 'give up' as an action
verb "give"
    * "up"                                                  DoGiveUp

! Adding 'ask for' as a valid action
verb "ask", "question", "consult"
    *                                                       DoAsk
    * living                                                DoAsk
    * living "about"/"for" anything                         DoAsk
    * "about"/"for" anything                                DoAskQuestion

! Support the 'buy' command
verb "buy", "purchase"
    *                                                       DoVague
    * anything                                              DoBuy

! Support the 'borrow' command
verb "borrow"
    *                                                       DoVague
    * object                                                DoBorrow

verb "check"
    *                                                       DoVague
    * "out" object                                          DoBorrow
    * object                                                DoLook

verb "bowl"
    *                                                       DoBowl

verb "count"
    *                                                       DoVague
    * anything                                              DoCount

verb "status"
    *                                                       DoScore

verb "about", "info"
    *                                                       DoAbout

verb "license", "copyright", "copyrights"
    *                                                       DoLicense

verb "credits"
    *                                                       DoCredits

!"help" is already mapped to the DoHelp routine, although it doesn't do much by default
verb "hint", "hints"
    *                                                       DoHelp

#include "verblib.g"                    ! normal verb grammar

!----------------------------------------------------------------------------

#include "hugolib.h"                    ! standard library routines

attribute beenthere

global g_lessercounter
!The author's notes are only available once you win the game
global gb_authorsnotes

routine init
{
    counter = 540                       ! 9:00 AM
    g_lessercounter = 0
    gb_authorsnotes = false

    STATUSTYPE = 2                      ! time
    TEXTCOLOR = DEF_FOREGROUND
    BGCOLOR = DEF_BACKGROUND
    SL_TEXTCOLOR = DEF_SL_FOREGROUND
    SL_BGCOLOR = DEF_SL_BACKGROUND
    color TEXTCOLOR, BGCOLOR

    INDENT_SIZE = 0                     ! no indents whatsoever (doesn't fit my writing style)
    prompt = ">"

    DEFAULT_FONT = PROP_ON
    Font(DEFAULT_FONT)

    display.title_caption = "Scavenger Hunt"
    cls
    "Here you are, visiting your best friend in his new house in Cheapsville. His nice, new, empty, tediously
    boring house in a charmingly boring suburban town.\nYour friend, who always liked games of all kind and
    doesn't say no to the occasional bet, has decided to set up a challenge for you...\n"
    "A scavenger hunt.\n"
    "Here's the idea: he gives you three hours to go around the neighborhood, trying to find all the
    miscellaneous things he's listed. You're supposed to bring all these items back to his house.\n"
    
    "\n\n"
    "\BScavenger Hunt\b"
    "A Small Visit in Cheapsville"
    "Version 0.6"
    print BANNER
    "First-time players are invited to type \"ABOUT\"."

    player = you
    location = friendshome
    old_location = location

    move player to location         ! initialize player location
    FindLight(location)             ! whether the player can see
    DescribePlace(location)         ! the appropriate description
    location is visited
    Activate( gamewon )             ! activates the endgame daemon
}

routine main
{
    !counter = counter + 1
    PrintStatusLine
    run location.each_turn
    runevents
    RunScripts
    if speaking not in location     ! in case the character being spoken
        speaking = 0                ! to leaves
}

player_character you "you"
{
    before
    {
        actor
        {
            select verbroutine
                case &DoAsk, &DoAskQuestion, &DoGive, &DoHit, &DoInventory, &DoListen, &DoLookAround, &DoMove
                    counter += 1    ! one minute
                case &DoPutIn, &DoShow, &DoTalk, &DoTell, &DoJump, &DoPush, &DoPull, &DoTouch
                    counter += 1    ! one minute
                case &DoWave, &DoWaveHands, &DoRead
                    counter += 1    ! one minute
                case &DoWait, &DoSearch
                    counter += 2    ! two minutes
                case &DoBrief, &DoQuit, &DoRestart, &DoRestore, &DoSave, &DoScore, &DoScriptOnOff, \
                     &DoSuperbrief, &DoVerbose, &DoGo
                {
                    ! nothing
                }
                case else
                {
                    !Here's where I make use of my new global - to count smaller time increments
                    g_lessercounter++ ! 1/5th of a minute (12 seconds for those counting)
                    if g_lessercounter = 5
                    {
                        g_lessercounter = 0
                        counter++
                    }
                }

            return false    ! keep going
        }
    }
    after
    {
        actor DoGo
        {
            select location
                case friendshome, backyard, citybank, publiclibrary, bowlingalley, storageroom, oakstreet
                {
                    if location is beenthere
                        counter += 1
                    else
                    {
                        counter += 4    ! +1 from DoLookAround, in all likelihood
                        location is beenthere
                    }
                }
                case park, intersection, schoolyard, outsidelibrary, outsidebowling
                {
                    if location is beenthere
                        counter += 3
                    else
                    {
                        counter += 6    ! +1 from DoLookAround, in all likelihood
                        location is beenthere
                    }
                }

            return false    ! keep going
        }
    }
}

!----------------------------------------------------------------------------
! ENDGAME DAEMON
! Checks if you've won the game, and if your time is up
!----------------------------------------------------------------------------
daemon gamewon 
{}

event in gamewon
{
    if location = friendshome
        if squash is special
            if FindObject( smalldictionary, location )
                if FindObject( sharpener, location )
                    if FindObject( pen, location )
                        if FindObject( floppydisk, location )
    {
        "\n\nWell, that's everything! Every item on the list, including the elusive racket, has been
        brought. Your friend reluctantly admits that you won the bet, and as it was agreed, promises to
        stop playing those crappy '3D action-adventure' games and to stick to IF for the whole summer."
        if Contains( you, paper )
            "Right now, however, most of your thoughts go to the little paper you're carrying on you... You
            know, the one bearing the phone number of a certain gorgeous librarian... All in all, the coming
            summer's looking great!"
        endflag = 1
    }

    if counter > 720    ! Past noon
    {
        print "\n\nRATS! It's already past noon. Time's up. All those efforts are now going to waste... You can't
        help but cringe thinking you'll have to be mowing your friend's lawn for the whole darn summer. Oh well,
        at least the neighborhood seems nice enough.";
        if npc_librarian is known
            " Especially that sweet librarian..."
        else
            ""
        !Since I modified the EndGame routine (as you'll see below), I took this opportunity to move the \"YOU
        !HAVE LOST YOUR BET\" message inside it.
        "\nNevertheless, you must sadly admit that..."
        endflag = 3
    }
}


!----------------------------------------------------------------------------
! CL_ROOM CLASS
! Used to add generic answers to "up" and "down"
!----------------------------------------------------------------------------
room cl_room
{
    u_to
    {
        "Well, there aren't any stairs, elevators, or ladders, around, nor any wings on your back. You won't
        be able to go up."
    }
    d_to
    {
        "You can't go much lower than this."
    }
}

!----------------------------------------------------------------------------
! GENERAL SCENERY
! Objects that are used as scenery in several rooms
!----------------------------------------------------------------------------

scenery streetlight "streetlight"
{
    found_in oakstreet, intersection, schoolyard, outsidelibrary, outsidebowling
    nouns "light", "lamp", "post", "streetlight"
    adjectives "street", "lamp"
    article "a"
    long_desc
    {
        "It's a typical urban street light. You might guess that it's in working order, but it's off now
        against the morning sky. A bunch of other lights, just like this one, run along the street."
    }
}

scenery friendshouse "your friend's house"
{
    found_in oakstreet, backyard
    nouns "house", "building", "home"
    adjectives "friend's", "friend"
    long_desc
    {
        "It's a nice house. Not impressive. Just nice. It's as nice as all the other houses around. Thankfully,
        you think to yourself, they don't all look identical, like in some of those newer suburbs."
    }
    door_to
    {
        select location
            case oakstreet
                return frontdoor.door_to
            case backyard
                return backyarddoor.door_to
    }
    parse_rank 1
}

scenery cl_car
{
    found_in oakstreet, intersection, schoolyard, outsidelibrary, outsidebowling
    article "the"
    before
    {
        object
        {
            "The cars are passing by too fast - just forget it."
        }
        xobject
        {
            "The cars are passing by too fast - just forget it."
        }
    }
}
    
cl_car car "car"
{
    nouns "car"
}

cl_car cars "cars"
{
    nouns "cars"
    is plural
}

scenery grass "grass"
{
    found_in backyard, park
    nouns "grass"
    article "the"
    long_desc
    {
        "The grass seems greener here than back home. But then again, doesn't it always?"
    }
}

scenery sky "sky"
{
    found_in backyard, park, oakstreet, intersection, schoolyard, outsidelibrary, outsidebowling
    nouns "sky"
    article "the"
    long_desc
    {
        "The sky is a plain, uniform grey."
    }
}

scenery houses "houses"
{
    found_in oakstreet, intersection, schoolyard, outsidelibrary, outsidebowling
    nouns "houses", "house"
    article "the"
    long_desc
    {
        "There are several houses in the area. They are all sort of bland and nice. They're each
        significantly different, which relieves the suburban boredom a great deal."
    }
    is plural
}

scenery street "street"
{
    found_in oakstreet, intersection, schoolyard, outsidelibrary, outsidebowling
    nouns "street", "road"
    adjectives "main", "oak"
    article "the"
    long_desc
    {
        "It's a long ribbon of asphalt - nothing out of the ordinary."
    }
}

!----------------------------------------------------------------------------
! FRIEND'S HOME
!----------------------------------------------------------------------------
cl_room friendshome "At your friend's house"
{
    long_desc
    {
        "Your good friend had just begun moving into this fine, empty house. The main center of attention is
        still the desk, which tells a lot about how much still has to be moved. That won't be until the
        afternoon, however. Because of that, a puerile game of scavenger hunt seems like a good idea.
        \nThe main door leads to the east, but there's also a back door to the north, leading to the neighbor's
        backyard.
        \nA work desk has been placed in one corner. The immediate area also has a closet."
    }
    n_to {return backyarddoor.door_to}
    e_to {return frontdoor.door_to}
    out_to {return frontdoor.door_to}
    cant_go
    {
        "Unless you smashed a hole in the wall (which wouldn't be very considerate) you can't go that way."
    }
}

scenery workdesk "work desk"
{
    in friendshome
    nouns "desk"
    adjectives "work"
    article "the"
    long_desc
    {
        "The desk is quite familiar - your friend has had it for ages. It looks great, sitting there with its
        single drawer, but you wouldn't want to watch it all day."
        Perform( &DoLookIn, self )
    }
    is openable, open, container, platform
    capacity 30        ! That's for the top of the table, not the inside
    holding 0
    before
    {
        object DoMove, DoPush
        {
            "The desk might be small, but it's heavy. Since you almost threw out your back putting it there in
            the first place, you're no inclined to shove it around any more. Besides, it looks great where it
            is, and your friend agrees."
        }
        object DoOpen, DoClose
        {
            return Perform( verbroutine, drawer )
        }
        object DoLookIn
        {
            if word[2] = "in", "inside"
                return Perform( &DoLookIn, drawer )
            else
                return false    ! Means "look on" - continue normally
        }
        xobject DoPutIn        !Overrides "put in", not "put on"
        {
            return Perform( &DoPutIn, object, drawer )
        }
    }
}

scenery drawer "desk drawer"
{
    in friendshome
    nouns "drawer"
    adjectives "desk"
    article "the"
    long_desc
    {
        "The drawer, like the desk which contains it, is rather small."
        Perform( &DoLookIn, self )
    }
    is openable, not open, container
    capacity 10
    holding 0
}

scenery closet "small closet"
{
    in friendshome
    nouns "closet"
    adjectives "small", "tiny"
    article "the"
    long_desc
    {
        "This tiny closet will look much better once it's repainted, you bet. For
        the moment, it's ";
        if self is open
        {
            "open."
            Perform( &DoLookIn, self )
        }
        else
            "closed."
    }
    is openable, not open, container
    capacity 100
    holding 0
}

scenery closetdoor "closet door"
{
    in friendshome
    nouns "door"
    adjectives "closet"
    article "the"
    long_desc
    {
        "The door to this tiny closet will look much better once it's repainted, you bet. For
        the moment, it's ";
        if closet is open
            "open."
        else
            "closed."
    }
    is openable
    before
    {
        object DoOpen, DoClose
        {
            return Perform( verbroutine, closet )
        }
    }
}

!----------------------------------------------------------------------------
! NEIGHBOR'S YARD
!----------------------------------------------------------------------------
cl_room backyard "Some neighbor's back yard"
{
    long_desc
    {
        "This back yard doesn't actually belong to your friend, even if there's a door leading to it. It's
        owned by some neighbor he hasn't even met yet. Both houses stand side by side, one to the north, the
        other to the south.
        \nYou notice a doghouse standing alongside one of the fences which surround most of the area."
    }
    s_to {return backyarddoor.door_to}
    in_to {return backyarddoor.door_to}
    se_to oakstreet
    n_to
    {
        "And just how do you plan to introduce yourself?
        \n\I\"Oh, hi there, I'm a friend of that new neighbor you haven't met, please don't mind me while I
        rummage through your belongings!\"\i
        \nUnlikely."
    }
    cant_go
    {
        "Several fences, which you hear make good neighbors, surround this area. The only passage through
        them is to the southeast."
    }
}

door backyarddoor "back yard door"
{
    between friendshome, backyard
    nouns "door"
    adjectives "back", "yard"
    article "the"
    is hidden
}

scenery cl_fence
{
    article "the"
    long_desc
    {
        "Several fences, which you hear make good neighbors, surround this area. The only passage through
        them is to the southeast."
    }
}

cl_fence fence "fence"
{
    in backyard
    nouns "fence"
}

cl_fence fences "fences"
{
    in backyard
    nouns "fences"
    is plural
}

scenery neighboryard "yard"
{
    in backyard
    nouns "yard"
    article "the"
    long_desc
    {
        "It's nice-looking, with neatly-trimmed grass everywhere."
    }
}

scenery doghouse "dog house"
{
    in backyard
    nouns "house", "doghouse"
    adjectives "dog", "red"
    article "the"
    long_desc
    {
        "The cute lil' dog house is painted bright red."
    }
    is container
    before
    {
        object DoEnter, DoLookIn
        {
            return DogDeath
        }
        xobject DoPutIn
        {
            return DogDeath
        }
    }
}

scenery neighborhouse "neighbor's house"
{
    in backyard
    nouns "house", "home", "building"
    adjectives "neighbor", "neighbor's"
    article "the"
    long_desc
    {
        "It's hard to judge the house from its back side, but it seems to be a well-maintained
        home, of roughly the same size and value as your friend's."
    }
    door_to { return backyard.n_to }
}

!----------------------------------------------------------------------------
! STREET, NEAR HOUSE
!----------------------------------------------------------------------------
cl_room oakstreet "Oak Street, near the house"
{
    long_desc
    {
        "You're now standing on the sidewalk of Oak Street. It's a quiet little street, much like every quiet
        little street you've seen in Cheapsville. Cars pass every few minutes, thrusting dust into the
        air. There's no one around; only a streetlight and a garbage bin are here to keep you company.
        \nThe street leads north toward a city park, and south to an intersection. You friend's new house
        stands to the west."
    }
    w_to {return frontdoor.door_to}
    in_to {return frontdoor.door_to}
    nw_to backyard
    n_to park
    s_to intersection
    cant_go
    {
        "You don't see anything worthwhile in that direction, and your time is precious."
    }
    before
    {
        location DoSmell
        {
            "The only thing which gets your nose's attention is the slight stench coming from the
            garbage bin."
        }
    }
}

door frontdoor "front door"
{
    between friendshome, oakstreet
    nouns "door"
    adjectives "front", "house", "main"
    article "the"
    is hidden
}

scenery dust "dust"
{
    in oakstreet
    nouns "dust"
    article "the"
    long_desc
    {
        "You're not likely to win that bet it you lose your precious time analyzing every individual spec
        of dust."
    }
}

scenery garbagebin "garbage bin"
{
    in oakstreet
    nouns "bin", "can"
    adjectives "garbage", "trash"
    article "the"
    long_desc
    {
        "This typical garbage bin has used for its intended purpose, judging by the smell. Although you expect
        to find a cheerful message along the lines of \"PLEASE KEEP OUR TOWN CLEAN\" or \"W.A.S.T.E.\", there's
        nothing like that written on it.
        \nYou notice some miscellaneous trash inside the bin."
    }
    is container
    type nothing
    capacity 30
    holding 0
    before
    {
        object DoSearch
        {
            Perform( &DoSearch, trash )
        }
    }
}

object trash "trash"
{
    in garbagebin
    nouns "trash", "garbage"
    article "some"
    long_desc
    {
        "A more-or-less homogenous heap of miscellaneous garbage. It \Icould\i hide something
        worthwhile, but you're not sure you if really want to go see for yourself."
    }
    before
    {
        object DoSearch
        {
            if parent( squash ) = nothing
            {
                "Setting aside your usually high standards of personal hygiene, you reach inside the
                trash. After a grotesque moment of rummaging, you pull out an old, dessicated squash. Your
                first reaction is to put it back in the bin. Once you do, however, the gears in your head start
                turning. A squash. Well, well..."
                move squash to garbagebin
            }
            else
                "You're pretty sure there isn't anything else of any worth in there."
        }
        object DoGet
        {
            "You are \Unot\u going to carry that trash around."
        }
    }
}

!----------------------------------------------------------------------------
! CITY PARK
!----------------------------------------------------------------------------
cl_room park "Cheapsville City Park"
{
    long_desc
    {
        "The soft grass of what seems to be the only city park in Cheapsville welcome you. It seems nice
        enough, with trees, benches, and the usual elements of a park. However, since the weather today
        isn't that great (the sky is completely grey), the only human being around seems to be that poor
        sap operating the hot dog stand.
        \nTo the south, Oak Street reminds you that suburban civilization is only a few steps away."
    }
    s_to oakstreet
    cant_go
    {
        "A stroll in the park could be nice, but you still intend to win that little bet."
    }
    before
    {
        location DoSmell
        {
            "Hmmm... Hot dogs..."
        }
    }
    after
    {
        location MovePlayer
        {
            hotdog is known
            return false
        }
    }
}

scenery cl_tree
{
    article "the"
    long_desc
    {
        "Trees of various kinds abound in this city park."
    }
}

cl_tree tree "tree"
{
    in park
    nouns "tree"
}

cl_tree trees "trees"
{
    in park
    nouns "trees"
    is plural
}

scenery cl_bench
{
    article "the"
    long_desc
    {
        "You can see benches distributed evenly among the park."
    }
    is enterable
}

cl_bench bench "bench"
{
    in park
    nouns "bench"
}

cl_bench benches "benches"
{
    in park
    nouns "benches"
    is plural
    before
    {
        object DoEnter
        {
            return Perform( &DoEnter, bench )
        }
    }
}

scenery stand "hot dog stand"
{
    in park
    nouns "stand"
    adjectives "hot", "dog", "hotdog"
    article "the"
    long_desc
    {
        "Neat! A hot dog stand! It's a little early to have lunch, but the strong
        smell of the freshly cooked dogs tickles your nose."
    }
}

!----------------------------------------------------------------------------
! INTERSECTION
!----------------------------------------------------------------------------
cl_room intersection "Intersection of Oak & Main"
{
    long_desc
    {
        "Oak Street ends here, reaching Cheapsville's Main Street. Even though it's Monday,
        the whole place remains pretty calm. You can see why your friend picked this town -
        you can't get any quieter without living on a farm.
        \nThe most interesting building in the area is the Cheapsville City Bank, which stands
        proudly on the opposite side of Oak.
        \nMain Street runs east-west. You can also go north, back on Oak Street."
    }
    n_to oakstreet
    s_to { return bankdoor.door_to }
    in_to { return bankdoor.door_to }
    w_to schoolyard
    e_to outsidelibrary
    cant_go
    {
        "There doesn't seem to be anything interesting in that direction."
    }
}

door bankdoor "bank door"
{
    between intersection, citybank
    nouns "door"
    adjectives "bank"
    article "the"
    is hidden
}

scenery bankbuilding "bank"
{
    in intersection
    nouns "bank", "building"
    adjective "city", "bank"
    article "the"
    long_desc
    {
        "A brick building, roughly cubic in shape, with the words \"CHEAPSVILLE CITY BANK\" proudly
        painted on it."
    }
    door_to { return bankdoor.door_to }
}

!----------------------------------------------------------------------------
! BANK
!----------------------------------------------------------------------------
cl_room citybank "Cheapsville City Bank"
{
    long_desc
    {
        "Whoa! It's been ages since you saw an actual city bank. And apparently, today isn't
        your lucky day to see one: at this hour, they're closed. The windows are, anyway. And by the time
        they open, your little wager will be long over.
        \nOn one side of the open area is an ATM. On the other is the receptionist's desk, complete with
        receptionist."
    }
    n_to { return bankdoor.door_to }
    out_to { return bankdoor.door_to }
    cant_go
    {
        "Most of the bank is closed at this hour, and therefore you can't go there."
    }
}

scenery cl_bankwindow
{
    adjectives "teller", "bank", "clerk"
    article "the"
    long_desc
    {
        "There are a few - it looks like three - windows down there, meant to accomodate curmudgeonly
        customers who won't use the ATM. Of course, they're all closed right now."
    }
}

cl_bankwindow bankwindow "window"
{
    in citybank
    nouns "window"
}

cl_bankwindow bankwindows "windows"
{
    in citybank
    nouns "windows"
    is plural
}

scenery atm "ATM"
{
    in citybank
    nouns "atm", "machine"
    adjectives "atm", "cash"
    article "the"
    long_desc
    {
        "It seems the city bank managed to buy an ATM from some bigger bank, and then reprogram it
        for their own use. It seems operational, but is of no use to you, since you're not a client."
    }
}

scenery bankdesk "receptionist's desk"
{
    in citybank
    nouns "desk"
    adjectives "receptionist", "receptionist's"
    article "the"
    long_desc
    {
        "The desk is quite large, and on the side you're facing, featureless. The receptionist
        sits behind it."
    }
}

!----------------------------------------------------------------------------
! SCHOOLYARD
!----------------------------------------------------------------------------
cl_room schoolyard "School yard"
{
    long_desc
    {
        "Oh look, an elementary school! Isn't that nice? It means your friend has picked quite a good
        location to raise a family.
        \nBunches of kids are playing and laughing all around the school yard. Either it's
        recess, or they're having some special \"go play outside\" morning.
        \nThe school stands to the south, while Main Street extends both eastward & westward."
    }
    e_to intersection
    w_to
    {
        "You take a quick peek in that direction. There doesn't seem to be a lot of buildings,
        for a while at least. It might be better to stick to this part of town instead."
    }
    s_to
    {
        "Going inside the school? Well, you're a little too old to pass as a kid, even if you are playing a
        childish game, and you don't really want to scare anyone."
    }
    in_to { return s_to }
    cant_go
    {
        "There doesn't seem to be anything interesting in that direction."
    }
}

scenery yardschool "yard"
{
    in schoolyard
    nouns "yard", "asphalt"
    article "the"
    long_desc
    {
        "A vast open space, covered with asphalt."
    }
}

scenery school "school"
{
    in schoolyard
    nouns "school", "building"
    article "the"
    long_desc
    {
        "This school is bigger than the houses in the immediate area, but fits nicely into the neighborhood. It
        may very well be the only elementary school in the whole town. Apparently, it's called the \"My Dear
        Watson Elementary\"."
    }
    door_to { return schoolyard.s_to }
}

!----------------------------------------------------------------------------
! STREET, OUTSIDE LIBRARY
!----------------------------------------------------------------------------
cl_room outsidelibrary "Main Street, Outside Public Library"
{
    long_desc
    {
        "Main Street extends east and west from here. Aside from a few houses, the only building
        in the area is the public library, which lies on the north side of the street."
    }
    w_to intersection
    e_to outsidebowling
    n_to { return librarydoor.door_to }
    in_to { return librarydoor.door_to }
    cant_go
    {
        "There doesn't seem to be anything interesting in that direction."
    }
}

door librarydoor "library door"
{
    between outsidelibrary, publiclibrary
    nouns "door"
    adjectives "library"
    article "the"
    is hidden
    door_to
    {
        if Contains( you, smalldictionary ) and not smalldictionary is special
            "The librarian turns toward you.
            \n\"I'm sorry, but you'll need to borrow that dictionary if you plan to leave with it.\"
            \nYou nonchalantly slip the dictionary behind your back.
            \n\"And don't even \Bthink\b about trying to smuggle it out,\" she adds in a helpful tone. \"Our
            alarm system works very well.\""
        else
            return door..door_to
    }
}

scenery library "public library"
{
    in outsidelibrary
    nouns "library", "building"
    adjectives "public", "library"
    article "the"
    long_desc
    {
        "It's a smallish, unassuming building. You almost missed it, since it didn't look all that different
        from the other houses."
    }
    door_to { return librarydoor.door_to }
}

!----------------------------------------------------------------------------
! PUBLIC LIBRARY
!----------------------------------------------------------------------------
cl_room publiclibrary "Public Library"
{
    long_desc
    {
        "This isn't the largest library you've seen, of course. But it seems well furnished enough:
        novels, kids' books, biographies, dictionaries, encyclopedias, and other sorts of library materials.
        \nThe door leading outside is to the south. Near it is the librarian, sitting at her desk."
    }
    s_to { return librarydoor.door_to }
    out_to { return librarydoor.door_to }
    cant_go
    {
        "There isn't a way out in that direction."
    }
    before
    {
        location DoSmell
        {
            "The sweet aroma of old paper fills the building."
        }
    }
    after
    {
        location MovePlayer
        {
            librarycard is known
            return false
        }
    }
}

scenery cl_book
{
    adjectives "kids", "kids'"
    article "the"
    long_desc
    {
        "Lots of books of all types, on many different subjects. You'd love to look around in search of some rare
        gem you haven't read, but this obviously isn't the right moment."
    }
    is readable, openable
    before
    {
        object DoGet
        {
            "You don't have a need for any of these right now."
        }
        object DoRead, DoOpen
        {
            "Why yes, of \Ucourse\u! Read a few books. Heck, why not read \Uall\u of them! After all,
            it's not like there was this bet we intended to win. We're not in a big hurry or anything,
            \Uright\u?"
        }
    }
}

cl_book book "book"
{
    in publiclibrary
    nouns "book", "novel", "biography"
}

cl_book books "books"
{
    in publiclibrary
    nouns "books", "novels", "biographies"
    is plural
}

scenery cl_dictionary 
{
    article "the"
    long_desc
    {
        "Several dictionaries of all kind."
    }
    is readable, openable
    before
    {
        object DoGet
        {
            if parent(smalldictionary) = nothing
            {
                "You begin to search for a small dictionary. Fortunately, and to your surprise, there are a
                few that can be borrowed from the library. That's great. Well, it is if you have a card... You
                pick up a smaller English dictionary that circulates.";
                if not Acquire(you, smalldictionary)
                {
                    " However, since you're carrying so much stuff already, you have no choice but to put it
                    back on the ground, at least for the time being."
                    move smalldictionary to publiclibrary
                }
                else
                    ""
            }
            else
                "You already picked one from the shelves. It should suffice."
        }
        object DoRead, DoOpen
        {
            "Why yes, of \Ucourse\u! Read a few books. Heck, why not read \Uall\u of them! After all,
            it's not like there was this bet we intended to win. We're not in a big hurry or anything,
            \Uright\u?"
        }
    }
}

cl_dictionary dictionary "dictionary"
{
    in publiclibrary
    nouns "dictionary"
    adjectives "other", "one"
}

cl_dictionary dictionaries "dictionaries"
{
    in publiclibrary
    nouns "dictionaries"
    adjectives "numerous"
    is plural
    before
    {
        object DoSearch
        {
            Perform( &DoGet, self )
        }
    }
}

scenery cl_encyclopedia
{
    article "the"
    long_desc
    {
        "Lots of reference books, on every subject you can think of."
    }
    is readable, openable
    before
    {
        object DoGet
        {
            "You don't have a need for any of these right now."
        }
        object DoRead, DoOpen
        {
            "Why yes, of \Ucourse\u! Read a few books. Heck, why not read \Uall\u of them! After all,
            it's not like there was this bet we intended to win. We're not in a big hurry or anything,
            \Uright\u?"
        }
    }
}

cl_encyclopedia encyclopedia "encyclopedia"
{
    in publiclibrary
    nouns "encyclopedia"
}

cl_encyclopedia encyclopedias "encyclopedias"
{
    in publiclibrary
    nouns "encyclopedias"
    is plural
}

scenery librariandesk "librarian's desk"
{
    in publiclibrary
    nouns "desk"
    adjectives "librarian", "librarian's", "library"
    article "the"
    long_desc
    {
        "An old wooden desk, worn by the years. It's currently occupied by the librarian herself."
    }
}

scenery librarianeyes "librarian's eyes"
{
    in publiclibrary
    nouns "eyes"
    adjectives "blue", "librarian", "librarian's"
    article "the"
    long_desc
    {
        "Deep blue eyes you'd gladly plunge into."
    }
}

!----------------------------------------------------------------------------
! STREET, OUTSIDE BOWLING ALLEY
!----------------------------------------------------------------------------
cl_room outsidebowling "Main Street, Outside Bowling Alley"
{
    long_desc
    {
        "Ah, finally! After all the niceness and cozyness of this little town, you've found a clear sign
        of modern corruption: the bowling alley. And it's already open, lucky you! The entrance
        stands to your south. You can also escape this place by following Main Street."
    }
    s_to { return bowlingdoor.door_to }
    in_to { return bowlingdoor.door_to }
    w_to outsidelibrary
    e_to
    {
        "You take a quick peek in that direction. There doesn't seem to be a lot of buildings,
        for a while at least. It might be better to stick to this part of town instead."
    }
    cant_go
    {
        "There doesn't seem to be anything interesting in that direction."
    }
}

door bowlingdoor "bowling alley door"
{
    between outsidebowling, bowlingalley
    nouns "door"
    adjectives "bowling", "alley"
    article "the"
    is hidden
}

scenery bowlingbuilding "bowling alley"
{
    in outsidebowling
    nouns "bowling", "alley", "building"
    adjectives "bowling"
    article "the"
    long_desc
    {
        "Although you're no fan of bowling alleys, at least you must commend this one for not using one
        of those tacky animated neon signs you hate so much. Then again, maybe they just lacked the
        budget."
    }
    door_to { return bowlingdoor.door_to }
}

!----------------------------------------------------------------------------
! BOWLING ALLEY
!----------------------------------------------------------------------------
cl_room bowlingalley "Bowling Alley"
{
    long_desc
    {
        "This place might be open, but it's fairly empty at this time of the day. A few enthusiastic
        bowlers are practicing for their next tournament, and that's about it.\n
        Your sharp eyes do notice something interesting, though: a door marked \"STORAGE - EMPLOYEES
        ONLY\"";
        if storagedoor is open
            ", slightly ajar."
        else
            "."
    }
    n_to { return bowlingdoor.door_to }
    out_to { return bowlingdoor.door_to }
    in_to { return storagedoor.door_to }
    cant_go
    {
        "There isn't a way out in that direction."
    }
}

door storagedoor "storage room door"
{
    between storageroom, bowlingalley
    nouns "door"
    adjectives "storage", "room", "employees"
    article "the"
    is hidden
    door_to
    {
        if not npc_stan is special
            "\"NOW JUST WAIT A FRIGGIN' MINUTE!!\" bellows Stan. \"Where do you think you're going, punk!? This
            is a private area. Keep out!\""
        else
            return door..door_to
    }
}

scenery bowlingstuff "bowling equipment"
{
    in bowlingalley
    nouns "equipment", "lanes", "lane", "pins", "pin"
    adjective "bowling"
    article "the"
    long_desc
    {
        "Typical bowling equipment. Nothing worth spending your time on."
    }
    before
    {
        xobject DoThrowAt
        {
            if object = bowlingball
                return Bowling
        }
    }
}

!----------------------------------------------------------------------------
! STORAGE ROOM
!----------------------------------------------------------------------------
cl_room storageroom "Storage Room"
{
    long_desc
    {
        "This storage room would be spacy, if it wasn't completely filled with boxes and boxes
        of now-useless stuff. Only a few narrows paths allow you to walk across the room.\n
        Something in the corner of the room catches your eye almost immediately: an old IBM XT,
        sitting in all its glory on a dusty table."
    }
    out_to { return storagedoor.door_to }
    cant_go
    {
        "The room isn't \Uthat\u big. If you want to exit, just say so."
    }
}

scenery cl_box
{
    article "the"
    long_desc
    {
        "Those boxes might be filled with interesting stuff, but 1) they're tightly packed, and
        2) they're not yours."
    }
    is openable, not open
    before
    {
        object DoOpen
        {
            "Those boxes might be filled with interesting stuff, but 1) they're tightly packed, and
            2) they're not yours."
        }
    }
}

cl_box box "box"
{
    in storageroom
    nouns "box", "stuff"
}

cl_box boxes "boxes"
{
    in storageroom
    nouns "boxes"
    is plural
}

scenery computertable "table"
{
    in storageroom
    nouns "table"
    adjectives "computer", "old", "dusty"
    article "the"
    long_desc
    {
        "It's an old dusty table whose sole purpose is now to support a (possibly older) computer."
    }
}

scenery computer "IBM XT"
{
    in storageroom
    nouns "computer", "ibm", "xt", "beast"
    adjectives "ibm", "xt", "old"
    article "the"
    long_desc
    {
        "It's been quite a while since you saw once. Well, since the last flea market you've been
        to. A true antique.\n
        Your keen eye is drawn to the 5 1/4\" floppy drive right in the middle of the beast."
    }
    is container, switchable, openable, open
    before
    {
        object DoGet, DoMove
        {
            "No way! Those old computers were \Umassive\u!"
        }
        object DoSwitchOn
        {
            "Sorry pal, it looks toast."
        }
        object DoOpen, DoClose, DoLookIn
        {
            return Perform( verbroutine, floppydrive )
        }
        object DoPutIn
        {
            return Perform( &DoPutIn, object, floppydrive )
        }
    }
}

scenery floppydrive "floppy drive"
{
    in computer
    nouns "drive", "lid"
    adjectives "disk", "floppy", "drive"
    article "the"
    long_desc
    {
        "This storage unit - the only one this computer has, actually - is in front of the computer, the lid ";
        if self is open
            "open."
        else
            "closed."
    }
    is openable, not open, container
    before
    {
        object DoPutIn
        {
            "There's no need to put anything in that drive."
        }
    }
}

!----------------------------------------------------------------------------
! INVENTORY OBJECTS
!----------------------------------------------------------------------------

object money "money"
{
    in you
    nouns "money", "cash", "coins", "bills"
    article "some"
    long_desc
    {
        "You're carrying a few coins and some bills. Not much, but probably enough to
        buy a few trinkets."
    }
    is known
    before
    {
        object DoDrop, DoGive, DoPutIn
        {
            "You'd rather keep your money on yourself."
        }
        object DoCount
        {
            "You've got more than enough for the day."
        }
    }
}

object huntlist "object list"
{
    in you
    nouns "list", "note", "paper"
    adjectives "object", "item"
    article "an"
    long_desc
    {
        "It's a small paper listing all the objects you have to find to win the bet. Your
        friend and yourself made it by picking random pages in one book he had.
        \nHere's what's written on it:"
        Perform( &DoRead, huntlist )
    }
    short_desc
    {
        "You see a small paper with a list of objects on them."
    }
    is readable, known
    size 1
    before
    {
        object DoRead
        {
            Font( ITALIC_ON )
            "\n\UItems to find:\u\n\n* A calculator\n* A pencil sharpener\n* A dictionary
            \n* A 5 1/4\" floppy disk\n* A squash racket\n\nEvery item must be brought back to the house."
            Font( ITALIC_OFF )
        }
    }
}

object bowlingball "bowling ball"
{
    in closet
    nouns "ball"
    adjectives "bowling", "black"
    article "a"
    long_desc
    {
        "A big, black, heavy bowling ball. Your friend lent it to your a couple times
        in the past. The holes don't exactly line up with your fingers, but you can still
        get a decent grip."
    }
    short_desc
    {
        "A bowling ball sits over here."
    }
    size 30
    before
    {
        object DoPush, DoMove
        {
            "You know, this is \Unot\u how you bowl. (Just making sure.)"
        }
        object DoBorrow
        {
            if location = friendshome
            {
                "You ask your friend if you can take the ball. \"Yeah, sure, no problem.\""
                Perform( &DoGet, self )
                counter++    ! one minute
            }
            else
                return false
        }
    }
}

object airhorn "air horn"
{
    in drawer
    nouns "horn", "can"
    adjectives "air"
    article "an"
    long_desc
    {
        "Aah, the infamous air horn. You just love when your friend brings it to the game. It
        really annoys some of your fellow fans, but what the heck.\n
        This can is about half-full. You could still a few good blows out of it."
    }
    short_desc
    {
        "There is a air horn lying on the ground."
    }
    size 10
    before
    {
        object DoBlow, DoPlay
        {
            if ( location = friendshome ) and ( parent( self ) = squash )
            {
                if squash is special
                    "No need to go through that again."
                else
                {
                    squash is special
                    "Without warning, you press the horn trigger. A resounding blast goes
                    through the house and beyond it. After a few painful seconds, you stop.\n
                    \"And just what the heck do you think...\", starts your friend.\n
                    At the same moment, you both hear a faint voice, probably coming from
                    a neighbor, screaming \"STOP THAT RACKET!\".\n
                    You smile.\n
                    \"No, wait\", your friend starts. \"You're not serious...\"\n
                    \"Well, technically, it was indeed a racket, coming from a squash, and I
                    \"brought\" it inside the house...\"\n
                    \"Dude, this isn't \"Nord & Bert\" or something. This is ridiculous!\"\n
                    You two argue for a little while, but in the end, you win. You brought a
                    squash racket in the house, and so be it."
                    counter += 5 ! five minutes arguing
                }
            }
            else
            {
                select location
                    case park
                        "Yes, blowing the horn around here wouldn't probably disturb anyone... Which is
                        precisely why you don't see the purpose in doing so."
                    case bowlingalley, storageroom, publiclibrary
                        "Given your current location, you'd rather keep quiet."
                    case else
                        "You don't think it'd be reasonable to disturb all the neighborhood right now."
            }
        }
        object DoBorrow
        {
            if location = friendshome
            {
                "You ask your friend if you can take the horn. \"Yeah, sure, no problem.\""
                Perform( &DoGet, self )
                counter++    ! one minute
            }
            else
                return false
        }
    }
}

object squash "dessicated squash"
{
    nouns "squash"
    adjectives "old", "dessicated"
    article "a"
    long_desc
    {
        "Bleh. This squash has spent a good deal of time in the garbage. It's part rotten,
        part dessicated. A piece of it was bitten off, exposing the inside.\n
        Under normal circumstances, you'd \Unever\u carry something like around. But right now..."
    }
    short_desc
    {
        "A dessicated old squash sits lumply on the ground."
    }
    is container
    capacity 10
    holding 0
    size 15
    before
    {
        object DoSmell
        {
            "You catch the beginning of a whiff, and quickly change your mind."
        }
        object DoEat
        {
            "You're not hungry not to eat it at this moment. In fact, come to think of it, you
            doubt you'll ever be hungry enough to eat \Uthis\u!"
        }
    }
}

object hotdog "hot dog"
{
    nouns "hotdog", "hot-dog", "dog", "dressing", "dressings"
    adjectives "hot"
    article "a"
    long_desc
    {
        "A reasonably large hot dog, the kind you find in ball parks. Warm, well-cooked, with
        your favorite dressings. Yummy!"
    }
    short_desc
    {
        "One hot dog was carefully placed on the ground here."
    }
    size 10
    before
    {
        object DoBuy
        {
            if location = park
            {
                if hotdog in nothing
                {
                    npc_hotdogvendor is special
                    "You hand the vendor some of your money, and he hands you a delicious smelling
                    hot dog.";
                    if not Acquire( you, self )
                        " Since your hands are full, however, you almost drop it. You end up putting it
                        carefully on the ground."
                    else
                        ""
                    counter += 2    ! two minutes
                }
                else
                    "Now come on! There's \Uno\u way you're gonna need 2 hot dogs this morning."
            }
            else
                "And just where do you plan to buy that?"
        }
        object DoSmell
        {
            "Smell delicious!"
        }
        object DoEat
        {
            "This is a very tempting idea. However, the scavenger hunt should be your only
            concern for the moment. You guess that it'll still taste good went the hunt is
            over. Besides, it might always come in handy..."
        }
    }
}

object pen "pen"
{
    nouns "pen", "calculator"
    adjectives "calculator"
    article "a"
    long_desc
    {
        "This shiny pen bears, on one tip, a teenie-weenie built-in calculator. It doesn't work,
        of course. Most of these pen were piece of crap, as you well remember. But it's a
        calculator nevertheless, clearly valid as one of the items you seek."
    }
    short_desc
    {
        "There's a pen on the ground."
    }
    is known
    size 5
}

object sharpener "pencil sharpener"
{
    nouns "sharpener"
    adjectives "pencil"
    article "a"
    long_desc
    {
        "A small pencil shapener. Insert pencil, turn pencil, repeat if necessary. Made of light
        plastic, it probably came as a freebie with a pencil case."
    }
    short_desc
    {
        "Your keen eyes notice a small pencil sharpener."
    }
    is known
    size 3
}

object librarycard "library card"
{
    nouns "card"
    adjectives "library"
    article "a"
    long_desc
    {
        "A small plastic card, bearing only the Cheapsville city logo and a bar code. \IA bar code?\i
        How modern!"
    }
    short_desc
    {
        "You notice a library card over here."
    }
    is readable
    size 5
    before
    {
        object DoRead
        {
            "Cheapsville's Public Library - Membership Card"
        }
    }        
}

object paper "librarian note"
{
    nouns "paper", "note"
    adjectives "small", "librarian"
    article "the"
    long_desc
    {
        "The small paper bears the librarian's name and phone number. Hubba Hubba!"
    }
    is readable
    before
    {
        object DoRead
        {
            Perform( &DoLook, self )
        }
    }
}

object smalldictionary "small English dictionary"
{
    nouns "dictionary"
    adjectives "small", "english"
    article "a"
    long_desc
    {
        "A small but slightly heavy English dictionary. Based on the what you read inside the
        back cover, this one can be borrowed from the library."
    }
    short_desc
    {
        "You can see a small English dictionary here."
    }
    is known, readable, openable
    size 30
    parse_rank 1 ! To outrank the dictionary scenery
    before
    {
        object DoRead, DoOpen
        {
            "By the time you go through the whole dictionary, the bet will obviously be lost. Of course, by
            then you'll have tons of lovely new words to express your disappointment..."
        }
        object DoBorrow
        {
            if self is special
                "You already borrowed that dictionary. Once is enough."
            elseif not Contains( you, self )
                "You should probably pick it up first."
            elseif Contains( you, librarycard )
            {
                "\"You'd like to borrow that dictionary, right?\"
                \nShe takes it from you, scan, demagnetize it with some device you're not really
                familiar with, and then hands it back to you.
                \n\"There you go, sir!\""
                self is special
                counter += 2    ! two minutes
            }
            else
                "I don't see how you plan to do that, since you lack a library card."
        }
    }
}

object floppydisk "floppy disk"
{
    in floppydrive
    nouns "disk", "floppy", "diskette"
    adjectives "floppy", "5.25"
    article "a"
    long_desc
    {
        "This thing brings back countless memories. Ah, those nice old 5 1/4\" floppies. So elegant, so
        slim... so fragile, so large, so darn prone to loss of data. Good riddance."
    }
    short_desc
    {
        "There is a 5 1/4\" floppy disk over here."
    }
    is known
    size 15
}


!----------------------------------------------------------------------------
! NPCS (AND THEIR SPECIFIC CONVERSATION TOPICS)
!----------------------------------------------------------------------------

!----------------------------------------------------------------------------
! YOUR FRIEND
!----------------------------------------------------------------------------
character npc_friend "your friend"
{
    in friendshome
    nouns "friend", "man", "guy", "person"
    long_desc
    {
        "You've known him for ages. Through thick and thin, good and bad, you two always managed to keep
        in touch, and to support one another in time of need. You also share a strong interest in games
        and challenges of all kind.
        \nNoticing you staring at him, he turns toward you. \"Is there a problem?\" he asks. \"Or maybe
        you're giving up on our bet already?\""
    }
    is hidden
    before
    {
        object DoAsk
        {
            select xobject
                case bet
                    "\"What? You want to chicken out? No way, pal! What did we agree on, again? Oh yeah,
                    that's right, \Byou\b will be the one mowing my lawn for the whole summer. That'll
                    be pretty sweet.\""
                case lawn
                    "\"It looks good now. But it'll look even better soon, all thanks to you...\""
                case you
                    "\"Don't worry, I won't make you suffer too much once you lose the bet.\""
                case npc_friend
                    "\"Well, the actual moving is far from over, but still I feel great. This town seems
                    fantastic. Plus, I'm about to win this crazy bet, so...\""
                case town
                    "\"Quiet, peaceful, friendly, what more could I need? Now I just have to convince
                    \Byou\b to move here, too.\""
                case wife
                    "\"She loves it here. She's with the kids at the old place right now, though.\""
                case kid, kids
                    "\"The kids are a little anxious, but I'm 100% sure they'll love it here.\""
                case friendshouse
                    "\"See, that's the beauty of it. In those smaller towns, nice houses are much more
                    cheaper. You really should think about that.\""
                case school
                    "\"Yeah, there's even a school not too far away, can you believe it?\""
                case huntlist
                    "\"Don't even \Bthink\b of amending that list. You already accepted it, now you live
                    with it.\""
                case bowlingball
                    "\"Why do you care about it? You want to borrow it or something? Well, I don't mind.\""
                case airhorn
                    "\"Oh yeah, I remember that. I don't think you should blow it, though. You know how
                    annoying the sound is. Quite a racket.\""
                case squashracket
                {
                    if squash is special
                        "\"I still can't believe that trick you pulled. Well, fair is fair...\""
                    else
                        "\"You know I don't own one, and there aren't any sports centers in this part of town.
                        Good luck, man.\""
                }
                case pen
                {
                    if FindObject( pen, friendshome )
                        "\"Why are you asking me? You already found yourself a calculator.\""
                    else
                        "\"Yeah, of course I do have a calculator... back at my old home. Heh Heh.\""
                }
                case sharpener
                {
                    if FindObject( sharpener, friendshome )
                        "\"Why are you asking me? You already found yourself a pencil sharpener.\""
                    else
                        "\"Now come on, this one shouldn't be too tough to get.\""
                }
                case smalldictionary, library, librarycard
                {
                    if FindObject( smalldictionary, friendshome )
                        "\"Why ask me? You already got a dictionary.\""
                    else
                    {
                        library is known
                        librarycard is known
                        "\"I heard the public library isn't too far. But I don't have a card yet.\""
                    }
                }
                case floppydisk
                {
                    if FindObject( floppydisk, friendshome )
                        "\"It's been a long while since I've seen one of those. Congrats, pal.\""
                    else
                        "\"\BThat\b one is a toughy. I'm still surprised I managed to talk you into it.\""
                }
                case else
                    "Your friend looks at you suspiciously. \"Don't you have a bet to win? Or maybe you
                    plan to give up?\""
        }
        object DoTell
        {
            select xobject
                case bet
                    "\"What? You want to chicken out? No way, pal! What did we agree on, again? Oh yeah,
                    that's right, \Byou\b will be the one mowing my lawn for the whole summer. That'll
                    be pretty sweet.\""
                case huntlist
                    "\"Don't even \Bthink\b of amending that list. You already accepted it, now you live
                    with it.\""
                case bowlingball
                    "\"You want to borrow it? Well, I don't mind.\""
                case squashracket
                {
                    if squash is special
                        "\"I still can't believe that trick you pulled. Well, fair is fair...\""
                    else
                        "\"You know I don't own one, and there aren't any sports centers in this part of town.
                        Good luck, man.\""
                }
                case pen
                {
                    if FindObject( pen, friendshome )
                        "\"Yeah, you found one. Congrats...\""
                    else
                        "\"Yeah, of course I do have a calculator... back at my old home. Heh Heh.\""
                }
                case sharpener
                {
                    if FindObject( sharpener, friendshome )
                        "\"Yeah, you found one. Congrats...\""
                    else
                        "\"Now come on, this one shouldn't be too tough to get.\""
                }
                case smalldictionary, library, librarycard
                {
                    if FindObject( smalldictionary, friendshome )
                        "\"Yeah, you found one. Congrats...\""
                    else
                        "\"I heard the public library isn't too far. But I don't have a card yet.\""
                }
                case floppydisk
                {
                    if FindObject( floppydisk, friendshome )
                        "\"Yeah, you found one. Congrats...\""
                    else
                        "\"\BThat\b one is a toughy. I'm still surprised I managed to talk you into it.\""
                }
                case else
                    "\"Why are you wasting time talking about that? Don't you have a bet to win? Or maybe
                    you plan to give up?\""
        }
        xobject DoShow
        {
            select object
                case huntlist
                    "\"Don't even \Bthink\b of amending that list. You already accepted it, now you live
                    with it.\""
                case bowlingball
                    "\"You want to borrow it? Well, I don't mind.\""
                case airhorn
                    "\"Oh yeah, I remember that. I don't think you should blow it, though. You know how
                    annoying the sound is. Quite a racket.\""
                case pen, sharpener, smalldictionary, floppydisk
                    "\"Yeah, you found one. Congrats...\""
                case else
                    return false
        }
        xobject DoGive
        {
            select object
                case huntlist
                    "\"Don't even \Bthink\b of amending that list. You already accepted it, now you live
                    with it.\""
                case bowlingball, airhorn
                    "\"Just leave that somewhere.\""
                case pen, sharpener, smalldictionary, floppydisk
                    "\"Just put it somewhere around here.\""
                case else
                    return false
        }
    }
}

event in npc_friend
{
    select verbroutine
        case &DoAsk, &DoTell, &DoGive, &DoShow, &DoBlow, &DoPlay, &DoLook
            return true        ! NPC cannot idle if we just interacted with him/her
        case else
        {
            select random( 10 )
                case 1
                    "Your friend contemplates his house proudly. \"This is gonna be great!\" he comments."
                case 2
                    "Your friend slowly paces back and forth across the room."
                case 3
                    "In one far corner of the house, your friend rummages through some miscellaneous stuff."
                case 4
                    "Your friend turns toward you. \"Still here? Have you given up already?\""
                case else
                    return true
        }
}

object bet "bet"
{
    nouns "bet", "quest", "game", "hunt"
    article "the"
    is known
}

object lawn "your friend's lawn"
{
    nouns "lawn", "grass"
    article "the"
    is known
}

object wife "your friend's wife"
{
    nouns "wife", "spouse"
    is known
}

object kid "your friend's child"
{
    nouns "child", "kid", "boy", "girl"
    is known
}

object kids "your friend's children"
{
    nouns "children", "kids", "boys", "girls"
    is known, plural
}

object town "Cheapsville"
{
    nouns "town", "city", "cheapsville"
    is known
}

object squashracket "squash racket"
{
    nouns "racket"
    adjectives "squash"
    article "the"
    is known
}

!----------------------------------------------------------------------------
! HOT DOG VENDOR
!----------------------------------------------------------------------------
character npc_hotdogvendor "hot dog vendor"
{
    in park
    nouns "man", "guy", "person", "vendor", "clerk", "salesman", "sap"
    adjectives "hot", "dog", "hot-dog", "hotdog", "poor"
    article "the"
    long_desc
    {
        "Despite his greasy apron, this middle-aged man seems like a nice fellow. He
        keeps working behind his stand, apparently to make sure everything's ready
        for the potential customers."
    }
    is hidden
    before
    {
        object DoAsk
        {
            select xobject
                case npc_hotdogvendor
                    "\"Well, I've been selling hot-dogs in here for years, now. What I enjoy the most about
                    this job is getting to see the children play and the young lovers frolic... I'm a big
                    romantic, y'know.\""
                case you
                    "\"Why, you look... hungry perhaps? I know it's a little early, but how 'bout a nice hot
                    dog?\""
                case town
                    "\"I've been here for quite a while. Before they made that park, actually. I couldn't
                    think of a better place to be.\""
                case thepark
                    "\"Lovely place, isn't it? Too bad there's no one else around...\""
                case hotdog
                    "\"Just try one of those babies, and you'll be convinced.\""
                case school
                    "\"Ya lookin' for it? Follow Oak Street all the way, then turn right on Main.\""
                case bankbuilding
                    "\"Ya lookin' for it? Follow Oak Street all the way, it's right there.\""
                case library
                    "\"Ya wanna go there? Follow Oak Street all the way, then turn left on Main.\""
                case bowlingbuilding
                    "\"Ya wanna go there? Follow Oak Street all the way, then turn left on Main. It's a
                    little farther.\""
                case librarycard
                    "\"Nah, I don't have one...\""
                case squashracket
                    "\"Yikes! I'm not the sporty type m'self, as you might've guess. Can't help ya there.\""
                case pen
                    "\"Nope... I don't need one to count the money I make here, alas.\""
                case sharpener
                    "\"Sorry, I only use pens here.\""
                case smalldictionary, library
                    "\"You trying to insult me or somethin'? Oh, oh I see. Did ya try the library?\""
                case floppydisk
                    "\"A \Bwhat\b? Oh, those black plastic thingies. Haven't seen those in a while.\""
                case else
                    "\"Er... No, don't think I can help ya. How 'bout a delicious hot dog?\""
        }
        object DoTell
        {
            select xobject
                case bet, huntlist
                    "\"Yikes! Well, the best of luck t'ya, pal!\""
                case else
                    return false
        }
        xobject DoShow
        {
            select object
                case huntlist
                    "\"Yikes! Well, the best of luck t'ya, pal!\""
                case money
                    "\"Aah! So you've got enough for a hot dog, then?\""
                case else
                    return false
        }
        xobject DoGive
        {
            if object = money
                Perform( &DoBuy, hotdog )
            else
                return false
        }
    }
}

event in npc_hotdogvendor
{
    select verbroutine
        case &DoAsk, &DoTell, &DoGive, &DoShow, &DoBuy
            return true        ! NPC cannot idle if we just interacted with him/her
        case else
        {
            select random( 8 )
                case 1
                    "The hot dog vendor hums a lively tune."
                case 2
                {
                    if self is special
                        "The vendor turns toward you. \"Hey pal! How 'bout another hot dog?\""
                    else
                        "The vendor turns toward you. \"Hey pal! How 'bout a nice hot dog?\""
                }
                case 3
                    "The vendor rummages through some stuff behind his hot dog stand."
                case else
                    return true
        }
}

object thepark "park"
{
    nouns "park"
    adjectives "city"
    is known
}

!----------------------------------------------------------------------------
! BANK RECEPTIONIST
!----------------------------------------------------------------------------
female_character npc_receptionist "bank receptionist"
{
    in citybank
    nouns "woman", "girl", "person", "receptionist", "secretary", "lady"
    adjectives "bank"
    article "the"
    long_desc
    {
        "A comely woman, probably in her late twenties. She'd look like a high profile
        businesswoman if her suit didn't look so rumpled, as if worn for a long, frantic period.
        \nShe looks deeply involved in her paperwork, although she looks up to you from time to
        time, to see if you actually want something from her."
    }
    is hidden
    before
    {
        object DoAsk
        {
            select xobject
                case bet
                    "\"Oh, I see. Well it sounds like fun! I which I'd have time for things like
                    that.\""
                case town
                    "\"It's a wonderful place, I can tell you that for sure. And do you realize that
                    only a few cities can claim that they still have their very own, non-afiliated
                    bank?\""
                case job, self
                {
                    files is known
                    promotion is known
                    lunch is known
                    "\"Well, I love working here - don't get me wrong - but things have been quite
                    hectic lately. Even forgot my lunch, for Pete's sake. See, there's this bunch of
                    files that need to be computerized, and for some reason I'm the one doing that job.
                    Then again, I don't mind - it's a definite change from my usual job, and I strongly
                    suspect they're giving me this to see how good I am under pressure, new challenges
                    and all that. I smell a promotion...\" She smiles."
                }
                case files
                    "\"Oh, sorry, but that's confidential stuff. Not that it's all that interesting anyway,
                    however.\""
                case promotion
                    "\"Now don't around saying that to everyone! I'm just hoping, thinking... that's all.\""
                case atm
                    "\"Nice isn't it? We acquired it a mere six months ago, and I must say it's been working
                    great. Personally I was somewhat worried at first - because of the diminution of human
                    contact and so on. But I changed my mind, it's just fine.\""
                case bankbuilding
                    "\"The Cheapsville City Bank has quite an interesting history. Its first instalment
                    dates back from 1875, and it was... Oh, sorry. I really don't have time for this now. Tons
                    of work to do, you know.\""
                case thepark
                {
                    hotdog is known
                    "\"Yes, there's a nifty little park not too far from here. Just exit this building, then
                    go right ahead on Oak. Oh, and I recommend buying a hot dog. They're just delicious!\""
                }
                case school
                    "\"The elementary school is a just a few blocks from here. Exit the building and turn left,
                    if you want to go there. I don't know much else about it. I didn't go there, and I don't
                    have any kids - not that I wouldn't like to have some. Then again, don't get me wrong - I
                    still have several years in front of me, so there's no rush. Anyway, back to work...\""
                case library
                {
                    librarycard is known
                    "\"Ah, I just \Blove\b that sweet little library. Of course, I must admit it's a little
                    tiny - nothing to compare big some of the ones in the big city - but it's well furnished
                    nevertheless. I go there at least once a week to borrow some novels - I'm a big fantasy fan,
                    although I don't necessary frown on sci-fi stories, or even romance novels - and quite
                    frankly sometimes I find sci-fi more believable than some of those romances, but anyway - my
                    point is that library is just fine with me? Oh, and if you wanna go there, go out and turn
                    right.\""
                }
                case bowlingbuilding
                    "\"The bowling alley? Frankly, I could never understand why would anyone would be interested
                    in throwing a large ball at a bunch of pins, but hey - that's just little me, I
                    guess... Anyway, the alley's just past the public library.\""
                case hotdog
                    "\"Oh, that nice old man in the park cooks the juicest hot dogs I ever tasted. Now
                    I know these aren't particularly good for your health - even those so-called 'healthy'
                    weiners, I don't trust them - but for \Bthose\b hot dogs I often make an exception, since
                    the sheer taste reminds me of my childhood - you know, the afternoons at the ball park, that
                    kind of stuff.\""
                case lunch
                    "\"Yes, can you believe that? With all the work I have to do and the countless things I had
                    to keep in mind - the stress, you know - I even managed to leave my own lunch at home. I
                    just don't know what I'm gonna do, it's not even lunchtime and I'm already starving - see, I
                    got here at the wee hours of the morning - as you can probably guess, I'm quite
                    dedicated. Well well, poor little me...\""
                case squashracket
                    "\"No, I regret but I'm not the sporting type - I do try to stay in shape, of course - I
                    walk to and from work, and my home isn't really close from here - it's in the newest Western
                    sector, have you been there? Anyway, I don't even think we have any squash facilities in the
                    whole town - a few tennis courts, and maybe, er, badminton, that's it. No squash.\""
                case pen
                {
                    if self is special
                    {
                        if parent( pen ) = nothing
                        {
                            "\"Well, now that I think of it... Give me a sec.\" She starts searching through one
                            of her drawers. \"Ah, there! You see, this is one of those cheap pens that came with
                            a calculator on them. It broke down - not surprising if you ask me, besides who can
                            work with those ridiculously small buttons, I ask you - so anyway, I don't need it
                            anymore. It does count as a calculator, right?\"
                            \nYou totally agree, and gratefully accept.";
                            if not Acquire( you, pen )
                                " Unfortunately, you're carrying so much stuff that it falls on the ground. Oh
                                well..."
                            else
                                ""
                        }
                        else
                            "\"Well, I gave you that pen, didn't I?\""
                    }
                    else
                    {
                        pen is special
                        "\"Er... Well, I \Bdo\b have a calculator, but I do need it. You know, I need it all the
                        time - especially with that current assignment I'm working on - I use it again and
                        again. I mean, I'm sorry - I'd love to help you with that little game of yours - but I
                        just don't think I can, really...\""
                    }
                }
                case sharpener
                    "\"Hmmm... let me think. I \Bshould\b have one of those lying somewhere - I'm pretty sure I
                    used to, at least, with all those pencils I used to have - I always preferred pencils, but
                    now they insist that I use pens all the time.\" She starts searching inside her desk for a
                    while, then gives up. \"Well, it seems I don't have it anymore. Must have given it to
                    someone else and forgot about it. Or maybe I just lost it - I'm not a very orderly person,
                    you know. Oh well, I'm sorry.\""
                case smalldictionary
                {
                    library is known
                    librarycard is known
                    "\"Well, did you try the library? That'd be an obvious option...\""
                }
                case floppydisk
                    "\"Oh my. We do have several computers around here - and I dare say I'm pretty good working
                    with those, well, for the easy tasks at least - I thought about learning to program, but I
                    changed my mind. But those old disks, no, I've never seen one around here. Sorry...\""
                case librarycard
                {
                    if self is special
                    {
                        if parent( librarycard ) = nothing
                        {
                            "\"You'd like to borrow my library card? Well...\"
                            \nYou explain that you plan to borrow a dictionary for a short while only, then return it to the library
                            and bring the card back to her.
                            \n\"Oh, alright! That sounds okay. There...\"
                            \nShe hands you the card.";
                            if not Acquire( you, librarycard )
                                "..which falls of your already quite full hands, and end up on the floor."
                            else
                                ""
                        }
                        else
                            "\"But I already lent it to you!\""
                    }
                    else
                        "\"Why yes, I do have one... But, I, well, you know, I wouldn't lend it to anyone. I
                        mean it's not that don't look trustworthy or anything, but I just don't... Well, you
                        understand, right? I'm so sorry...\""
                }
                case else
                    "\"Sorry, I can't help you there. And I'm pretty busy anyway right now.\""
        }
        object DoTell
        {
            select xobject
                case bet
                    "\"Oh, I see. Well it sounds like fun! I which I'd have time for things like
                    that.\""
                case hotdog
                    "\"Hmmm... I could just die for one of those right now... Hey, you got me wondering. Would
                    you be kind enough - I mean I doubt want to bother you or anything - to go and get me
                    one of those awesome hot dogs? That would be soooooo nice of you.\""
                case else
                    "\"Well, that sounds very nice, but I've got a lot of work to do. Sorry...\""
        }
        xobject DoGive
        {
            select object
                case hotdog
                {
                    if self is special
                        "\"Oh, that's very nice of you - I mean I appreciate the attention, I really do - but
                        one hot dog will be quite sufficient for me. Thanks anyway.\""
                    else
                    {
                        self is special
                        move hotdog to nothing
                        "You hand the hot dog to her. A wide smile enlightens her face. \"Oh, that's great! I was
                        just \Bstarving\b!\" She takes a big bite. \"How khan I rephay yhou for chis?\""
                        if pen is special
                        {
                            "\n\"Oh, I know! Give me a sec.\" She starts searching through one of her drawers.
                            \"Ah, there! You see, this is one of those cheap pens that came with a calculator
                            on them. It broke down - not surprising if you ask me, besides who can work with
                            those ridiculously small buttons, I ask you - so anyway, I don't need it anymore. It
                            does count as a calculator, right?\"
                            \nYou totally agree, and gratefully accept."
                            if not Acquire( you, pen )
                                " Unfortunately, you're carrying so much stuff that it falls on the ground. Oh
                                well..."
                            else
                                ""
                        }
                    }
                }
                case else
                    "\"That's very kind of you, but no thanks.\""
        }
        xobject DoShow
        {
            select object
                case huntlist
                    "\"Oh, I see. Well it sounds like fun! I which I'd have time for things like
                    that.\""
                case hotdog
                {
                    if self is special
                        "\"Oh, that's very nice of you - I mean I appreciate the attention, I really do - but
                        one hot dog will be quite sufficient for me. Thanks anyway.\""
                    else
                        "\"Hmmm... I could just die for one of those right now...\""
                }
                case else
                    return false
        }
        object DoKiss
        {
            return ReceptionistDeath
        }
    }
}

event in npc_receptionist
{
    select verbroutine
        case &DoAsk, &DoTell, &DoGive, &DoShow
            return true        ! NPC cannot idle if we just interacted with him/her
        case else
        {
            select random( 8 )
                case 1
                    "The receptionist shuffles through her stacks of paper, then lets out a sigh."
                case 2
                    "The receptionist raises her gaze toward you. \"Do you require assistance?\" she asks."
                case 3
                {
                    if self is special
                        "The receptionist smiles at you. \"Thanks again for that nice hot dog, it really hit the spot.\""
                    else
                    {
                        lunch is known
                        "The receptionist groans. \"I just can't believe I forgot my lunch!\""
                    }
                }
                case else
                    return true
        }
}

object job "work"
{
    nouns "job", "work"
    is known
}

object files "files"
{
    nouns "files"
    article "the"
    is plural
}

object promotion "promotion"
{
    nouns "promotion"
}

object lunch "lunch"
{
    nouns "lunch", "snack", "food"
    article "a"
}

!----------------------------------------------------------------------------
! SCHOOL KIDS
!----------------------------------------------------------------------------
character npc_schoolkids "school kids"
{
    in schoolyard
    nouns "kids", "children", "boys", "girls"
    adjective "school", "young"
    article "the"
    long_desc
    {
        "Countless young children are running everywhere, playing, laughing, screaming, and doing
        the kind of things normal kids do on recess."
    }
    is hidden, plural
    before
    {
        object DoAsk, DoTell
        {
            if parent( npc_mary ) = nothing
            {
                move npc_mary to schoolyard
                "Startled, some of the kids turn toward you. They seem either shy or scared to talk
                to you. After a few seconds, a little girl steps forward.
                \n\"Hello, sir! What's your name?\"
                \n\"Don't talk to him, Mary!\" another girl says. \"He's a stranger! You know we don't
                talk to strangers!\"
                \n\"Well\", she replies, \"you're all around, right? I'll stay far enough. If he tries
                to kidnap me, you'll scream, ok?\"
                \nGrateful, you introduce yourself to her."
            }
            else
            {
                "Except for Mary, none of the kids will directly speak to you, it seems."
            }
        }
        xobject DoShow, DoGive
        {
            "Having been carefully taught not to accept anything from strangers, the kids refuse to come
            close enough."
        }
        object DoKiss
        {
            return KidsDeath
        }
        object DoPlayWith
        {
            "The kids are clearly scared of you, so playing with them isn't a sensible option."
        }
    }
}

event in npc_schoolkids
{
    select verbroutine
        case &DoAsk, &DoTell, &DoGive, &DoShow
            return true        ! NPC cannot idle if we just interacted with him/her
        case else
        {
            select random( 8 )
                case 1
                    "You're almost overwhelmed by the sounds of all the kids playing around."
                case 2
                    "Some kids come nearby, running and screaming. When they finally notice you, they quickly
                    turn around."
                case 3
                    "You start feeling a little jealous of all these kids having fun. Then again, you're already
                    playing quite a challenging game, aren't you?"
                case else
                    return true
        }
}    

!----------------------------------------------------------------------------
! MARY
!----------------------------------------------------------------------------
female_character npc_mary "little Mary"
{
    nouns "mary", "girl", "child", "kid"
    adjective "school", "young", "little", "brave"
    short_desc
    {
        "That brave little girl, Mary, stands nearby, looking at you with inquisitive eyes."
    }
    long_desc
    {
        "Cute, that's the first word that comes to you. She looks like those little girls they
        use as models in photography studios. Bright eyes, sweet smile... Hey, who knows, maybe you'll
        have a little girl like her someday! Right now, she's scrutinizing you just as you're doing with her."
    }
    before
    {
        object DoAsk
        {
            select xobject
                case bet
                    "\"That sure sounds like a nice game. I wish you good luck, sir!\""
                case town
                    "\"Oh, it's a very big city. I couldn't walk through it all in one day. But I heard
                    that there are much bigger cities. Those must be \Bhuge\b...\""
                case npc_mary
                    "\"Well, my name is Mary. Glad to meet you. My parents say I should always be nice with
                    everybody. But they also say I shouldn't talk with strangers. If I wouldn't talk to you
                    at all, it wouldn't be nice, would it? Sometimes I don't understand my parents at all...\""
                case npc_schoolkids
                    "\"Don't worry, they're just shy.\""
                case bankbuilding
                    "\"My parents like to go there, but I don't. It's too boring...\""
                case thepark
                {
                    hotdog is known
                    "\"Oh, I love the park! My parents always bring me there in the weekend. And sometimes,
                    if I'm real nice, they buy me a super-duper-delicious hot dog!\""
                }
                case school
                {
                    surprise is known
                    "\"I like going to school. I learn tons of fun things. But today's even better! We'll play
                    all kinds of games and we'll even have a picnic! It's a special... hmm... a special
                    commemoration Day! I don't remember the rest. Well, it's gonna be a big surprise.\""
                }
                case surprise
                    "\"Well, I don't know. Otherwise, it wouldn't be a surprise, right?\""
                case library, librarycard
                    "\"Oh, it's that big building down the road with all the books in it. I don't go often,
                    cause I'm not big enough to read all the books. But one day I will.\""
                case bowlingbuilding
                    "\"My daddy bowls sometimes, but I don't go with him.\""
                case hotdog
                    "\"My daddy cooks good hot dogs. But the ones in the park are the bestest!\""
                case squashracket
                    "\"Squash? I thought squash was a sound it does when you jump in a mud puddle?
                    Oh, and Bobby Falstein says they eat squash at his home, but I didn't believe him.\""
                case pen
                    "\"The older kids have calculators, but not us. We have to count, and to count, and sometimes
                    we use our fingers, you know, just to be sure.\""
                case sharpener
                {
                    if parent( sharpener ) = nothing
                    {
                        "\"You mean something like this?\"
                        \nShe digs in her pockets for a while, then proudly exhibits a small pencil sharpener.
                        \n\"I found it on the playground this morning. It doesn't work as good as the big one in
                        our classroom, so I guess you can have it. There...\"
                        \nShe throws the sharpener at you. It falls near your left foot."
                        move sharpener to schoolyard
                    }
                    else
                        "\"But I threw it to you! Did you lost it? Your momma wouldn't be proud...\""
                }
                case smalldictionary
                    "\"Oh, I know: it's a book with all the words explained in it, right? My teacher has one, but
                    you can't have it, cause she needs it.\""
                case floppydisk
                    "\"Huh? What's that?\""
                case else
                    "\"I don't know what you're talking about. Maybe I'm too small... Well, sorry.\""
        }
        object DoTell
        {
            select xobject
                case bet
                    "\"That sure sounds like a nice game. I wish you good luck, sir!\""
                case floppydisk
                    "\"Those things used to exist? Really? Wow...\""
                case else
                    "\"You know lots of things, right sir?\""
        }
        xobject DoShow
        {
            "\"You love to show things? I love show-and-tells too. But I'm not supposed to get too
            close to you, mister. Sorry.\""
        }
        xobject DoGive
        {
            if object = librarycard
                "You decide to hold on to the card until the hunt's over, just to remain on the safe side."
            else
                "\"No thank you, sir\" she replies with an overly polite tone."
        }
        object DoKiss
        {
            return KidsDeath
        }
        object DoPlayWith
        {
            "\"Oh, I'd like to, but I can't. My mommy doesn't want me to play with strangers...\""
        }
    }
}

object surprise "surprise"
{
    nouns "surprise", "day"
    adjectives "special", "commemorative"
    article "the"
}

!----------------------------------------------------------------------------
! LIBRARIAN
!----------------------------------------------------------------------------
female_character npc_librarian "librarian"
{
    in publiclibrary
    nouns "woman", "lady", "librarian", "clerk"
    adjective "library", "librarian"
    article "the"
    long_desc
    {
        "Although she's probably in her mid-thirties, this librarian looks slightly older at first glance,
        due to her \I(very)\i sharp dress, her \I(nice)\i horned-rimmed glasses, and her \I(long)\i brown hair up
        tightly in a bun. When you look at her more closely, however, you can see a flash of youth in her
        \I(gorgeous)\i blue eyes. Apparently, she just likes to dress based on the Ultimate Librarian
        Archetype. Well, you're not the one who'll complain. No sir-ree... In fact, right now you're trying to
        sneak a peek of her \I(long)\i legs lying \I(elegantly)\i along the desk. You can't help but wonder if
        she circulates."
    }
    is hidden
    before
    {
        object DoAsk
        {
            select xobject
                case bet
                    "\"Well, it sure sounds interesting. Too bad I'm working all day, I might have even
                    decided to join and help you...\""
                case you
                    "\"Are you from around here? I don't remember seeing you before today?\"\nYou explain
                    to her that you're just visiting a friend. She frowns. \"Oh well...\""
                case self, job
                    "\"Well, I moved in this town after my studies. I always wanted to be a librarian, and
                    this quiet place was just perfect.\""
                case town
                {
                    mrright is known
                    "\"Cheapsville is a great place to raise a family. At least that's what I think. I do
                    some babysitting once in a while, and I'd love to have kids of my own. I just haven't met
                    Mr. Right, I guess...\""
                }
                case mrright
                    "\"Well, I had my deal of boyfriends, but nothing serious these days, unfortunately.\""
                case thepark
                {
                    hotdog is known
                    "\"Yes, there's a small city park right at the end of Oak street. I love to go sit on a
                    bench to read a good novel. However, being a vegetarian, I can hardly stand the smell of all
                    those hot dogs.\""
                }
                case bankbuilding
                    "\"The city bank is on Main street, right where it crosses Oak. I have an account
                    there, and I can tell you the service is a good, if not better, than with any of those
                    \"major\" banks.\""
                case school
                    "\"Are you looking for it? When you exit this building, turn right and walk for a while. You
                    can't miss it.\""
                case library
                    "\"It may not be the Library of Alexandria, but it's all mine. Well, in a manner of
                    speaking, of course.\""
                case bowlingbuilding
                    "\"The bowling alley isn't far from here. Just turn left when you leave here. It's been quite
                    a while since I went bowling, myself.\""
                case hotdog
                    "\"Bleh! The horrors they put in those...\""
                case squashracket
                    "\"Oh, I heard about squash, but never played it myself. Somehow I assumed it was a game for
                    overstressed businessmen. Can't help you there...\""
                case pen
                    "\"That's just too bad. I usually do keep a calculator in my purse, but today I left it at
                    home. You're not very lucky, sorry.\""
                case sharpener
                    "\"I used to keep a couple of those, but unfortunately I threw them all away a while ago. I
                    didn't need them anymore, and most of them didn't work properly anyway.\""
                case floppydisk
                    "\"Let me think... We did use to have older computers which used those... But they were all
                    thrown away. Or sold in a garage sale. I remember the bowling alley bought one, though I
                    doubt they actually used it in the end.\""
                case smalldictionary
                {
                    if smalldictionary is special
                        "\"Well, the one you borrowed should do the trick, now shouldn't it?\""
                    else
                        "\"Of course, we keep all kind of dictionaries here. Some of them should be just
                        perfect for you... assuming you have a library card, of course.\""
                }
                case book, books, dictionaries, encyclopedia, encyclopedias
                    "\"Seeing anything you like? Most of them can be borrowed, if you have a card.\""
                case librarycard
                    "\"Any citizen of Cheapsville can get a library card.  You fill a request form, and it takes
                    about one week. I realize this probably isn't what you wanted to hear. Sorry about that. But
                    once you get your card, you can allow anyone to use it, but are held responsible for what
                    gets borrowed with it.\""
                case requestform
                    "\"Come to think of it, I ran out of forms yesterday. This definitely isn't your lucky
                    day, is it?\"
                    \nShe gives you a \"sorry\" face. You can help but notice how deep her blue eyes are.\""
                case date
                {
                    "She blushes.
                    \n\"Well, I, er, I mean, well, sure, why not?\"
                    \nShe grabs a small piece of paper, and writes her name and phone number on it.
                    \n\"There,\" she says as she hands it to you, \"call me whenever you like.\"
                    \nShe resumes working at her desk, although she now looks at you with different eyes, and
                    a nice little smile."
                    move paper to you
                }
                case else
                    "\"Sorry, but I don't think I can help you with that.\""
        }
        object DoTell
        {
            select xobject
                case bet
                    "\"Well, it sure sounds interesting. Too bad I'm working all day, I might have even
                    decided to join and help you...\""
                case you
                    "\"Are you from around here? I don't remember seeing you before today?\"\nYou explain
                    to her that you're just visiting a friend. She frowns. \"Oh well...\""
                case smalldictionary
                {
                    if smalldictionary is special
                        "\"Well, the one you borrowed should do the trick, now shouldn't it?\""
                    else
                        "\"Of course, we keep all kind of dictionaries here. Some of them should be just
                        perfect for you... assuming you have a library card, of course.\""
                }
                case else
                    "\"Well, that's very nice.\""
        }
        xobject DoShow
        {
            select object
                case huntlist
                    "\"Well, it sure looks interesting. Too bad I'm working all day, I might have even
                    decided to join and help you... I presume you came in here for the dictionary, right?\""
                case smalldictionary
                {
                    if smalldictionary is special
                        "\"That's the one you borrowed, right?\""
                    else
                        "\"Well, you'd be allowed to borrow this dictionary provided you handed me a
                        valid library card.\""
                }
                case librarycard
                    "\"Yes, this does seems like a valid library card. You should be able to borrow books
                    with it.\""
                case hotdog
                    "\"Yeech! Please keep that stinking thing away from me, please.\""
                case else
                    return false
        }
        xobject DoGive
        {
            select object
                case smalldictionary
                {
                    if smalldictionary is special
                        "\"Well, you just borrowed it, so it's yours, for the time being.\""
                    else
                        "\"You want to borrow that dictionary? I'll need a valid library card, then.\""
                }
                case librarycard
                {
                    if Contains( you, smalldictionary ) and not smalldictionary is special
                    {
                        "\"You'd like to borrow that dictionary, right?\"
                        \nShe takes it from you, scan, demagnetize it with some device you're not really
                        familiar with, and then hands it back to you.
                        \n\"There you go, sir!\""
                        smalldictionary is special
                    }
                    else
                        "\"Yes, this does seems like a valid library card. You should be able to borrow books
                        with it.\""
                }
                case hotdog
                    "\"Yeech! Please keep that stinking thing away from me, please.\""
                case else
                    return false
        }
        object DoBorrow
        {
            "Well, you've already \"checked her out\" a lot, don't you think?"
        }
        object DoKiss
        {
            "Pushed by some strange instinct, you suddenly lunge toward the librarian, grab her gently but
            firmly, and start kissing her passionately. After a short surprise, she responds, and the kiss
            lingers some more, letting you enjoy the warmth of her sweet kiss.\nFinally, you let go of your
            embrance.
            \n\"Wow! I mean, hmm, well, that was...\"  Her face turns a cute shade of red. With a faint
            smile on her lips, she grabs a small piece of paper, and writes her name and phone number on it.
            \n\"There,\" she says as she hands it to you, \"call me whenever you like.\"
            \nShe resumes working at her desk, although she now looks at you with a whole different perspective."
            move paper to you
            counter += 2    ! two minutes
        }
    }
}

object mrright "Mr Right"
{
    nouns "right", "mr", "mister", "boyfriend"
    adjectives "mr", "mister",
}

object requestform "request form"
{
    nouns "form", "request"
    adjectives "request", "library", "card"
    article "a"
}

object date "date"
{
    nouns "date"
    article "a"
    is known
}


!----------------------------------------------------------------------------
! BOWLERS
!----------------------------------------------------------------------------
character npc_bowlers "bowlers"
{
    in bowlingalley
    nouns "bowlers", "players", "bowler", "men"
    adjective "bowling"
    article "the"
    long_desc
    {
        "You can see, all around the place, several bowlers practicing in different alleys. Most
        of them seem to be over 40, which seems... apropriate."
    }
    is hidden, plural
    before
    {
        object DoAsk, DoTell
        {
            "You don't really want to bother the bowlers, especially with the owner keeping his eyes
            on you."
        }

        xobject DoShow, DoGive
        {
            "You don't really want to bother the bowlers, especially with the owner keeping his eyes
            on you."
        }
    }
}

event in npc_bowlers
{
    select random( 8 )
        case 1
            "A loud cheer arises as one of the bowlers does a particular tough spare."
        case 2
            "A bunch of bowlers make fun at another, who just made a gutter ball."
        case 3
            "Bowlers come in and out of the place, sometimes swapping lanes."
        case else
            return true
}

!----------------------------------------------------------------------------
! STAN
!----------------------------------------------------------------------------
character npc_stan "Stan"
{
    in bowlingalley
    nouns "man", "guy", "stan", "owner"
    adjectives "owner"
    long_desc
    {
        "Stan (well, you assume it's his name, since it's written in large letters in the back of his
        bowling shirt) is probably the first good argument against this town you found today. He's
        unshaved, he looks unfriendly (no, make that mean) and keeps eyeing you in a scary way. Based on
        the way he interacts with the other bowlers, you deduce he owns the place."
    }
    short_desc
    {
        "Stan, the owner, watches you suspiciously from a short distance."
    }
    before
    {
        object DoAsk
        {
            select xobject
                case bowlingbuilding, npc_bowlers
                    "\"I owned this place for 18 years now. I've had my share of problems. And I've my
                    share of outsiders. Well guess what? They tend to come together. So you'd better
                    behave, pal!\""
                case bowlingball
                {
                    if Contains( bowlingalley, bowlingball )
                        "\"Well, it's hardly a professional ball, but one could make a good score out of
                        it. As for you though, I still have my doubts.\""
                    else
                        "\"See, this is practice morning. It means three things. One - It's free.  Two - You
                        don't play a standard game. You just pick a lane, bowl, and that's it.  Three - You
                        need to provide your own ball and shoes.\" He looks at your shoes, which, because you
                        are trendy and alternative, happen to be bowling shoes. \"Well, those can do, anyway.\""
                }
                case bowlinggame, bowlingshoes
                        "\"See, this is practice morning. It means three things. One - It's free.  Two - You
                        don't play a standard game. You just pick a lane, bowl, and that's it.  Three - You
                        need to provide your own ball and shoes.\" He looks at your shoes, which, because you
                        are trendy and alternative, happen to be bowling shoes. \"Well, those can do, anyway.\""
                case else
                    "\"Listen pal, if you came here to bowl, go ahead and play. If you didn't, just
                    get the heck out of here! I know everybody here, except you. So you'd better behave...\""
        }
        object DoTell
        {
            "\"Do I look like I actually \Bcare\b about your problems?\" Stan sneers."
        }
        object DoShow
        {
            "\"Well, it's hardly a professional ball, but one could make a good score out of
            it. As for you though, I still have my doubts.\""
        }
        object DoKiss
        {
            "For a moment, you wonder if Stan would be nicer if you gave if a big juicy kiss. Fortunately,
            your sanity takes over soon after." 
        }
    }
}

object bowlinggame "bowling game"
{
    in bowlingalley
    nouns "bowling", "game"
    adjectives "bowling"
    article "the"
    is hidden
    before
    {
        object DoPlay
        {
            return Bowling
        }
    }
}

object bowlingshoes "bowling shoes"
{
    nouns "shoes", "flats"
    adjectives "bowling"
    article "the"
    is known
}


!----------------------------------------------------------------------------
! NEW VERB ROUTINES
!----------------------------------------------------------------------------

routine DoRead
{
    ! There is no 'default response' - Reading is handled by each readable object
    return true
}

routine DoPutOn
{
    ! Because containers & platforms share the same core code, we can reuse DoPutIn
    return DoPutIn
}

routine DoBlow
{
    ! Fails by default
    "I don't see how you could blow that."
}

routine DoPlay
{
    ! Fails by default
    "Is that a game? A song? I'm afraid I'm not familiar with it..."
}

routine DoGiveUp
{
    "And mow your friend's lawn for the whole summer? NEVER!"
}

routine DoBuy
{
    ! Fails by default
    "I doubt you could actually purchase that. Not today, anyway."
}

routine DoBorrow
{
    ! Fails by default
    ! I check the held status here instead of in the verb def to allow 'borrow librarian'
    if not Contains( you, object )
        "You're not holding that."
    else
        "I don't precisely see how you plan to borrow that."
}

routine DoBowl
{
    if not location = bowlingalley
        "This isn't an appropriate location for bowling."
    else
        if not Contains( bowlingalley, bowlingball )
            "I don't see any bowling ball around here. That is, any \Bavailable\b one."
        else
            return Bowling
}

routine DoCount
{
    ! Fails by default
    "There's no need to count that."
}

routine DoPlayWith
{
    ! Fails by default
    print "To be honest with you, "; The( object ); " doesn't seem interested in any games."
}

replace DoKiss
{
    if object is not living
        "You need to get out more."
    else
    {
        print "You don't really feel attracted to "; The( object ); " in that special way."
        return true
    }
}

replace DoScore
{
    local bGotSomething = false
    "Well, let's see. At the moment..."

    if Contains( you, pen )
    {
        "- You're carrying the pen/calculator."
        bGotSomething = true
    }
    elseif Contains( friendshome, pen )
    {
        "- The pen/calculator has been brought at your friend's place."
        bGotSomething = true
    }
        
    if Contains( you, sharpener )
    {
        "- You have the pencil sharpener."
        bGotSomething = true
    }
    elseif Contains( friendshome, sharpener )
    {
        "- You left the pencil sharpener at your friend's house."
        bGotSomething = true
    }

    if Contains( you, smalldictionary )
    {
        "- You got your hands on a dictionary."
        bGotSomething = true
    }
    elseif Contains( friendshome, smalldictionary )
    {
        "- A dictionary's already resting at your friend's home."
        bGotSomething = true
    }

    if Contains( you, floppydisk )
    {
        "- You have the floppy disk."
        bGotSomething = true
    }
    elseif Contains( friendshome, floppydisk )
    {
        "- You brought the floppy disk to your friend's place."
        bGotSomething = true
    }

    if squash is special
    {
        "- You brought a squash racket in the house (although not the kind your friend expected)."
        bGotSomething = true
    }

    if bGotSomething
        "...and that's about it."
    else
        "...you haven't got much. But you keep your hopes high."

}

!Those new actions are just "text dumps"
routine DoAbout
{
    "\n\BScavenger Hunt\b"
    "A Small Visit in Cheapsville"
    "Version 0.6"
    "\nThis short game was written as a learning exercise with the Hugo language. Afterwards, it evolved into
    a tutorial for other Hugo learners. It's loosely based on the first \"adventure game\" I ever wrote, back
    when I was 12. (I give more details in the author's notes, which you can access after solving the game.)"
    "Type \"license\" for the license and \"credits\" for the credits."
    "The help system can be reached by typing \"help\"."
}

routine DoLicense
{
    "\n\"Scavenger Hunt\" is copyright 2000-2002 by Gilles Duchesne [lonecleric@bigfoot.com]."
    "\nThe author hereby grants the right to copy and distribute the following game, provided that"
    "1) the binary .HEX file remains unchanged, and that"
    "2) \Uno direct exchange of money whatsoever\u is involved in the distribution process."
}

routine DoCredits
{
    "\nAUTHOR:"
    "Gilles \"LC\" Duchesne"
    "\nTESTERS:"
    "Nick Montfort"
    "Kent Tessman"
    "Jonathan Blask"
    "Jason Dyer"
    "Frédéric Bérubé"
    "Dan Shiovitz"
    "Joachim Froholt"
    "\nWRITING CONSULTANT:"
    "Nick Montfort"
    "\nTECHNICAL CONSULTANTS:"
    "Kent Tessman"
    "Christopher Tate"
    "Jason Dyer"
    "\nADDITIONAL CREDITS:"
    "Frédéric Bérubé, for providing general inspiration for the \"friend\" character"
    "Jennifer Earl, for giving me an idea for a last-minute puzzle (which I of course cannot describe here)"
}

routine Bowling
{
    "You pick a free lane, grab a good hold on your ball, and shoot. Looking good... Looking good... Look - DOH!
    Oh well... You never were really good at this anyway."
    if not npc_stan is special
    {
        npc_stan is special
        "At least, some good comes out of this poor shot. Although he doesn't seem to trust you any more,
        Stan doesn't watch your every move, as he used to."
    }
    counter += 7    ! seven minutes
    return true
}

!Since I wanted to allow hints to be accessed from the "endgame menu", I had to replace the default EndGame
!routine. I took the original from the Hugolib and stripped it of all the #ifdefs and goto labels.
! Based on the one in hugolib.h
replace EndGame( end_type )
{
    PrintStatusLine                 ! update one last time

    Font( BOLD_ON )
    select end_type
        !This is the value you set endflag to. I took out case 2 (you have died) and added a comment for case 3.
        case 1:  print "\n\n*** YOU'VE WON THE GAME! ***"
        case 3:  print "\n\n*** You have lost your bet ***"
    Font( BOLD_OFF )

    local r = -1

    !Unlock the Author's Notes
    if end_type = 1
    {
        "(You are now allowed to read the Author's Notes. Look for the appropriate topic under the Hints
        section.)"
        gb_authorsnotes = true
    }

    !The innocent comment below raises an important point. Labels aren't specific to a given routine. They're
    !program-wide, which can mean a world of trouble if you're not careful. And if you're copying code from one
    !part of the program to another, you'll AT LEAST have to rename the labels.
    ! Got rid of the label, as it remains defined in hugolib.h
    while ( r = -1 )
    {
        print "\n\nThe game has ended.  Do you want to (R)ESTART, R(E)STORE a saved game, (U)NDO your last turn, consult
        the (H)INTS or (Q)UIT? ";

        while true
        {
            GetInput
            select word[1]
                case "restart", "r"
                {
                    if Restart
                    {
                        r = 1
                        PrintStatusline
                    }
                    else
                        Message( &DoRestart, 2 )   ! failed
                    break
                }
                case "restore", "e"
                {
                    r = Perform( &DoRestore )
                    break
                }
                case "undo", "u"
                {
                    if Undo
                    {
                        r = 1
                        PrintStatusLine
                        DescribePlace( location )
                    }
                    else
                        Message( &DoUndo, 1 )  ! failed
                    break
                }
                case "hints", "hint", "help", "h"
                {
                    DoHelp
                    break
                }
                case "quit", "q"
                {
                    r = 0
                    break
                }

                print "Enter (R)ESTART, R(E)STORE, (U)NDO, (H)INTS or (Q)UIT: ";
        }
    }

    return r
}

routine DogDeath
{
    "\n\n\nYou'll never be quite to remember the exact events that followed. You were told later on that
    there was some crazed pitbull sleeping quietly in the doghouse. You startled him, so he decided to rip
    one of your hands off. It didn't turn out to be a big deal -- the microsurgeon who was on call at
    Cheapsville General Hospital was able to reattach it easily, and your friend managed, with the help of his
    neighbor, to get the hand back before it had been gnawed on too severely. So much for the quiet \"small
    town\" feeling. Well, it might not be as bad as losing a limb, but..."
    endflag = 3
}

routine ReceptionistDeath
{
    "\n\n\nApparently, the poor receptionist doesn't appreciate being kissed without consent. She decides to
    empty most of her mace can in your face, and then quickly calls the police.
    \nYou explain that you are being controlled by an adventure game player who was merely trying every
    possible action, and after some discussion and apologies, she agrees not to press charges. Of course, in
    the meantime..."
    endflag = 3
}

routine KidsDeath
{
    "\n\n\nYou pucker up. The kids were already scared of you. After seeing you trying to kiss one of them, they
    decide you're one of those big bad maniacs their parents and teachers warned them against. Some of them
    start yelling like they're being murdered or something, and eventually some teachers come over and decide
    to keep you around \"to clarify matters\".
    \nYou explain that you are being controlled by an adventure game player who was merely trying every
    possible action, and in the end, everything turns out fine, except that..."
    endflag = 3
}

!DESIGN COMMENT: Allow me to lose all objectivity for a moment, while I tell you that
!
!                    H I N T S   A R E   M A N D A T O R Y   (Well, they should be.)
!
!It's easy to tell yourself "Oh well, my game isn't that tough - the players won't have any trouble playing it."
!But believe me, those are mere delusions. Players are dumb. Heck, just look at me. ;-) You can expect that a
!substancial amount of players will end up hopelessly stuck. If you don't feel like going all the trouble of
!making up a hint system, at least write some walkthrough you can package along the game, or upload separately to
!the IF Archive.
!
!You might also think "Hey, I'm giving away my email address in the game, so players can email me for hints, and
!I'll get feedback at the same time!" Sounds reasonable. However, that email address might not stay valid forever.
!Maybe you'll get bored of the "IF thing" and leave the scene entirely. (Happened before, will happen again.) The
!people who will decide to play your game 5 years from now might be more annoyed by the lack of hints/walkthrough
!than by any bug. (And I know, oh Lord do I know...)
!
!I realize authors sometimes decide to wait for a given period (a few weeks, perhaps) before releasing hints. I'm
!fine with that. But once again, I would strongly suggest writing hints/walkthrough BEFORE the game is released.
!It helps you "proofread" the game one last time, and you might be more motivated at that point than once the
!game's been discussed over and over.

!----------------------------------------------------------------------------
! HINT SYSTEM
!This is important, too. I'm pretty sure Kent will be more than happy to let you reuse his hint system. But as a
!general rule, you MUST ask permission before reusing somebody else's code. The mere fact code was publicly
!released isn't enough to assume it's now "public domain". Besides, it's the polite thing to do, anyway.
! Taken (with permission) from Kent Tessman's GBHELP.HUG
!----------------------------------------------------------------------------

array hint_categories[MAX_MENUITEMS]

replace DoHelp
{
    local i, count, category, old_category
    local topic, old_topic

    MENU_TEXTCOLOR = DEF_FOREGROUND
    MENU_BGCOLOR = DEF_BACKGROUND
    MENU_SELECTCOLOR = DEF_SL_FOREGROUND
    MENU_SELECTBGCOLOR = DEF_SL_BACKGROUND

:PickHintCategory
    ! First, create a list of hint categories:
    count = 0
    for category in hint_category
    {
        if category.hints_available
        {
            menuitem[++count] = category.name
            hint_categories[count] = category
        }
    }

    if count = 0
    {
        CenterTitle("HINTS")
        "\n[No hints available.  Press any key...]";
        pause
        return
    }

    menuitem[0] = "HINTS"
    category = Menu(count, 0, old_category)
    old_category = category
    if category = 0
    {
        cls
        PrintStatusline
        DescribePlace(location)
        return
    }

    ! Convert category from a menu selection number to a
    ! hint_category class:
    category = hint_categories[category]

:PickHintTopic
    ! For a selected category, create a list of subcategories:
    for (topic=1; category.(hint1-1+topic)~=""; topic++)
    {
        menuitem[topic] = category.(hint1-1+topic)
        hint_categories[topic] = category.(hint1-1+topic) #2
    }
    menuitem[0] = category.name

    ! Get the desired topic:
    topic = Menu(topic-1, 0, old_topic)
    old_topic = topic
    if topic = 0
        jump PickHintCategory

    ! If we get here, then we've successfully selected a topic
    ! and can start printing the actual hints:
    CenterTitle(menuitem[topic])

    ! Change topic from a menu selection number to a
    ! hint_topic class:
    topic = hint_categories[topic]

    i = 0
:PrintHints
    for (; i<=topic.hints_revealed; i++)
    {
        print ""
        run topic.(hint1+i)
    }

    if &topic.(hint1+i) = 0         ! i.e., no more topics
    {
        "\n[No more hints.  Press any key...]";
        pause
        jump PickHintTopic
    }
    else
    {
        "[Press 'H' for another hint, or 'Q' to quit]";
:GetHintKey
        pause
        if word[0] = 'Q', 'q', ESCAPE_KEY
            jump PickHintTopic
        if word[0] = 'H', 'h'
        {
            topic.hints_revealed++
            print newline
            jump PrintHints
        }
        jump GetHintKey
    }
}

!Here are some examples of the use of aliases. When you're absolutely certain a certain kind of object won't
!make any use of a property or an attribute (especially when you're working in a closed environment, like a library)
!you can reuse that property/attribute for a different purpose. The "alias" keyword can save you resources (and file size, to a
!lesser extent) while making it easier than just having to remember "Okay, the n_to property means the 1st
!hint..."
property hint1 alias n_to
property hint2 alias ne_to
property hint3 alias e_to
property hint4 alias se_to
property hint5 alias s_to
property hint6 alias sw_to
property hint7 alias w_to
property hint8 alias nw_to
property hint9 alias u_to
property hint10 alias d_to

property hints_available alias in_to
property hints_revealed alias out_to

!Kent wrote those comments, and I won't elaborate - the examples seem rather self-explanatory to me.
! hint_category objects must be explicitly placed "in hint_category".  They
! should contain two values for each hint1, hint2, etc.:  a label/question
! and the name of the hint_topic object.  hint_topic objects should be
! comprised of property routines for hint1, hint2, etc., giving successive 
! hints on the topic.

class hint_category
{
    hints_available true
}

class hint_topic
{
    hints_revealed 0
}

!--------------
! GENERAL HINTS:
!--------------

hint_category hints_general "General Hints"
{
    in hint_category
    hint1 "What am I supposed to do in this game?", hints_todo
    hint2 "What are the objects I'm supposed to find?", hints_objects
}

hint_topic hints_todo
{
    hint1
        "As the name of the game implies, this is a scavenger hunt."
    hint2
        "Meaning you need to go around trying to get your hands on several miscellaneous objects."
    hint3
        "You've also got a limited time period (3 hours of game-time) to do this."
    hint4
        "(To be honest with you, you're very unlikely to succeed in your task on the first run. Time flies quite
        fast simply by exploring around. Fortunately, the game isn't that big either.)"
}

hint_topic hints_objects
{
    hint1
        "Did you read the game introduction?"
    hint2
        "Did you check your inventory?"
    hint3
        "You're carrying a list of the objects to find."
    hint4
        "READ OBJECT LIST"
    hint5
        "Also note that typing SCORE will recap the status of your findings."
}

!---------------
! ITEMS HINTS:
!---------------

hint_category hints_items "Locations of each item to find"
{
    in hint_category
    hint1 "Where can I find a calculator?", hints_calculator
    hint2 "Where's the pencil sharpener?", hints_sharpener
    hint3 "Where do I get a dictionary?", hints_dictionary
    hint4 "Where could I possibly find a floppy disk?", hints_floppy
    hint5 "Where am I gonna get a squash racket in this place?", hints_squash
}

hint_topic hints_calculator
{
    hint1
        "You won't find one of those lying around."
    hint2
        "You'll have to ask around for it."
    hint3
        "Would could possibly have an extra calculator? A secretary perhaps?"
    hint4
        "The bank receptionist could get you one."
    hint5
        "But first you'll have to gain her friendship (see the corresponding section for more details)."
}

hint_topic hints_sharpener
{
    hint1
        "Where could you possibly find such a item in real life?"
    hint2
        "Have you been to the schoolyard?"
    hint3
        "Did you try to talk with the kids?"
    hint4
        "Ask Mary about that topic, and she'll give you (throw you, in fact) a pencil sharpener."
}

hint_topic hints_dictionary
{
    hint1
        "A dictionary is a book, right?"
    hint2
        "So you should look for a place which has lots of books..."
    hint3
        "There's a public library on Main Street, east of Oak Street."
    hint4
        "How course, you can't just waltz in there and steal a dictionary. You'll have to be able to borrow it
        (see the corresponding section for more details)."
}

hint_topic hints_floppy
{
    hint1
        "This one isn't obvious at first. Where could you find an old computer supply?"
    hint2
        "Only with an old computer, I guess."
    hint3
        "There's an XT waiting for you in the bowling alley's storage room (see the corresponding section if
        you need help getting there)."
    hint4
        "Check the disk drive. There's a floppy disk in there."
}

hint_topic hints_squash
{
    hint1
        "That one is probably the toughest to get of the whole game."
    hint2
        "There are no squash rackets available near your friend's home."
    hint3
        "In fact, there are \Ino\i squash rackets in the game, period. But..."
    hint4
        "You need to find a sneakier way to \"bring a squash racket\" in the house."
    hint5
        "How about \"a racket made by a squash\"?"
    hint6
        "Search the garbage bin outside your friend's house. You'll find an old squash."
    hint7
        "Check in his desk drawer, and you'll find an air horn."
    hint8
        "While in the house, PUT the HORN IN the SQUASH, and BLOW the HORN. Voilà!"
}

!------------------
! HOW TO HINTS:
!------------------

hint_category hints_howdoi "How do I...?"
{
    in hint_category
    hint1 "Help! I've been mauled by a dog!", hints_dog
    hint2 "How do I befriend the bank's receptionist?", hints_receptionist
    hint3 "Help! I've been arrested!", hints_prison
    hint4 "How do I get inside the school?", hints_school
    hint5 "How can I borrow something from the library?", hints_library
    hint6 "Stan won't let me inside that door in the bowling alley!", hints_stan
}

hint_topic hints_dog
{
    hint1
        "The neighbor's dog will attack you by surprise if you try to mess around its doghouse."
    hint2
        "There's a very easy way not to get attacked..."
    hint3
        "don't mess with the doghouse. It's of no interest to you."
}

hint_topic hints_receptionist
{
    hint1
        "Did you tried sticking around her for a while?"
    hint2
        "She mentions she forgot her lunch. Asking her about it lets you know she's already starving."
    hint3
        "Could you provide her with something to eat?"
    hint4
        "In the park, up north, BUY a HOT-DOG from the vendor, then GIVE it to her."
    hint5
        "She'll now be willing to help you some more."
}

hint_topic hints_prison
{
    hint1
        "Well, maybe you did something you shouldn't have?"
    hint2
        "Just don't do it again."
}

hint_topic hints_school
{
    hint1
        "Well, you can't. Sorry."
}

hint_topic hints_library
{
    hint1
        "How does one usually manage to borrow books from a library?"
    hint2
        "With a library card, of course."
    hint3
        "If asked, the librarian will tell you that any citizen can get such a card for free, but that
        the process takes a long time. So you need to find someone who already has such a card."
    hint4
        "If you ask around, you'll find the bank's receptionist has one."
    hint5
        "If you befriend her (see the corresponding section), she'll lend you that card."
    hint6
        "You can then BORROW the DICTIONARY."
}

hint_topic hints_stan
{
    hint1
        "Stan's a little weary of strangers."
    hint2
        "Especially strangers who show up in a bowling alley for something else than bowling."
    hint3
        "If you try bowling a little, he'll pay less attention to you."
    hint4
        "But to BOWL, you need a bowling ball. (As Stan might explain when asked, it's practice morning, and
        you get to play for free as long as you bring your own stuff.)"
    hint5
        "You friend keeps a bowling ball in his closet, and will let you borrow it."
}

!------------------
! AUTHOR'S NOTES:
!------------------

hint_category hints_authorsnotes "Author's Notes"
{
    in hint_category
    !This specific category should only be available once you win the game
    hints_available
    {
        return gb_authorsnotes
    }
    hint1 "A quick history of the Scavenger Hunt", hints_history
    hint2 "The numerous incarnations of this game", hints_incarnations
}

hint_topic hints_history
{
    hint1
        "This whole game could be considered a tribute of sorts to my first personal encounter with the world
        of \"adventure games\".
        \n\nYou see, I was about 9 or 10 back then, watching my favorite computer show on TV, when I first saw
        a glimpse of those really wonderful games in which you were told what was going on and had to type in
        your commands in plain text. I thought it was the best idea I ever heard of, but unfortunately had no
        idea of where I could find such a game. In addition, my knowledge of the english language back then
        was restricted to a couple dozen words."
    hint2
        "Fortunately, a couple years later, a friend of mine showed me one of those wonderful \"adventure
        games\" on his Coco2. It was called \"Chasse aux trésors\". The premise? While visiting one of your
        friend, he invites you to an improvised scavenger hunt... :-)
        \n\nI couldn't play that game much, but was seduced by the whole thing. I got my C-64 a few months after
        that, and during the next summer decided to write my own version of it. (Fear not, however, I merely
        copied the premise, not the game itself.) See the \"Differences between the Scavenger Hunt versions\" for
        more details on that."
    hint3
        "This particular incarnation of the game was created as a coding exercise, to learn Hugo programming.
        Not too big, not too small, with several elements commonly found in IF, what more could I ask for?
        \n\nAfter a short while, however, I decided I could do even more. Since I had already \"broken down\"
        the game into increasingly difficult steps, I thought I could keep track of each of those \"sub-versions\"
        and eventually turn them into a Hugo tutorial. That's what made me add the multimedia stuff to the game,
        and convinced me to actually release it."
}

hint_topic hints_incarnations
{
    hint1
        "VOUS ÊTES EN VISITE CHEZ UN AMI ET IL VOUS PROPOSE UNE CHASSE AUX TRÉSORS.
        \nEN 1 HEURE, VOUS DEVREZ RAPPORTER:
        \n* UN AIGUISE-CRAYON
        \n* UN COUPE-PAPIER
        \n* UNE DISQUETTE
        \n* UN DICTIONAIRE
        \n* UNE CALCULATRICE"
    hint2
        "That rather pathetic paragraph (and if you don't speak french, you aren't missing on much, believe me)
        was the intro to my first installment of the game. I wrote it was I was 12, on my Commodore 64. The
        coding was downright pathetic. Basically, I wrote up one Basic program for each of the 9 locations. When
        moving from one location to another, you'd load up the corresponding program, while keeping and sharing
        variables.
        \nIn every location program, I just looked for a bunch of commands which seemed reasonable to me.
        Therefore, the game was just one big \"guess the command\". Fortunately, the commands were pretty basic
        IF stuff. Still, it was \Ubad\u. You could pick up objects again & again, getting the same messages...
        Well, I didn't know better."
    hint3
        "The second version of the game was written when I was 16. It was still in french, but this time it was
        made on my Amiga 500 using AMOS Basic, a great \"game creation utility\" which was more like a full
        language in its own right. It was the first time I did \"structured programming\" (if you don't count
        a couple tanks in Origin's \"Omega\").
        \nThis new version had cheap graphics (done by yours truly on Deluxe Paint III) and an improved parser.
        Now I'd isolate the verb from the rest of the command and handle the rest based on that verb."
    hint4
        "This latest version, the first in english, bears some significant differences between its ancestors,
        mostly because, well, I couldn't remember everything that well at first (hey, it's been almost a decade!)
        For the more curious of you all, here are the main changes to the game design:"
    hint5
        "- Your friend's desk contained a list of all the verbs used in the game (yeah, well, back in the
        days, these things \Iseemed\i to make sense...).
        \n\n- The trash can outside the house contained an old library card.
        \n\n- One of the locations was a \"Back Alley\", which had a heap of junk. Searching through that junk
        allowed you to find a broken calculator.
        \n\n- Giving a sandwich (now a hot dog) to the secretary (now the bank receptionist) would convince her
        to give you her letter opener (one of the wanted items).
        \n\n- Since I couldn't remember what the 5th item (the letter opener) was when I started working on the
        Hugo version of the game, I just asked around on ifMUD for a suitable object. Jennifer Earl mentioned
        the squash racket, and the new puzzle just made its way in."
}