# --- JACL INCLUDE FILE: verbs.library # Copyright (c) Stuart Allen 1990-2008. constant library_version 24 filter the filter a integer COUNTER integer INDEX integer TEMP integer RETURN_VALUE integer OXYGEN_LEFT integer direction synonym onto on synonym into in synonym inside in synonym using with synonym gentleman man synonym one 1 synonym two 2 synonym three 3 synonym four 4 synonym five 5 synonym six 6 synonym seven 7 synonym eight 8 synonym nine 9 synonym ten 10 synonym eleven 11 synonym twelve 12 synonym thirteen 13 synonym fourteen 14 synonym fifteen 15 synonym sixteen 16 synonym seventeen 17 synonym eighteen 18 synonym nineteen 19 synonym twenty 20 synonym taje take synonym taek take synonym all everything synonym speak talk synonym depress press synonym w west synonym e east synonym s south synonym se southeast synonym sw southwest synonym n north synonym ne northeast synonym nw northwest synonym u up synonym d down synonym l look synonym beneath under integer_array available_exits 12 0 string dir_command north south east west northeast northwest string dir_command southeast southwest up down in out grammar about >about {+about style note write game_title style normal write ", Copyright (c) " game_author "^" write "Release " game_release " / build " game_build write " / JACL verb.library version " library_version "^^" } grammar exits >exits {+exits execute "+calculate_exits" write "You can go " if INDEX = 0 write "nowhere!^" set time = false return true endif set COUNTER = 0 repeat if available_exits[COUNTER] != nowhere write dir_command[COUNTER] if available_exits[COUNTER] has KNOWN write " to " available_exits[COUNTER]{the} endif set INDEX - 1 execute +or_structure endif set COUNTER + 1 until COUNTER = 12 write .^ set time = false } {+calculate_exits # CLEAR ALL THE PREVIOUS AND AVAILABLE EXITS set COUNTER = 0 repeat set available_exits[COUNTER] = 0 set COUNTER + 1 until COUNTER = 12 # LOOP THROUGH ALL THE EXITS OF THE CURRENT LOCATION set COUNTER = 0 set INDEX = 0 repeat ifall here(COUNTER) != nowhere : +in_listshake_only {+shake_only write "Scared?^" set time = false } grammar shake *held >shake grammar wave *held >shake {+shake write "Consider it done.^" } grammar say xyzzy >xyzzy grammar xyzzy >xyzzy {+xyzzy set time = false if @+xyzzy != 1 write "~Go away. Leave us alone.~^" return true endif write "~That's the password, open the door.~^^" write "~Are you sure? I don't recognise the voice.~^^" write "~Don't argue, just open the door!~^^" write "A previously-invisible door swings open. Beyond the door you " write "see what you can only imagine to be God's workshop.^^" write "write ~Shit! I told you it wasn't him!" caret "~;^" write "set bouncer_1(panic) + 5;^" write "write ~Quick! Shut the door." caret "~;^" write "set poo(parent) = bouncer_2s_trousers;^" write "ensure magic_door has CLOSED;^" write "^The door shuts and disappears again. Something tells you it " write "is going to be one of those days...^" } grammar save $string >named_save {+named_save savegame INDEX $string if INDEX = true write "Game saved.^" endif set time = false } grammar restore $string >named_restore {+named_restore restoregame INDEX $string if INDEX = true write "Restored saved game.^^" ensure here hasnt VISITED execute "+display_location" endif set time = false } grammar save >save_game {+save_game savegame INDEX if INDEX = true write "Game saved.^" endif set time = false } grammar restore >restore_game {+restore_game restoregame INDEX if INDEX = true write "Restored saved game.^^" ensure here hasnt VISITED execute "+display_location" endif set time = false } grammar status on >status_on {+status_on if status_window = 1 write "The status window is already turned on.^" else set status_window = 1 write "Status window turned on.^" endif set time = false } grammar status off >status_off {+status_off if status_window = 0 write "The status window is already turned off.^" else set status_window = 0 write "Status window turned off.^" endif set time = false } grammar sound on >sound_on {+sound_on if sound_enabled = true write "Sound is already enabled.^" else set sound_enabled = true write "Sound enabled.^" endif set time = false } grammar sound off >sound_off {+sound_off if sound_enabled = false write "Sound is already disabled.^" else set sound_enabled = false write "Sound disabled.^" stop 0 stop 1 stop 2 stop 3 endif set time = false } grammar graphics on >graphics_on {+graphics_on if graphics_enabled = true write "Graphics are already enabled.^" else set graphics_enabled = true write "Graphics enabled.^" endif set time = false } grammar graphics off >graphics_off {+graphics_off if graphics_enabled = false write "Graphics are already disabled.^" else set graphics_enabled = false write "Graphics disabled.^" endif set time = false } grammar timer on >timer_on {+timer_on if timer_enabled = true write "The timer is already enabled.^" else set timer_enabled = true write "Timer enabled.^" endif set time = false } grammar timer off >timer_off {+timer_off if timer_enabled = false write "The timer is already disabled.^" else set timer_enabled = false write "Timer disabled.^" endif set time = false } grammar verbose >verbose {+verbose if display_mode = 1 write "Display mode already set to verbose.^" set time = false return true endif write "Display mode set to verbose.^^" set display_mode = 1 look set time = false } grammar brief >brief {+brief if display_mode = 0 write "Display mode already set to brief.^" set time = false return true endif write "Display mode set to brief.^" set display_mode = 0 set time = false } grammar help *present >help_other {+help_other write "How did you intend to help " noun1{the} ?^ } grammar hint *present >hint {+hint write "There is no specific hint available for " noun1{the} .^ set time = false } grammar hint >first_hint grammar hint 1 >first_hint {+first_hint write "There is no hint available specific to this location.^" set time = false } grammar hint 2 >second_hint {+second_hint write "There is no second hint available for this location.^" set time = false } grammar hint 3 >third_hint {+third_hint write "There is no third hint available for this location.^" set time = false } grammar hint 4 >fourth_hint {+fourth_hint write "There is a maximum of three hints for each location.^" set time = false } grammar help games >help_games {+help_games write "`GAMES' REFERS TO MODELS, SIMULATIONS AND GAMES WHICH HAVE TACTICAL " write "AND STRATEGIC APPLICATIONS.^" } grammar hug >hug_only grammar comfort >hug_only grammar cuddle >hug_only grammar console >hug_only {+hug_only if +get_animate != 0 proxy "hug " candidate{names} return endif write "Who did you want to hug?^" setstring question "hug " set time = false } grammar hug *present >hug grammar comfort *present >hug grammar cuddle *present >hug grammar console *present >hug {+hug if +importantkiss_only grammar pash >kiss_only grammar snog >kiss_only {+kiss_only if +get_animate != 0 proxy "kiss " candidate{names} return endif write "Who did you want to kiss?^" setstring question "kiss " set time = false } grammar kiss *present >kiss grammar pash *present >kiss grammar snog *present >kiss {+kiss if +importantdig_in grammar dig in *present >dig_in grammar dig up *present >dig_in grammar dig through *present >dig_in {+dig_in if +importantdig {+dig if here hasnt OUTDOORS print: You can't dig in here.^ . else print: There is no need to dig here.^ . endif set time = false } grammar pick >pick_only {+pick_only write "What did you want to pick?^" setstring question "pick " set time = false } grammar pick *present >pick_one {+pick_one if +get_dropable != 0 proxy "pick " noun1{the} " with " candidate{names} return endif write "What did you want to pick " noun1{the} " with?^" setstring question "pick " noun1{the} " with " set time = false } grammar pick *present with *held >pick_with {+pick_with if +importantrub grammar pat *present >rub {+rub if +importantrub_on {+rub_on if +importantrub_with {+rub_with if +importantlick grammar taste *present >lick {+lick if +importantpull grammar tug **present >pull {+pull if +importantcut grammar chop *present >cut grammar stab *present >cut {+cut write "What did you want to cut " noun1{the} " with?^" setstring question "cut " noun1{names} " with " set time = false } grammar cut *present with *held >cut_with grammar chop *present with *held >cut_with grammar stab *present with *held >cut_with {+cut_with if +importantpeel grammar skin *present >peel {+peel if +importantbreak grammar smash *present >break grammar crush *present >break grammar destroy *present >break grammar wreck *present >break grammar crack *present >break grammar tear **present >break grammar tear up **present >break grammar tear **present up >break grammar tear off **present >break grammar tear **present off >break grammar rip **present >break grammar rip up **present >break grammar rip **present up >break grammar rip off **present >break grammar rip **present off >break {+break if +importantclean grammar wash *present >clean grammar wipe *present >clean grammar scrub *present >clean grammar polish *present >clean {+clean if +importantclean_with grammar wipe *present with *held >clean_with grammar scrub *present with *held >clean_with grammar brush *present with *held >clean_with {+clean_with if +importantyell_at grammar scream at *present >yell_at {+yell_at write "Oooo, scary...^" } grammar yell >yell grammar scream >yell {+yell write "Your throat is now soar.^" } grammar pay *present >pay {+pay write "You can't pay " noun1{the} .^ } grammar order *anywhere >order grammar buy *anywhere >order {+order write "Your order appears to have fallen on deaf ears.^" } grammar knock on *present >knock_on grammar tap on *present >knock_on grammar tap *present >knock_on {+knock_on if +importantsmoke {+smoke if +importantplay grammar sound *present >play grammar ring *present >play {+play if +importantplay_with grammar sound *present with *held >play_with grammar ring *present with *held >play_with {+play_with if +importantpump {+pump if +importantempty grammar empty *here >empty {+empty proxy "take all from " noun1{names} } grammar extract **here with *held >take_with grammar get **here with *held >take_with grammar take **here with *held >take_with grammar hold **here with *held >take_with grammar remove **present with *held >take_with grammar empty **present with *held >take_with {+take_with proxy "fill " noun2{names} " with " noun1{names} } grammar fill *held from *present >fill_from {+fill_from if +importantfill_with {+fill_with if +importantfill {+fill if +importantstand grammar stand up >stand grammar get up >stand {+stand if player has SITTING write "Using your arms to push yourself up, you stand.^" ensure player hasnt SITTING return true endif write "You are already standing.^" } grammar sleep >sleep {+sleep write "There will be plenty of time for that later...^" set time = false } grammar lie on *present >lie_on grammar lie down on *present >lie_on grammar sleep on *present >lie_on grammar sleep in *present >lie_on {+lie_on if +importantsit grammar sit down >sit grammar squat >sit grammar squat down >sit {+sit set time = false if player has SITTING write "You are already sitting.^" return true endif if here has UNDER_WATER write "While underwater?^" return true endif if here has ON_WATER write "While in water?^" return true endif write "You plonk yourself down for a moment's rest.^" ensure player has SITTING } grammar sit *here >sit_on grammar sit on *here >sit_on grammar sit in *here >sit_on {+sit_on if +importantkick {+kick if +wornthrow grammar lob *held >throw grammar hurl *held >throw grammar pitch *held >throw grammar cast *held >throw {+throw if +move_scenerydrop_only grammar put down >drop_only {+drop_only if +get_dropable != 0 proxy "drop " candidate{names} return endif write "What did you want to drop?^" setstring question "drop " set time = false } grammar drop **held >drop grammar put **held down >drop grammar put down **held >drop {+drop if +move_scenerytake_only grammar hold >take_only grammar pick >take_only grammar pick >take_only grammar get >take_only {+take_only if +get_takeable != 0 proxy "take " candidate{names} return endif write "What did you want to take?^" setstring question "take " set time = false } grammar take **here >take grammar hold **here >take grammar pick up **here >take grammar pick **here up >take grammar get **here >take {+take if +important player(quantity) write "You are carrying too much to take " noun1{the} .^ set time = false return true endif if noun1 has LIQUID write noun1{The} " run" noun1{s} " through your fingers.^" return true endif override write "You take " noun1{the} .^ move noun1 to player ensure noun1 has TOUCHED } {+move_scenery if arg[0] has LOCATION write "That would be an impressive feat of strength.^" set time = false return true endif if arg[0](mass) => heavy set noun3 = noun1(parent) set INDEX = noun3 if noun3 has LOCATION write "You can't take " noun1{the} ".^" return true else write noun1{The} " " noun1{is} " attached to " noun3{the} .^ endif set time = false return true endif return false } grammar insert **held on *present >insert_on grammar put **held on *present >insert_on grammar place **held on *present >insert_on {+insert_on if +importantinsert_under grammar put **held under *present >insert_under grammar place **held under *present >insert_under {+insert_under if +importantinsert_in grammar put **held in *present >insert_in grammar place **held in *present >insert_in {+insert_in if +importantask_for grammar tell *present to give me **inside >ask_for {+ask_for if +can_talk player(quantity) write "With your current load you would be unable to accept" write noun2{the} .^ set time = false return true endif override move noun2 to player if noun2 has WORN write noun1{The} " remove" noun1{s} " " noun2{the} " then hand" noun1{s} if noun2 has PLURAL write " them" else write " it" endif write " to you.^" ensure noun2 hasnt WORN return true endif write noun1{The} " hands you " noun2{the} .^ } grammar tell *present about *anywhere >tell_about grammar talk to *present about *anywhere >tell_about grammar talk *present about *anywhere >tell_about grammar talk with *present about *anywhere >tell_about {+tell_about if +can_talkask_about {+ask_about if +can_talkgive_to grammar give *held to *present >give_to grammar give *held over to *present >give_to grammar pass *held to *present >give_to grammar pass *held up to *present >give_to grammar pass *held down to *present >give_to grammar pass *held over to *present >give_to grammar hand *held to *present >give_to grammar hand *held up to *present >give_to grammar hand *held down to *present >give_to grammar hand *held over to *present >give_to grammar heave *held to *present >give_to grammar heave *held up to *present >give_to grammar heave *held over to *present >give_to grammar lower *held down to *present >give_to {+give_to if noun2 hasnt ANIMATE write "You can't give " noun1{the} " to " noun2 .^ set time = false return true endif if noun2 = player write "I think it might be time to take a break and get a cup of " write "tea.^" return true endif if +reachmove grammar jiggle *present >move grammar move *present >move grammar push *present >move {+move if +importantread {+read if +importantlook_down {+look_down if +darkness = true return true endif if here has TIGHT_ROPE : here has MID_AIR write "You see the ground far below.^" return true endif if here has ON_WATER write "You can't see beyond the surface of the water.^" return true endif write "You take a moment to admire your investigating feet.^" } grammar look up >look_up {+look_up if +darkness = true return true endif override if here hasnt OUTDOORS write "You see nothing special.^" else write "You see just sky.^" endif } grammar look up *anywhere in *present >look_up_in grammar look for *anywhere in *present >look_up_in {+look_up_in if +importantconsult grammar consult *present re *anywhere >consult grammar consult *present on *anywhere >consult {+consult proxy "look up " noun2{names} " in " noun1{names} } grammar feel *present >feel grammar touch *present >feel {+feel if +reachsmell grammar sniff *present >smell {+smell if noun1 has ANIMATE write "I'm not so sure that would be polite.^" return true endif write "Smells an awful lot like " noun1{list} .^ } grammar taste *present >taste grammar lick *present >taste {+taste if +reachlook_in {+look_in if +importantexamine grammar look at *present >examine grammar l at *present >examine grammar look on *present >examine grammar examine *present >examine grammar x *present >examine grammar l *present >examine grammar search *present >examine grammar watch *present >examine {+examine if +importantlist_inventory grammar list >list_inventory {+list_inventory set INDEX = 0 loop ifall noun3(parent) = player : noun3(mass) != scenery set INDEX + 1 endif endloop if INDEX = 0 write "You are empty-handed.^" return true endif write "You are carrying:^" loop ifall noun3(parent) = player : noun3(mass) != scenery write " " noun3{list} execute +object_info if noun3 has CONTAINER : noun3 has SURFACE ifall noun3 hasnt CLOSED : +child_countinventory grammar inv >inventory {+inventory set INDEX = +child_count 1 write ", " endif if INDEX = 1 write " or " endif } {+list_structure if INDEX > 1 write ", " endif if INDEX = 1 write " and " endif } {+object_info if noun3 has WORN write " (being worn)" endif if noun3 has LUMINOUS write " (providing light)" endif if noun3 has ON write " (on)" endif ifall noun3 has CLOSABLE : noun3 hasnt CLOSED write " (open)" endif } grammar sorry >sorry {+sorry write "That's quite all right.^" } grammar thanks >thankyou grammar thank you >thankyou {+thankyou write "You're welcome.^" } grammar notify >notify {+notify if notify = false set notify = true write "Score notification set to on.^" else set notify = false write "Score notification set to off.^" endif set time = false } grammar notify on >notify_on {+notify_on set notify = true write "Score notification set to on.^" set time = false } grammar notify off >notify_off {+notify_off set notify = true write "Score notification set to off.^" set time = false } grammar score >score_command grammar points >score_command {+score_command execute "+score" } {+score set time = false if total_moves = 1 write "Your score is " score "% in 1 move.^" else write "Your score is " score "% in " total_moves " moves.^" endif } grammar open >open_only {+open_only write "What did you want to open?^" setstring question "open " set time = false } grammar open *present >open {+open if +importantclose_only grammar shut >close_only {+close_only write "What did you want to close?^" setstring question "close " set time = false } grammar close *present >close grammar shut *present >close {+close if +importantlock {+lock if +importantlock_with {+lock_with if +importantunlock_only {+unlock_only write "What did you want to unlock?^" setstring question "unlock " set time = false } grammar unlock *present >unlock {+unlock if +importantunlock_with grammar open *present with *held >unlock_with {+unlock_with if noun1 hasnt LOCKABLE write "You can't unlock " noun1{the} .^ set time = false return true endif if +reachshow {+show write "Who did you want to show " noun1{the} " to?^" setstring question "show " noun1{names} " to " set time = false } grammar show *held to *present >show_to {+show_to if +importantuntie_only grammar free >untie_only grammar undo >untie_only {+untie_only write "What did you want to untie?^" setstring question "untie " set time = false } grammar untie *present >untie grammar free *present >untie grammar undo *present >untie {+untie if +importanttie grammar attach *held >tie {+tie if +importantrepair grammar repair *present >repair {+repair if +importanttie_to grammar fix *held to *present >tie_to grammar attach *held to *present >tie_to {+tie_to if +importantattack grammar hit *present >attack grammar fight *present >attack grammar kill *present >attack grammar murder *present >attack grammar punch *present >attack {+attack if +importantattack_with grammar hit *present with *held >attack_with grammar fight *present with *held >attack_with grammar kill *present with *held >attack_with grammar murder *present with *held >attack_with grammar stab *present with *held >attack_with grammar poke *present with *held >attack_with {+attack_with if +importantwave {+wave write "You wave your arms around a bit.^" } grammar wave to *present >wave_to {+wave_to if +importantsalute {+salute print: You fire off one of your snappiest saltues.^ . } grammar salute *present >salute_at grammar salute at *present >salute_at grammar salute to *present >salute_at {+salute_at if +importantjump_on grammar jump on *here >jump_on grammar hop on *here >jump_on grammar stand on *here >jump_on {+jump_on if +importantjump_over {+jump_over if +importantjump {+jump if here has MID_AIR write "Not likely." return true endif if here has TIGHT_ROPE write "Something tells me that might be a bit too dangerous, not to " write "mention totally unnecessary.^" return true endif if here has UNDER_WATER : here has ON_WATER write "While underwater?^" return true endif if player has SITTING write "You would have to get up first.^" return true endif write "Consider it done.^" } grammar say yes >yes grammar yes >yes grammar okay >yes grammar yeah >yes {+yes write "That was a rhetorical question.^" set time = false } grammar say no >no grammar nah >no grammar no >no grammar no way >no {+no write "That was a rhetorical question.^" set time = false } grammar say yes to *present >say_yes grammar yes to *present >say_yes grammar say okay to *present >say_yes grammar say yeah to *present >say_yes grammar *present comma yes >say_yes grammar *present comma okay >say_yes grammar *present comma yeah >say_yes grammar *present comma okay >say_yes {+say_yes if +can_talksay_no grammar nah to *present >say_no grammar no to *present >say_no grammar no way to *present >say_no grammar *present comma no >say_no {+say_no if +can_talksay_object {+say_object if here has UNDER_WATER write "Talking under water isn't very easy.^" set time = false return true endif override write "You say, ~" noun1{the} ".~^" } grammar say *anywhere to *present >say_object_to {+say_object_to execute "+can_talkwhy grammar why? >why {+why write "Because.^" set time = false } grammar blow *held at *here >blow_at grammar blow *held to *here >blow_at {+blow_at if +importantpoint_at grammar aim *held at *here >point_at {+point_at if +importantthrow_at grammar hurl *held in *here >throw_at grammar pitch *held in *here >throw_at grammar cast *held in *here >throw_at grammar throw *held on *here >throw_at grammar hurl *held on *here >throw_at grammar pitch *held on *here >throw_at grammar cast *held on *here >throw_at grammar throw *held at *here >throw_at grammar throw *held to *here >throw_at grammar cast *held to *here >throw_at grammar cast *held at *here >throw_at grammar pitch *held to *here >throw_at grammar pitch *held at *here >throw_at grammar lob *held to *here >throw_at grammar lob *held at *here >throw_at grammar hurl *held to *here >throw_at grammar hurl *held at *here >throw_at {+throw_at if +important 20 write noun1{The} if noun1 has PLURAL write " are " else write " is " endif write "a bit too heavy to go throwing around.^" set time = false return true endif if here has UNDER_WATER write "Throwing things underwater is never as easy as you might " write "think.^" set time = false return true endif if here has ON_WATER write "You throw " noun1{the} " at " noun2{the} " which " if noun1 has PLURAL write "they bounce" else write "it bounces" endif write " off, landing in the water where " if noun1 has PLURAL write "they" else write "it" endif write " rapidly sink" noun1{s} ", disappearing from sight.^" move noun1 to limbo return true endif write noun1{The} " bounce" noun1{s} " off " noun2{the} " and land" noun1{s} write " on the ground.^" move noun1 to here } grammar remove **present >remove grammar take off **present >remove grammar doff **present >remove {+remove ifall noun1 hasnt WORN : noun1(parent) = player write "You are not wearing " noun1{the} .^ set time = false return true endif if noun1 hasnt WORN proxy "take " noun1{names} return true endif if noun1(mass) > player(quantity) write "You are carrying too much to remove " noun1{the} .^ set time = false return true endif override set player(quantity) - noun1(mass) ensure noun1 hasnt WORN write "You remove " noun1{the} .^ } grammar wear **present >wear grammar put on **present >wear grammar put **present on >wear grammar don **present >wear {+wear if +not_heldtalk_only grammar talk to >talk_only grammar talk with >talk_only {+talk_only if +get_animate != 0 proxy "talk to " candidate{names} return endif write "Who did you want to talk to?^" setstring question "talk to " set time = false } grammar talk *present >talk_to grammar talk to *present >talk_to grammar talk with *present >talk_to {+talk_to if +can_talkeat {+eat if +importanteat_only {+eat_only write "What did you want to eat?^" setstring question "eat " set time = false } grammar drink from *present >drink_from grammar sip from *present >drink_from {+drink_from if +importantdrink grammar sip *present >drink {+drink if +importantdrink_only {+drink_only write "What did you want to drink?^" setstring question "drink " set time = false } grammar flick **present >flick grammar flip **present >flick {+flick if +importantpress grammar poke **present >press {+press if +importantlight_with grammar burn *present with *held >light_with grammar ignite *present with *held >light_with grammar set fire to *present with *held >light_with {+light_with if here has UNDER_WATER write "I don't think you are going to be lighting anything under " write "water.^" set time = false return true endif if +reachset_to_integer grammar turn *present to $integer >set_to_integer {+set_to_integer if +importantset_to_integer_with grammar turn *present to $integer with *held >set_to_integer_with {+set_to_integer_with if +importantlight grammar light *present >light grammar ignite *present >light grammar set fire to *present >light {+light if here has UNDER_WATER write "I don't think you are going to be lighting anything under " write "water.^" set time = false return true endif if +reachextinguish grammar put out *present >extinguish {+extinguish if noun1 hasnt BURNING write noun1{The} " " noun1{is} " not lit.^" set time = false return true endif if +reach 11 write "ERROR: Unable to move in direction: " compass ".^" return endif set destination = here(compass) ifexecute here.movement # THE MOVE HAS BEEN STOPPED, JUST RETURN return endif ifexecute "+movement" # THE MOVE HAS BEEN STOPPED, JUST RETURN return endif if destination = 0 write "You can't go that way.^" set time = false else set from_location = here set player(parent) = destination execute "+display_location" set time = true endif } grammar swim >swim_only {+swim_only if here has UNDER_WATER : here has ON_WATER write "You must specify which direction you would like to swim in.^" set time = false return endif write "You can't swim here.^" set time = false } grammar swim west >swim_west {+swim_west if here has UNDER_WATER : here has ON_WATER execute "+travelwest grammar go west >west grammar walk west >west {+west if +sitting = true return true endif override execute "+travelswim_east {+swim_east if here has UNDER_WATER : here has ON_WATER execute "+traveleast grammar go east >east grammar walk east >east {+east if +sitting = true return true endif override execute "+travelswim_south {+swim_south if here has UNDER_WATER : here has ON_WATER execute "+travelsouth grammar go south >south grammar walk south >south {+south if +sitting = true return true endif override execute "+travelswim_southeast {+swim_southeast if here has UNDER_WATER : here has ON_WATER execute "+travelsoutheast grammar go southeast >southeast grammar walk southeast >southeast {+southeast if +sitting = true return true endif override execute "+travelswim_southwest {+swim_southwest if here has UNDER_WATER : here has ON_WATER execute "+travelsouthwest grammar go southwest >southwest grammar walk southwest >southwest {+southwest if +sitting = true return true endif override execute "+travelswim_north {+swim_north if here has UNDER_WATER : here has ON_WATER execute "+travelnorth grammar go north >north grammar walk north >north {+north if +sitting = true return true endif override execute "+travelswim_northeast {+swim_northeast if here has UNDER_WATER : here has ON_WATER execute "+travelnortheast grammar go northeast >northeast grammar walk northeast >northeast {+northeast if +sitting = true return true endif override execute "+travelswim_northwest {+swim_northwest if here has UNDER_WATER : here has ON_WATER execute "+travelnorthwest grammar go northwest >northwest grammar walk northwest >northwest {+northwest if +sitting = true return true endif override execute "+travelclimb_up grammar climb up *here >climb_up grammar walk up *here >climb_up grammar go up *here >climb_up {+climb_up write "You can not climb up " noun1{the} .^ set time = false } grammar climb down *here >climb_down grammar walk down *here >climb_down grammar go down *here >climb_down {+climb_down write "You can not climb down " noun1{the} .^ set time = false } grammar enter *present >enter grammar go through *present >enter grammar go in *present >enter grammar climb on *present >enter grammar climb in *present >enter grammar get in *present >enter grammar jump in *present >enter grammar get on *present >enter {+enter if +importantfollow {+follow if noun1 is *here write noun1{The} " is right here!^" set time = false return endif set INDEX = -1 # LOOP THROUGH ALL THE EXITS OF THE CURRENT LOCATION set COUNTER = 0 repeat if here(COUNTER) = noun1(parent) set INDEX = COUNTER endif set COUNTER + 1 until COUNTER = 12 if INDEX != -1 execute "+go_directiongo_back grammar back >go_back grammar return >go_back {+go_back if from_location != 0 proxy "go to " from_location{names} return true endif write "You need to go somewhere first!^" set time = false } grammar move to *location >go_to grammar walk to *location >go_to grammar go to *location >go_to grammar go *location >go_to {+go_to if noun1 = here write "You are already there!^" set time = false return endif dir_to INDEX here noun1 if INDEX = -1 write "You aren't sure which way to go.^" set time = false return endif write "] " style input write dir_command[INDEX] ^ style normal execute "+go_directionswim_in {+swim_in if here has UNDER_WATER : here has ON_WATER execute "+travelin grammar get in >in grammar climb in >in grammar in >in grammar enter >in grammar walk in >in {+in if +sitting = true return true endif override execute "+travelswim_out {+swim_out if here has UNDER_WATER : here has ON_WATER execute "+travelout grammar out >out grammar exit >out grammar leave >out grammar climb out >out grammar walk out >out grammar go out >out {+out if +sitting = true return true endif override execute "+travelswim_up grammar swim up >swim_up {+swim_up if here has UNDER_WATER : here has ON_WATER execute "+travelup grammar climb >up grammar climb up >up grammar jump up >up grammar go up >up grammar walk up >up {+up if +sitting = true return true endif override execute "+travelswim_down grammar dive down >swim_down grammar dive >swim_down {+swim_down if here has UNDER_WATER : here has ON_WATER execute "+traveldown grammar climb down >down grammar jump down >down grammar go down >down grammar walk down >down {+down if +sitting = true return true endif override execute "+travellook_around grammar look >look_around grammar ls >look_around grammar watch >look_around {+look_around ensure here hasnt VISITED execute "+display_location" set time = false } {+display_location if here has DARKNESS execute "+dark_description" return endif call "+title" if display_mode = true ensure here hasnt VISITED endif ifexecute "here.look" # THERE IS A LOCATION SPECIFIC LOOK FUNCTION, # NO NEED TO PERFORM THE DEFAULT ACTION else execute "+look" endif ensure here has KNOWN ensure here has VISITED ensure here has MAPPED execute "+object_descriptions" } {+object_descriptions loop ifall noun3(parent) = here : noun3(mass) < scenery : noun3 hasnt LOCATION write ^ noun3{long} endif endloop } {+dark_description print: It is too dark to see.^ endif } grammar look under *present >look_under grammar search under *present >look_under {+look_under if +important= heavy : noun1 has LOCATION write "You can't see under " noun1{the} .^ set time = false return true endif write "There is nothing unusual under " noun1{the} .^ } grammar look behind *present >look_behind grammar search behind *present >look_behind {+look_behind if +important= heavy : noun1 has LOCATION write "You can't see behind " noun1{the} .^ set time = false return true endif write "There is nothing unusual behind " noun1{the} .^ } grammar look through *present >look_through grammar look out *present >look_through {+look_through if +importantlook_through_at {+look_through_at proxy "look at " noun2{names} " through " noun1{names} } grammar look at *present through *held >look_at_through grammar look at *present with *held >look_at_through {+look_at_through if +importantwait grammar z >wait {+wait write "Time passes...^" } grammar listen >listen {+listen override write "You don't hear anything out of the ordinary.^" } grammar listen to *present >listen_to grammar listen at *present >listen_to {+listen_to write "You don't hear anything out of the ordinary.^" } grammar use *present >use grammar work *present >use grammar operate *present >use {+use if +importantturn grammar turn *present >turn grammar twist *present >turn grammar twiddle *present >turn grammar spin *present >turn {+turn if +importantturn_clockwise grammar turn *present clockwise >turn_clockwise grammar twist *present clockwise >turn_clockwise grammar twiddle *present clockwise >turn_clockwise grammar spin *present clockwise >turn_clockwise {+turn_clockwise if +importantturn_anticlockwise grammar turn *present anticlockwise >turn_anticlockwise grammar twist *present anticlockwise >turn_anticlockwise grammar twiddle *present anticlockwise >turn_anticlockwise grammar spin *present anticlockwise >turn_anticlockwise {+turn_anticlockwise if +importantturn_on grammar turn *present on >turn_on grammar switch on *present >turn_on grammar switch *present on >turn_on grammar start *present >turn_on {+turn_on if +reachturn_off grammar turn *present off >turn_off grammar shut down *present >turn_off grammar power down *present >turn_off grammar shut off *present >turn_off grammar power off *present >turn_off grammar switch off *present >turn_off grammar switch *present off >turn_off grammar stop *present >turn_off {+turn_off if +reachpour {+pour if +important player write "You don't have " noun1{the} .^ set time = false return true endif if +closedtype_on grammar key $string on *here >type_on grammar key $string in *here >type_on {+type_on if +importantlist_objs {+list_objs select noun3(mass) > 0 write noun3{The} next } grammar tip *present on *present >pour_on grammar tip *present down *present >pour_on grammar tip *present in *present >pour_on grammar tip *present over *present >pour_on grammar pour *present down *present >pour_on grammar pour *present on *present >pour_on grammar pour *present in *present >pour_on grammar pour *present over *present >pour_on {+pour_on if +important player write "You do not have " noun1{the} .^ set time = false return true endif if +closedblankjacl {+blankjacl write "A fiendishly clever move.^" set time = false } grammar instructions >instructions grammar help >instructions {+instructions print: Interactive fiction involves the reader in a way that static stories do not. Rather than reading sequentially from beginning to end, you control the actions of the main character by typing commands in the form of simple English sentences. Before setting out on your adventure there are a few concepts that must be explained in order for you to interact successfully with the virtual world created by the author.^^ The physical space that you will be exploring is divided up into discrete units called locations. Locations may be travelled between using the following commands:^^ . style preformatted print: ||n for north^ ||s for south^ ||e for east^ ||w for west^ ||ne for northeast^ ||nw for northwest^ ||se for southeast^ ||sw for southwest^ ||u for up^ ||d for down^^ . style normal print: The description of each location will tell you which way you can move from it. Be aware however that some exits may only be available under certain circumstances such as while a door is open or a bridge lowered.^^ Within these locations you will find many objects that you may manipulate. These objects may be referred to by as few or as many of their names as is required to uniquely identify it. For example, if the story informs you that ~There is a silver key resting here.~ Then it may be referred to as either ~silver~, ~key~ or ~silver key~. If your reference is ambiguous, such as using ~key~ when there is both a silver and a gold key in the current location then you will be prompted to be more specific.^^ The next major concept of interactive fiction to understand is the way in which you interact with these objects within the locations. The main aspect of the command interface to come to grips with is the scale, in other words, how much can be achieved with a single command. As you have seen earlier, moving from one location to another requires a single command. Commands such as ~find dave~ or ~go to the library~ are not valid. You must manually move around the available world to achieve these tasks yourself. For this reason, making a map as you go is highly recommended.^^ The basic sentence structures understood by the game are:^ . style preformatted print: action eg. scream ^ action object eg. take book ^ action object preposition object eg. unlock door with key ^^ . style normal print: An action does not necessarily have to be a single word. For instance, ~examine rock through magnifying glass~, an example of the last syntax, may also be expressed as ~look at rock through magnifying glass~.^^ To further illustrate how much can be achieved in a single turn, consider the following list (being just some of the valid actions):^^ . style preformatted print: turn read pull push eat cut^ lock unlock rub attack taste drink^ break smell listen pour move light^ attack blow throw wear open close^ take drop insert remove^^ . style normal print: The words ~it,~ ~them,~ ~him~ and ~her~ may be used to indicate the last appropriate object referred to in one of your commands. The words ~itself,~ ~themselves,~ ~himself~ and ~herself~ may be used to refer to the subject of the current command such as, ~ask dan about himself~.^^ The word ~all~ or ~everything~ may be used in place of an object when using one of the verbs in the bottom row of the table above.^^ However, a task such as defusing a bomb would generally not be achieved by typing ~defuse bomb~. The following is a sample transcript to give you a better idea of how this task such as this might be achieved.^^ . style preformatted print: > examine bomb^ The bomb is about a foot square and has a small panel in its upper surface. The panel is currently closed.^^ > listen to bomb^ The bomb is making an ominous ticking sound.^^ >open panel^ You open the panel to reveal a red wire, a green wire, a blue wire, a clock and some dynamite.^^ > i^ You are carrying a bomb manual, an insurance policy and some wire cutters.^^ > read manual^ Leafing through the book you come to the page on diffusing. Seems straight forward enough, just cut the blue wire then the red one.^^ > cut blue wire with cutters^ Reaching carefully in to the bomb's casing you cut the blue wire. So far so good.^^ > cut red wire with cutters^ Holding your breath you snip the red wire.^^ > listen to bomb^ . style normal print: The bomb, thankfully, is now silent.^^ As you can see, each task you wish to achieve must be broken down into its component actions.^^ During the course of the story you may encounter other computer controlled characters. These characters may be interacted with using the following commands:^^ . style preformatted print: ||talk to ^ ||give to ^ ||show to ^ ||ask for ^ ||ask about ^ ||tell about ^^ . style normal print: There are also some special commands for interacting with the program rather than the world it simulates:^^ . style preformatted print: ||Command Action^^ ||VERBOSE always describe locations ^ ||BRIEF only describe new locations ^ ||RESTART start from the beginning ^ ||SCORE display your score and rank ^ ||LOOK describe the current location ^ ||SAVE save the current position ^ ||RESTORE restore a saved position ^ ||I horizontal list of possessions ^ ||INV vertical list of possessions ^ ||UNDO take back last command ^ ||AGAIN repeat the last command ^ ||INFO display version information ^^ . style normal print: NOTE: If you are looking for a clue relevant to a specific location, type ~hint~, ~first hint~ or ~hint one~ in that location. The first hint will be a subtle clue with ~hint two~ being more blatant and ~hint three~ being exact commands to type.^^ You are now ready to embark on your first adventure into the world of interactive fiction. Remember to make a map as you go and read each part carefully as vital clues may be hidden in the descriptions of the locations and objects you come across. Examining every object you can refer to is a good idea, as is saving your position often. Well, good luck, and above all have fun!^ . set time = false } ; SPEAKING TO OTHER OBJECTS ; ---------------------------------------------------------------------------- ; Grammar statements beginning with an object must be defined last in the game ; to avoid confusion with verbs that may also be objects such as "drink drink" grammar *present comma press *present >tell_to_press grammar *present comma push *present >tell_to_press {+tell_to_press if +can_talkask_for grammar *present comma give *anywhere to myself >ask_for grammar *present comma give *anywhere to me >ask_for grammar *present comma tell me about *anywhere >ask_about grammar *present comma tell me all about *anywhere >ask_about grammar *present comma what do you know about *anwhere >ask_about grammar *present comma who are you >who? grammar *present comma what is your name >who? grammar *present comma what is your name? >who? {+who? if +can_talkapologise grammar *present comma im sorry >apologise grammar *present comma i am sorry >apologise grammar apologise to *present >apologise {+apologise if +can_talkthank grammar *present comma thank you >thank grammar thank *present >thank {+thank if +can_talkgreet grammar hello *present >greet grammar greet *present >greet grammar *present comma hello >greet grammar *present comma hello sailor >greet grammar *present comma hi there >greet grammar *present comma dr >greet grammar *present comma doctor >greet grammar *present comma hi >greet {+greet if +can_talkobject_object {+object_object if +can_talknoun_only grammar *anywhere >noun_only {+noun_only ifstring question != "none" addstring question noun1{names} proxy question return else if noun1 has LOCATION write "] " style input write "go to " noun1{the} ^ style normal proxy "go to " noun1{names} return endif if noun1 isnt *present write "You can't see " noun1{the} " here.^" set time = false return endif ifall noun1 has ANIMATE : noun1 hasnt DEAD write "] " style input write "talk to " noun1{the} ^ style normal proxy "talk to " noun1{names} return endif ifall noun1(mass) < heavy noun1 : hasnt OUT_OF_REACH : noun1 isnt *held write "] " style input write "take " noun1{the} ^ style normal proxy "take " noun1{names} return endif write "] " style input write "examine " noun1{the} ^ style normal proxy "examine " noun1{names} return endif write "There is no verb in that sentence.^" set time = false } {+system_eachturn setstring question "none" } integer candidate {+get_animate set INDEX = 0 set candidate = 0 loop noun3 ifall noun3 has ANIMATE : noun3 is *present : noun3 != player set candidate = noun3 set INDEX + 1 endif endloop if INDEX = 1 return candidate else return 0 endif } {+get_inanimate set INDEX = 0 set candidate = 0 loop noun3 ifall noun3 hasnt ANIMATE : noun3 is *present : noun3(mass) != scenery set candidate = noun3 set INDEX + 1 endif endloop if INDEX = 1 return candidate else return 0 endif } {+get_takeable set INDEX = 0 set candidate = 0 loop noun3 ifall noun3 is *present : noun3(mass) < heavy : noun3 isnt *held set candidate = noun3 set INDEX + 1 endif endloop if INDEX = 1 return candidate else return 0 endif } {+get_dropable set INDEX = 0 set candidate = 0 loop noun3 ifall noun3 is *held : noun3(mass) < heavy set candidate = noun3 set INDEX + 1 endif endloop if INDEX = 1 return candidate else return 0 endif }