-- skipbrek.ala -- source code for "Skipping Breakfast" - a short text adventure -- game written using ALAN v2.8. -- Copyright, 1999, Stephen Griffiths -- stephen.griffiths@xtra.co.nz -- Version 1.0 - February 1999 - Written for WackyComp 'competition' -- Version 2.0 - June 1999 - added score change notification -- - made hints 'adaptive' -- - source code tidy-up etc -- skipbrek used what was then the current version (0.1) of the -- Alan standard library -- Copies of the library files (with filename extension .i) - some of -- which I modified for this game - are included in the PKzip file containing -- this skipbrek.ala file -- (There should also be a hint.ala, containing the game hints which is -- "$included" via the help.i file.) $INCLUDE 'std.i' LOCATION forest_clearing NAME Moonlit Forest Clearing DESCRIPTION "$tThe clearing is dominated by a high rock wall which forms the eastern edge of the clearing. Thick undergrowth surrounds the clearing in other directions except for two small paths which wend their way through the undergrowth to the west and south. " IF hero IS tied THEN "$iYou are tied to a tree on the edge of the clearing by an extravagant number of encircling curls of a long rope." ELSE "$iThere is a large tree on the edge of the clearing." IF hero is on_tree THEN "You are clinging to a tenuous hold part way up the trunk of the tree." END IF. IF rope IS on_tree THEN "A rope is tied to the tree" IF hero is on_tree THEN "at the point where you are clinging" END IF. "$$." ELSIF rope IS tied THEN "$iOne end of a rope is coiled around a rock outcrop at the top of the cliff. The other end of the rope dangles down to the base of the cliff." ELSIF rope NOT IN inventory THEN "$iA long rope curled into a tidy coil lies on the ground." END IF. END IF. IF stones IS NOT moved THEN "$iIn the centre of the clearing you can see a circle of large stones." ELSE IF stones IS in_pile THEN "$iThere is a pile of large stones" IF placement OF stones = "tree" THEN "under the tree." ELSIF placement OF stones = "cliff" THEN "below the cliff." ELSE "here." END IF. IF hero IS on_stones THEN "You are currently standing on the stones." END IF. ELSE "$iThere is a number of large stones scattered about the clearing." END IF. END IF. IF firewood HERE AND firewood NOT IN inventory THEN "There is a small pile of firewood here." END IF. EXIT south,west TO forest_clearing CHECK IF hero IS tied THEN "$tYou try but you can hardly move a muscle let alone walk out of the clearing." ELSIF hero IS on_tree THEN "You'll have to climb down the tree first." ELSIF hero IS on_stones THEN "You'll have to get off the stones first." ELSIF rope IS tied THEN "$t""No! Please don't go without me!"" The rope calls." IF hero IS NOT tried_leaving THEN "$iHis plaintive cry stops you leaving." MAKE hero tried_leaving. ELSE "$iLike a striking snake the rope uncoils. In a flash it's untied end has rushed across the ground wrapped around your ankles and dragged you back" IF rope IS on_tree THEN "towards the tree." ELSE "into the clearing." END IF. "$i""Sorry about that."" says the rope, ""But I really don't want you to leave me here with that grumpy wolf."" $iThen it releases you and" IF rope IS on_tree THEN "tidily coils up again at the foot of the tree." ELSE "simply hangs down quietly from its tied end like you'd expect a rope should." END IF. END IF. ELSE "$tThe rope quickly coils itself around your ankles and trips you up." IF rope IS NOT told_about_forest THEN "$i""No, don't go into the forest!"" It says, ""The wolf will catch you in there.""" MAKE rope told_about_forest. ELSE "$i""You are stubborn, aren't you? I told you not to go into the forest!"" The rope scolds, ""Its for your own good you know. The wolf will catch you in there.""" END IF. "$iThen it just as quickly releases you and lets you get to your feet again." END IF. END EXIT. EXIT east TO forest_clearing CHECK IF hero IS tied THEN "$tYou try but you can hardly move a muscle let alone walk out of the clearing." ELSIF hero IS on_tree THEN "You'll have to climb down the tree first." ELSIF hero IS on_stones THEN "You'll have to get off the stones first." ELSE "The rock wall blocks you from going that way." END IF. END EXIT. EXIT up TO forest_clearing CHECK "You can't fly up like a bird. (You're only a rabbit after all.) If you want to climb up something please specify what it is you wish to climb, eg $i> climb tree" END EXIT. EXIT down TO forest_clearing CHECK IF hero IS on_tree THEN MAKE hero NOT on_tree. "You climb back down" IF hero IS on_stones THEN "onto the pile of stones." ELSE "the tree." END IF. ELSIF hero IS on_stones THEN "You get off the pile of stones." MAKE hero NOT on_stones. ELSE "You can't go down." END IF. END EXIT. EXIT north, northeast, southeast, southwest,northwest TO forest_clearing CHECK IF hero IS tied THEN "$tYou try but you can hardly move a muscle let alone walk out of the clearing." ELSIF hero IS on_tree THEN "You'll have to climb down the tree first." ELSIF hero IS on_stones THEN "You'll have to get off the stones first." ELSE "$tThe forest undergrowth is too thick to push your way through. The only gaps in the dense foliage are the paths to the south and west (and the cliff to the east of course.)" END IF. END EXIT. END LOCATION forest_clearing. -----------------Verbs----------------------------- SYNTAX climb_alone = climb. climb = climb (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't climb that." climb_onto = climb onto (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't climb that." climb_down_alone = climb down. climb_down = climb down (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't climb that." VERB climb_alone DOES "You need to say what you want to climb $pExample: $n$t> climb tree" END VERB. VERB Climb CHECK firewood NOT IN inventory ELSE "You can't climb anything with your hands full of that bulky pile of firewood." AND hero IS NOT tied ELSE "You're tied so tightly you can hardly breathe. You certainly can't climb anything." DOES "You can't climb the $o" END VERB. VERB climb_down_alone DOES IF hero IS on_tree THEN "You climb back down." MAKE hero NOT on_tree. ELSIF hero IS on_stones THEN "You get off the pile of stones." MAKE hero NOT on_stones. ELSE "You can't go down." END IF. END VERB. VERB climb_down DOES "You can't climb down the $o." END VERB. ---- VERB pull DOES "You can't pull the $o." END VERB. ---- SYNTAX get_out = get out. get_out_of = get out 'of' (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "How could you have got IN that?" get_on = get 'on' (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't get on that." stand_on = stand 'on' (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't stand on that." VERB get_out DOES IF hero IS tied THEN "The rope is holding you too tightly. You can't wriggle free." ELSE "Its not that easy to leave here." END IF. END VERB. VERB get_out_of DOES IF obj = rope OR obj = clearing THEN IF hero IS tied THEN "The rope is holding you too tightly. You can't wriggle free." ELSE IF obj = clearing THEN "Its not that easy to leave here." ELSE "The rope is not holding you anymore." END IF. END IF. ELSE "You're not 'in' that!" END IF. END VERB. VERB get_on DOES "You can't get on the $o." END VERB. VERB stand_on DOES "You can't stand on the $o." END VERB. ---- SYNTAX wriggle = wriggle. SYNONYMS twist, squirm = wriggle. VERB wriggle DOES IF hero IS tied THEN "The rope is holding you too tightly. You can't wriggle free." ELSE "This is no time to dance!" END IF. END VERB. ---- SYNTAX jump = jump. SYNONYMS leap = jump. VERB jump DOES IF hero IS tied THEN "The rope is holding you too tightly." ELSIF hero IS on_tree OR hero IS on_stones THEN "You jump back down to the ground." MAKE hero NOT on_tree. MAKE hero NOT on_stones. ELSE "While $v$$ing around relieves your nervousness a little, it isn't any other help." END IF. END VERB. ---- SYNTAX hop = hop. SYNONYMS skip, run = hop. VERB hop DOES IF hero IS tied THEN "The rope is holding you too tightly." ELSE "Even you can't $v fast enough to help your escape." END IF. END VERB. ---- SYNTAX escape = escape. VERB escape DOES IF hero IS tied THEN "As hard as you try, you cannot escape from the rope." ELSE "Yes exactly, but how?" END IF. END VERB. ---- SYNONYMS okay = ok. SYNTAX ok_verb = ok. yes_verb = yes. VERB ok_verb, yes_verb DOES IF rope IS dealing THEN SCHEDULE deal_done AFTER 0. ELSE "No-one's asking any questions at the moment." END IF. END VERB. ---- DEFAULT ATTRIBUTES NOT tieable. SYNONYMS release, unknot = untie. SYNTAX untie = untie (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't untie that." SYNTAX undo_obj = undo (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't untie that." VERB untie, undo_obj DOES "You can't untie that." END VERB. SYNTAX tie_alone = tie (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't tie that." VERB tie_alone DOES "You need to say what you want to tie that to $pExample: $n$t> tie to " END VERB. SYNTAX tie = tie (obj1) 'to' (obj2) WHERE obj1 ISA OBJECT OR ACTOR ELSE "You can't tie that." AND obj2 ISA OBJECT OR ACTOR ELSE "You can't tie that." VERB tie CHECK obj1 IS tieable ELSE "You can't tie that to anything." END VERB tie. ---- SYNONYMS move = roll. VERB roll CHECK hero IS NOT tied ELSE "You're all tied up so you can't do that." AND object IS takeable ELSE "You can't $v that." DOES "You decide there's no point to that." END VERB. SYNONYMS below = under. SYNTAX roll_to = roll (obj1) 'to' (obj2). roll_under = roll (obj1) under (obj2). VERB roll_to, roll_under CHECK hero IS NOT tied ELSE "You're all tied up so you can't do that." AND obj1 IS takeable ELSE "You can't $v that." DOES "You decide there's no point to that." END VERB. ---- SYNTAX throw_over = throw (obj1) over (obj2) WHERE obj1 ISA OBJECT OR ACTOR ELSE "You can't throw that anyway." AND obj2 ISA OBJECT OR ACTOR ELSE "You throw anything over that." VERB throw_over CHECK hero IS NOT tied ELSE "You're all tied up so you can't do that." AND obj1 IN inventory ELSE "You don't have that." DOES "You throw the $1 as hard as can which is not very hard. It falls to the ground nearby." LOCATE obj1 HERE. END VERB throw_over. ---- SYNONYMS plugh = xyzzy. SYNTAX xyzzy = xyzzy. VERB xyzzy DOES "$tNope. Doesn't help." END VERB. ---- SYNTAX tell_rope_untie = tell (obj) 'to' untie (act) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't talk to that." AND act ISA OBJECT OR ACTOR ELSE "That doesn't make sense." ask_rope_untie = ask (obj) 'to' untie (act) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't talk to that." AND act ISA OBJECT OR ACTOR ELSE "That doesn't make sense." VERB tell_rope_untie, ask_rope_untie CHECK obj = rope ELSE "The" SAY obj. "doesn't respond." AND act = hero ELSE "That's not tied up." AND hero IS tied ELSE "You're not tied up anymore!" DOES IF rope IS dealing THEN "$i""Well I'll release you if you agree to untie me. OK?""" CANCEL rope_not_dealing. SCHEDULE rope_not_dealing AFTER 1. ELSE SCHEDULE rope_speech AFTER 0. END IF. END VERB. -----------------Objects----------------------------- OBJECT ok_object NAME ok IS NOT takeable. DESCRIPTION VERB sayword DOES ONLY IF rope IS dealing THEN SCHEDULE deal_done AFTER 0. ELSE "No-one's asking any questions at the moment." END IF. END VERB. END OBJECT. OBJECT yes_object NAME yes IS NOT takeable. DESCRIPTION VERB sayword DOES ONLY IF rope IS dealing THEN SCHEDULE deal_done AFTER 0. ELSE "No-one's asking any questions at the moment." END IF. END VERB. END OBJECT. OBJECT no_object NAME no IS NOT takeable. DESCRIPTION VERB sayword DOES ONLY IF rope IS dealing THEN """Well, its your decision, cotton-tail.""" ELSE "No-one's asking any questions at the moment." END IF. END VERB. END OBJECT. ---- -- abstract objects for conversation topic OBJECT breakfast IS NOT takeable. DESCRIPTION END OBJECT. SYNONYMS hi = hello. OBJECT hello IS NOT takeable. DESCRIPTION END OBJECT. ---- OBJECT ground AT forest_clearing IS NOT takeable. DESCRIPTION END OBJECT. ---- OBJECT clearing AT forest_clearing IS NOT takeable. DESCRIPTION VERB examine, look_at DOES ONLY LOOK. END VERB. END OBJECT. ---- OBJECT moon AT forest_clearing IS NOT takeable. DESCRIPTION VERB examine, look_at DOES ONLY "$tThe full moon is illuminating your predicament. It is slowly starting to fade as the approaching day begins to brighten the eastern sky above the cliff." END VERB. END OBJECT. ---- SYNONYMS cliff = wall. OBJECT wall NAME rock wall AT forest_clearing IS NOT takeable. IS climbable. DESCRIPTION VERB examine, look_at DOES ONLY "$tThe $o is many times your own height. There are a variety of possible climbing holds amongst the cracks, ledges and outcrops spread about the cliff. However they are too far apart to enable a creature as small as you to clamber up the $o. Right near the top of the $o is a particularly large rock outcrop which protrudes from the surrounding rock like a cheeky tongue." IF rope IS tied AND rope IS NOT on_tree THEN "One end of a long rope is wrapped around the outcrop. The other end dangles to the ground at the base of the $o" END IF. IF hint_3_4 IS NOT shown THEN MAKE hint_3_4 stale. -- "x cliff" END IF. END VERB. VERB climb DOES ONLY IF hero IS on_stones AND placement OF stones NOT = "cliff" THEN "You'll have to get off the stones first." ELSIF hero IS on_tree THEN "You'll have to climb down the tree first." ELSE "$tThe cliff offers a few tantalising footholds but they are too far apart to be of use to you. After a few moments of effort you give up trying to climb the cliff." END IF. END VERB. END OBJECT. ---- SYNONYMS gantry, tongue = outcrop. OBJECT outcrop NAME outcrop NAME protruding rock AT forest_clearing IS NOT takeable. DESCRIPTION VERB examine, look_at DOES ONLY "$tThe outcrop is right near the top of the cliff. It protrudes a couple of feet from the surrounding rock and is about eight inches across. It looks strong enough to hold considerable weight." IF rope IS tied AND rope IS NOT on_tree THEN "One end of a long rope is wrapped around the outcrop. The other end dangles to the ground at the base of the $o" END IF. IF hint_3_4 IS NOT shown THEN MAKE hint_3_4 stale. -- "x cliff" END IF. END VERB. END OBJECT outcrop. ---- SYNONYMS trunk = tree. OBJECT tree AT forest_clearing IS NOT takeable. IS climbable. DESCRIPTION VERB examine, look_at DOES ONLY "$tThe tree is old and gnarled with a few humps and lumps in the lower part of the trunk which could be used to climb part way up the tree." IF rope IS tied AND rope IS on_tree THEN "One end of a long rope is tied around the tree trunk at a height some distance above your head." END IF. END VERB. VERB climb DOES ONLY IF hero IS NOT on_tree THEN "$tThere are a few humps and lumps in the tree trunk so you are able to climb a little way up the tree." IF rope IS on_tree THEN "Almost to where the rope is tied to the trunk but no further." END IF. MAKE hero on_tree. ELSE "You can't climb any higher." END IF. END VERB. VERB climb_down DOES ONLY IF hero IS on_tree THEN MAKE hero NOT on_tree. "You climb back down" IF hero IS on_stones THEN "onto the pile of stones." ELSE "the tree." END IF. ELSE "You can't climb down the tree because you're not up it!" END IF. END VERB. END OBJECT tree. ---- SYNONYMS forest,woods = trees. OBJECT trees AT forest_clearing IS NOT takeable. DESCRIPTION VERB examine, look_at DOES ONLY "$tThick undergrowth surrounds the clearing. Beyond that undergrowth you can make out the shadowy form of a forest of many large trees. There is one tree right on the edge of the clearing which is not surrounded by undergrowth." IF hero IS tied THEN "You are currently tied to it." ELSIF rope IS on_tree THEN "A rope is currently tied to it." END IF. END VERB. END OBJECT. ---- SYNONYMS growth, foliage = undergrowth. OBJECT undergrowth AT forest_clearing IS NOT takeable. DESCRIPTION VERB examine, look_at DOES ONLY "$tThick undergrowth surrounds the edge of the clearing making the trees beyond inaccessible except for one tree which is growing right on the edge of the clearing." IF hero IS tied THEN "You are currently tied to it." ELSIF rope IS on_tree THEN "A rope is currently tied to it." END IF. END VERB. END OBJECT. ---- SYNONYMS stone = stones. OBJECT stones AT forest_clearing IS climbable. IS NOT moved. IS NOT in_pile. HAS placement "". ARTICLE "some" DESCRIPTION VERB examine, look_at DOES ONLY IF hero IS tied THEN "$tThe circle of large round stones in the middle of the clearing is probably used as a campfire but you can't see any more detail while you're tied to the tree on the edge of the clearing." ELSE IF stones IS NOT moved THEN "$tThe large round stones form a circle around the embers of a campfire." ELSE IF stones IS NOT in_pile THEN "$tYou've spread the stones about the clearing." ELSE "$tThe stones lie in a pile" IF placement OF stones = "tree" THEN "under the tree." ELSIF placement OF stones = "cliff" THEN "below the cliff." ELSE "near the campfire." END IF. END IF. END IF. END IF. END VERB. VERB take, get DOES ONLY "$tThe stones are too big for you to lift very far. You could roll them across the ground but you certainly couldn't pick them up." END VERB. VERB roll CHECK hero IS NOT on_stones ELSE "You can't $v the stones while you're standing on them." DOES ONLY MAKE stones moved. "$tYou $v the stones about for awhile. The stones are now spread around the clearing." IF stones IS in_pile THEN MAKE stones NOT in_pile. SET placement OF stones TO "". END IF. END VERB. VERB roll_to, roll_under WHEN obj1 CHECK hero IS NOT on_stones ELSE "You can't $v the stones while you're standing on them." DOES ONLY MAKE stones moved. IF obj2 = tree THEN IF placement OF stones NOT = "tree" THEN MAKE stones in_pile. SET placement OF stones TO "tree". "You roll the stones into a pile under the tree." ELSE "The stones are already piled under the tree." END IF. ELSIF obj2 = wall THEN IF placement OF stones NOT = "cliff" THEN MAKE stones in_pile. SET placement OF stones TO "cliff". "You roll the stones into a pile below the cliff." ELSE "The stones are already piled under the cliff." END IF. ELSE "You roll the stones to the " SAY obj2."$$." SET placement OF stones TO "". END IF. END VERB. VERB climb, climb_onto, get_on, stand_on CHECK hero IS NOT on_tree ELSE "You'll have to climb down the tree before getting on the stones." AND hero IS NOT on_stones ELSE "You're already on the stones." DOES ONLY IF stones IS in_pile THEN MAKE hero on_stones. "You clamber up onto the pile of stones." ELSE "There's not much point getting on the stones when they're placed where they are currently." END IF. IF hint_2_3 IS NOT shown THEN MAKE hint_2_3 stale. -- "stand on stones" END IF. END VERB climb. VERB climb_down DOES ONLY IF hero IS on_stones THEN IF hero IS on_tree THEN "You'll have to get down the tree first." ELSE "You get off the pile of stones." MAKE hero NOT on_stones. END IF. ELSE "You can't climb down off the stones because you're not on them!" END IF. END VERB. END OBJECT stones. ---- SYNONYMS wood = firewood. OBJECT firewood IS takeable. ARTICLE "some" DESCRIPTION VERB climb, get_on, stand_on DOES ONLY "$tThe firewood is an unstable pile. You lose your balance and tumble down." END VERB climb. VERB examine, look_at DOES ONLY "$tThe pile of firewood is quite small, fortunately. If it was bigger you'd probably already be slowly roasting on top of it." END VERB. VERB put_near, put_behind, put_on, put_under DOES ONLY LOCATE obj1 AT obj2. IF obj2 = tree THEN "You put the firewood under the tree." ELSIF obj2 = wall THEN "You put the firewood at the base of the cliff." ELSIF obj2 = stones THEN "You put the firewood by the stones." ELSE "You put the firewood on the ground." END IF. END VERB. VERB roll_to, roll_under WHEN obj1 CHECK hero IS NOT on_stones ELSE "You can't $v the firewood while you're standing on the stones." DOES ONLY "You $v the firewood to the " SAY obj2."$$." END VERB. END OBJECT. ---- SYNONYMS fire, campfire, ashes = embers. OBJECT embers AT forest_clearing ARTICLE "some" DESCRIPTION IF stones IS NOT moved THEN "" ELSE "The embers of a campfire are in the centre of the clearing." END IF. VERB examine, look_at DOES ONLY IF hero IS NOT tied THEN "$tThe ashes and embers are as you'd expect to see in a campfire." LOCATE bones AT forest_clearing. "Amongst the embers there are some charred bones." ELSE "You can't see any more detail while you're tied to the tree on the edge of the clearing." END IF. END VERB. VERB take, get, pick_up1, pick_up2 DOES ONLY "You can't bring yourself to touch the remains of a campfire that probably contains the remains of some of your relatives." END VERB. END OBJECT. ---- OBJECT bones ARTICLE "some" DESCRIPTION VERB examine, look_at DOES ONLY "$tThe bones definitely appear to be ex-rabbit." END VERB. VERB take, get, pick_up1, pick_up2 DOES ONLY "$tYou can't bring yourself to touch bones that may be the last remains of some of your lost relatives. Maybe you and your family can come back some time when its safe and arrange a dignified burial for your relatives." END VERB. END OBJECT. ---- SYNONYMS knot = rope. OBJECT rope AT forest_clearing IS tied. IS tieable. IS on_tree. IS NOT dealing. IS climbable. IS edible. IS NOT named. IS NOT examined. IS can_talk. IS NOT told_about_forest. -- blank desc. coz rope described in clearing's description DESCRIPTION VERB examine, look_at DOES ONLY IF hint_1_2 IS NOT shown THEN MAKE hint_1_2 stale. -- "x rope" END IF. IF hero IS tied THEN "$tThe rope is wound tightly in many turns around you. You can see one, unknotted, end of the rope in front of you. The other end is knotted to the tree trunk high above your head." ELSE IF rope IS tied THEN IF hero IS on_stones THEN "$tOne end of the rope is tied just above the height of your head." ELSE "$tOne end of the rope is tied high above your head." END IF. "The other end tangles to the ground" IF rope IS on_tree THEN "at the foot of the tree." ELSE "at the base of the cliff." END IF. ELSE IF rope IN inventory THEN "You are carrying the long coiled rope." ELSE "The rope is lying, tidily coiled, on the ground." END IF. END IF. END IF. IF rope is NOT examined THEN "The rope is looking back at you." MAKE rope examined. ELSIF rope is NOT named THEN "The rope seems to be wondering if it should talk to you." END IF. END VERB. VERB ask, tell, talkto WHEN act DOES ONLY SCHEDULE rope_speech AFTER 0. END VERB. VERB sayto DOES ONLY IF obj = ok_object OR obj = yes_object THEN IF rope IS dealing THEN SCHEDULE deal_done AFTER 0. ELSE """Huh?"" the rope sounds puzzled. ""I didn't just ask a question.""" END IF. ELSIF obj = no_object THEN IF rope IS dealing THEN """Well its your decision, cotton-tail.""" ELSE """Huh?"" the rope sounds puzzled. ""I didn't just ask a question.""" END IF. ELSE SCHEDULE rope_speech AFTER 0. END IF. END VERB. VERB talkabout WHEN act DOES ONLY SCHEDULE rope_speech AFTER 0. END VERB. VERB talkto_alone WHEN act DOES ONLY SCHEDULE rope_speech AFTER 0. END VERB. VERB pull DOES ONLY IF hero IS tied THEN "You're all tied up. You can't pull the rope." ELSE "Pulling the $o doesn't achieve anything." END IF. END VERB. VERB eat DOES ONLY "The rope yelps as you bite into it but, other than that, nothing happens. Except that your teeth now hurt - that is one strong rope!" IF rope IS NOT examined THEN "Hmmm, the rope yelped?" END IF. END VERB. VERB untie, undo_obj DOES ONLY IF rope IS tied THEN IF rope IS on_tree THEN IF hero IS on_stones AND hero IS NOT on_tree AND placement OF stones = "tree" THEN "$tYou untie the knot holding the rope to the tree. The rope falls to the ground and curls itself into a tidy coil while you clamber down from the pile of stones." MAKE rope NOT tied. MAKE rope NOT on_tree. MAKE hero NOT on_stones. SET points OF hero TO 2. SET hints_seen OF hero to 0. ELSIF hero IS on_tree THEN "$tYou find you need both hands to untie the knot so you can't maintain your grip on the tree. You tumble to the ground and the rope remains tied to the tree." MAKE hero NOT on_tree. MAKE hero NOT on_stones. ELSE "You can't reach the knot." END IF. ELSE "$tYou can't release the rope from the rock at the top of the cliff while you're still at the bottom." END IF. ELSE "The rope isn't tied to anything." END IF. END VERB. VERB tie DOES ONLY IF rope IS tied THEN "The rope is already tied." ELSE "You don't need to tie the rope to anything." END IF. END VERB. VERB climb DOES ONLY IF rope IS tied THEN IF rope IS on_tree THEN IF hero is NOT on_tree THEN IF hero IS on_stones AND placement OF stones NOT = "tree" THEN "You'll have to get off the stones first." ELSE "$tYou drag yourself up the rope until you reach where it is knotted to the trunk of the tree." MAKE hero on_tree. END IF. ELSE "You are up as high as you can go." END IF. ELSE -- (ie: rope is tied to cliff) IF hero is NOT on_tree THEN IF hero IS on_stones AND placement OF stones NOT = "cliff" THEN "You'll have to get off the stones first." ELSE SET points OF hero TO 3. "$tYou drag yourself up the rope until you reach the top of the cliff and with a final breathless effort you struggle over the rock outcrop onto solid, safe ground. $iAfter collecting your fibrous life-saver you skip off in the direction of the rising sun and your home feeling proud to be the new owner of the world's strongest rope but mostly just feeling glad to be alive. $pYou have won the game with a score of" "3 points out of 3 in" SAY Turns OF Hero. "turn" IF turns OF hero <> 1 THEN "$$s" END IF. "giving you a rank of cotton-tailed, still-alive-rabbit." QUIT. END IF. ELSE "You'll have to climb down the tree before you can climb the rope." END IF. END IF. ELSE "The rope is not hanging from anything at the moment so you cannot climb it." END IF. END VERB climb. VERB climb_down DOES ONLY IF hero IS on_tree THEN MAKE hero NOT on_tree. "You climb back down" IF hero IS on_stones THEN "onto the pile of stones." ELSE "the rope." END IF. ELSE "You can't climb down the rope because you're not up it!" END IF. END VERB. VERB get, take, pick_up1, pick_up2 CHECK rope IS NOT tied ELSE "You can't take the rope while it is tied to something." AND hero IS NOT on_stones ELSE "You'll have to get off the stones first." AND hero IS NOT on_tree ELSE "You'll have to climb down the tree first." END VERB. VERB throw_over, throw_at, throw_up WHEN obj1 DOES ONLY IF obj2 = outcrop THEN "$tYou heave the rope with all your might up the cliff. The rope uncurls into a graceful arch, one end of which reaches the rock outcrop high up the cliff. The rope rapidly coils one end of itself securely around the outcrop and leaves the other end free to fall back down to the base of the cliff." MAKE rope tied. LOCATE rope HERE. IF hint_3_1 IS NOT shown THEN MAKE hint_3_1 stale. -- "must take rope" END IF. IF hint_3_4 IS NOT shown THEN MAKE hint_3_4 stale. -- "x cliff" END IF. IF hint_3_5 IS NOT shown THEN MAKE hint_3_5 stale. -- "throw rope..." END IF. ELSIF obj2 = wall THEN "$tYou heave the rope with all your might up the cliff. The rope uncurls into a graceful arch, one end of which just misses a large protruding outcrop of rock at the top of the cliff. $iThe rope falls to the ground at the base of the cliff and curls itself into a tidy coil." LOCATE rope HERE. IF hint_3_4 IS NOT shown THEN MAKE hint_3_4 stale. -- "x cliff" END IF. ELSE "There's no point doing that." END IF. END VERB. END OBJECT rope. -----------------Actors----------------------------- ACTOR ATTRIBUTES NOT named. SYNONYMS me, myself, self, rabbit, dinner = hero. ACTOR hero NAME hero HAS Turns 0. -- (for scoring) HAS points 0. HAS previous_points 0. HAS max_points 3. IS notify_on. IS NOT seen_notify. IS NOT in_help. IS NOT seen_hint_warning. HAS hints_seen 0. IS tied. IS NOT tried_leaving. IS NOT on_tree. IS NOT on_stones. IS can_talk. VERB examine, look_at DOES ONLY "$tYou're a wolf's breakfast. Well, more precisely, you're a rabbit" IF hero IS tied THEN "tied to a tree who will be a wolf's breakfast soon if you don't get free." ELSE "who will be a wolf's breakfast soon if you don't get get out of this clearing." END IF. IF hero IS on_tree THEN "You are currently up a tree as far as you can climb." ELSIF hero IS on_stones THEN "You are currently standing on a pile of stones." END IF. END VERB. VERB ask,tell, talkto WHEN act DOES ONLY "Talking to yourself won't help here." END VERB. VERB talkto_alone WHEN act DOES ONLY "Talking to yourself won't help here." END VERB. VERB sayto, talkabout WHEN act DOES ONLY "Talking to yourself won't help here." END VERB. VERB untie, undo_obj DOES ONLY IF hero IS tied THEN "You're tied too tight. You could never untie yourself." ELSE "You're not tied to anything." END IF. END VERB. END ACTOR. ACTOR wolf NAME wolf END ACTOR. -----------------Events----------------------------- EVENT Wolfwink IF hero IS in_help THEN SCHEDULE wolfwink AFTER 1. ELSE "$iA wolf slinks into the clearing from the southern path and drops an armful of firewood by the circle of stones. $iHe looks at you and then slinks off along the eastern path. As he turns away he seems to be licking his lips.$n" LOCATE firewood AT clearing. SCHEDULE check_rope_spoken AFTER 10. END IF. END EVENT. EVENT Moonreminder IF hero IS in_help THEN SCHEDULE moonreminder AFTER 1. ELSE "$iThe full moon is slowly starting to fade as the approaching day begins to brighten the eastern sky above the cliff." END IF. END EVENT. EVENT Wolfreminder IF hero IS in_help THEN SCHEDULE wolfreminder AFTER 1. ELSE "$i""Hurry up and get us out of here,"" the rope says, ""I'm sure the wolf will be back with enough firewood to cook you soon.""" END IF. END EVENT. EVENT Wolfagain IF hero IS in_help THEN SCHEDULE wolfagain AFTER 1. ELSE "$iThe wolf slinks into the clearing from the eastern path and drops another armful of firewood by the circle of stones." "He now has sufficient firewood to cook you." "You're roast, cotton-tail!" "$pYou have scored" SAY points OF hero. "point" IF points OF hero <> 1 THEN "$$s" END IF. "out of" SAY max_points OF hero. "$$. (In " SAY Turns OF Hero. "turn" IF turns OF hero <> 1 THEN "$$s" END IF. "$$.)" QUIT. END IF. END EVENT. EVENT check_rope_spoken IF hero IS in_help THEN SCHEDULE check_rope_spoken AFTER 1. ELSE IF rope IS NOT named THEN "$iThe rope starts talking to you.$n" SCHEDULE rope_speech AFTER 0. IF hint_1_2 IS NOT shown THEN MAKE hint_1_2 stale. -- "x rope" END IF. IF hint_1_3 IS NOT shown THEN MAKE hint_1_3 stale. END IF. END IF. SCHEDULE check_deal_done AFTER 5. END IF. END EVENT. EVENT check_deal_done IF hero IS in_help THEN SCHEDULE check_deal_done AFTER 1. ELSE IF hero IS tied THEN "$iThe rope starts talking to you again.$n" SCHEDULE rope_speech AFTER 0. END IF. SCHEDULE check_deal_done AFTER 5. END IF. END EVENT. EVENT rope_speech IF rope IS NOT named THEN MAKE rope named. MAKE rope examined. IF hint_1_2 IS NOT shown THEN MAKE hint_1_2 stale. -- "x rope" END IF. IF hint_1_3 IS NOT shown THEN MAKE hint_1_3 stale. -- "talk to rope" END IF. "$t""I'm an Acme rope,"" says the rope, ""The world's strongest rope. The wolf said he'd untie me from this tree if I keep you tied up until he's ready to cook you for breakfast.""" ELSIF rope IS tied THEN IF hero IS tied THEN "$t""Look,"" says the rope, "" I'll do you a deal. Promise to untie me from this tree and I'll release you. OK?""" MAKE rope dealing. SCHEDULE rope_not_dealing AFTER 1. ELSE IF rope IS on_tree THEN "$t""Hey, when are you going to untie me from this tree?""" ELSE "$t""Hey, come on! We need to get out of this clearing before the wolf comes back with enough firewood to cook you.""" END IF. END IF. ELSE "$t""Stop chatting. We need to get out of this clearing before the wolf comes back with enough firewood to cook you.""" END IF. END EVENT. EVENT deal_done "$tYou feel the rope's hold on you loosen then the loops of rope fall to the ground as it releases you. $iOne end of the rope is still tied around the trunk of the tree at a height some distance above your head. The rope dangles to the ground where the loose end quickly curls into a tidy coil at the base of the tree." MAKE hero NOT tied. MAKE rope NOT dealing. SET points OF hero TO 1. SET hints_seen OF hero to 0. CANCEL check_deal_done. SCHEDULE checkscore AT hero AFTER 0. --run 'checkscore' event again --coz the 'checkscore' scheduled --in the start section has already --been executed by the time this END EVENT. --'deal_done' event is run EVENT rope_not_dealing MAKE rope NOT dealing. END EVENT. ---------------------------------------------------- START AT forest_clearing. "$t$t$t$t$t$t$t$t$t""No knot unties itself.""" "$n$t$t$t$t$t$t$t$t$t$t from 'Collected Sayings'" "$n$t$t$t$t$t$t$t$t$t$t edited by David Glasser." "$n$iWacky Comp Productions presents" "$n$i$t ""Skipping Breakfast""" "$n$t$t by Stephen Griffiths" "$p(Please type ""help"" if you would like instructions.)" SCHEDULE turntick AT hero AFTER 0. SCHEDULE wolfwink AFTER 2. SCHEDULE moonreminder AFTER 25. SCHEDULE wolfreminder AFTER 55. SCHEDULE wolfagain AFTER 80. SCHEDULE checkscore AT hero AFTER 1.