-- -- Standard Definitions for ALAN -- ***************************** -- -- Original version (C) 1992 Luis E. Torres, let@cis.ufl.edu -- Version 2.0 - ©1997-99 by JuL -- Includes code from Dark.alan -- -- Last changed 22.07.1999 by JuL -- -- (I really changed a lot in the meantime and also couldn't reach the author -- at the given address (small wonder, after all this time ...), so I thought -- I'd rename this library and kind of make it my own. It still owes many, if -- not most, features to the original author, and I still mark everything I -- added or changed - JuL, 7.11.1997) -- -- This is a more or less "standard" set of verb definitions for the ALAN -- Adventure Language. Many of them are dummies, and have no function other -- than to print "You can't do that" (whatever 'that' is), or "Nothing -- happens." These definitions are not of much use by themselves. There are -- two ways to use these definitions: [JuL] -- -- 1) You can easily override them in the object definitions, and leave the -- default definitions as they are. This is good when you have only one or two -- objects which need the verb. For example, -- -- OBJECT bread AT bakery -- DESCRIPTION "There's some bread on the counter." -- -- VERB eat DOES ONLY -- "When you eat the bread, you find something inside. -- It's a silver bullet!" -- LOCATE silver_bullet AT bakery. -- END VERB. -- END OBJECT. -- -- 2) You can enhance the standard definitions by adding attributes to the -- LOCATION, ACTOR and OBJECT attribute lists. This is useful when you have -- many objects with a particular characteristic. For example, -- -- OBJECT ATTRIBUTES -- takeable. -- NOT openable. -- NOT closable. -- NOT open. -- JuL -- NOT edible. -- -- . -- . -- . -- -- VERB eat DOES -- CHECK obj IN inventory -- ELSE "You don't have that object." -- AND obj IS edible -- ELSE "You can't eat that!" -- DOES -- "You eat the $o." -- END VERB. -- -- . -- . -- . -- -- OBJECT bread AT bakery -- DESCRIPTION "There's some bread on the counter." -- edible. -- END OBJECT. -- -- -- All this, of course, depends on how you are writing your adventure. -- -- I hope this file helps all the people who are interested in ALAN. Please -- send me your comments and suggestions and errors found to -- let@cis.ufl.edu. Thanks! -- -- Luis E. Torres -- let@cis.ufl.edu -- (seems not valid anymore, JuL) -- -- ... and JuL at lerchj@uni-duesseldorf.de -- -- --------------------------------------------------------------------------- -- -- PART 1: OPTIONS -- *************** -- We will implement a "brief-like" environment, a-la Infocom (that's what -- the visits 255 is for). -- VISITS 255. (I like "VERBOSE" better - JuL) -- Some locations can have a locked door leading somewhere. This flag -- should take care of that (the verbs that use Locked_Door have not been -- coded, as I probably plan to override the unlock function in the -- appropiate locations). -- JuL: I think this depends on the door, not on the location - and locations -- could have many doors. -- Rather, locations can have light, be walled, and have a ceiling or a -- floor that the player might want to examine. Usually, though, she won't -- find anything special, and to have to make dummy walls or ceilings for -- every room seems quite silly and too much effort. So I introduced some -- general location attributes. As of yet they aren't all active and don't -- account for partial ceilings or floors, or different walls. -- JuL DEFAULT ATTRIBUTES NOT plural. NOT properName. NOT examined. -- JuL: Actually it's an object's attribute, but has to -- be a "default" one. NOT takeable. -- See above ... LOCATION ATTRIBUTES -- NOT Locked_Door. (depends on door, not on location - JuL) lit. walled. -- (JuL) -- JuL: seperate north/south/... walls could replace `walled' roofed. -- (JuL) floored. -- (JuL) -- An object can be takeable, openable (NOT by default), closable (NOT by -- default), and is usually closed (NOT, JuL). It can also be lockable, fitting -- to a certain lock (or key), edible, drinkable, or switchable (and turned on -- or off). You could write with it, and it may give off light. (heavily -- modified by JuL) OBJECT ATTRIBUTES takeable. NOT openable. NOT closable. NOT open. -- JuL NOT lockable. NOT locked. -- (JuL) lock 0. -- JuL NOT edible. NOT drinkable. foodvalue 0. -- JuL NOT switchable. on. NOT writer. -- JuL alight 0. -- JuL, from Dark.alan: actually boolean, but SUM has -- to be done on that value. -- All Actors are assumed to be human (or at least intelligent). Actors are -- initially defined as male. In case you plan to use pronouns 'he', -- 'she' or 'it', this flag would be useful for printing the appropiate -- pronoun. -- The properName flag should be set if the actor has a proper name (i.e. -- Bill). This would keep the program from printing "The Bill hears you", -- instead of "Bill hears you", for example. Again, this has not been coded -- (I started to, JuL). ACTOR ATTRIBUTES Gender. -- NOT if `it' is asked for (JuL) Male. -- male is just shorter ... (JuL) properName. Turns 0. -- (JuL) -- I have modified the standard inventory header. modify it to suit your taste. -- (I did - JuL) CONTAINER inventory HEADER "You are carrying " ELSE "You are carrying nothing." END CONTAINER. ----------------------------------- -- PART 2: SYNONYMS -- **************** SYNONYMS -- Synonyms for commands: ----------------------------- north = n. south = s. east = e. west = w. up = u. down = d. northeast = ne. southeast = se. northwest = nw. southwest = sw. leave, 'exit' = o. -- "out" JuL bye, q = 'quit'. y = yes. i = 'inventory'. peek, l = 'look'. -- (JuL) h, hint = help. -- (JuL) z = 'wait'. -- JuL load = 'restore'. get = take. shut = close. x, 'check', inspect, search = examine. dump, cast = throw. kill, fight, hit, smash = attack. place = put. press = push. -- (JuL) fire = shoot. scream, yell = shout. scribble = write. -- (JuL) hear = listen. -- (JuL) lick = taste. -- JuL offer = give. -- JuL sniff = smell. -- JuL answer = 'say'. -- JuL plugh, plover = xyzzy. -- JuL this, that, those = the. -- JuL using = with. -- JuL -- Synonyms for objects go here: ------------------------------------- walls = wall. ground = floor. ------------------------------------ -- PART 3: SYNTAX. -- *************** SYNTAX 'quit' = 'quit'. turns = turns. -- JuL take_inventory = 'inventory'. shout = shout. 'wait' = 'wait'. 'look' = 'look'. 'save' = 'save'. 'restore' = 'restore'. help = help. verbose = verbose. -- JuL brief = brief. -- JuL enter0 = enter. -- JuL health = health. -- JuL knock0 = knock. -- JuL listen = listen. -- JuL 'score' = 'score'. -- JuL sit0 = sit. -- JuL sit1 = sit 'on' (obj). -- JuL smell0 = smell. -- JuL xyzzy = xyzzy. -- JuL drop = drop (obj) *!. -- (JuL) take = take (obj) *! -- (JuL) WHERE obj ISA OBJECT ELSE "You can't take people with you!" take_from = take (obj) * 'from' (subj) -- JuL WHERE obj ISA OBJECT ELSE "But surely the $2 can't carry any $1!" AND subj ISA CONTAINER ACTOR OR CONTAINER OBJECT -- JuL: Grrr ELSE "The $2 has nothing to carry anything." take_out = take (obj) * 'out' 'of' (subj) -- JuL WHERE obj ISA OBJECT ELSE "But surely $2 can't carry $1!" AND subj ISA CONTAINER ACTOR OR CONTAINER OBJECT -- JuL: s.o. ELSE "$2 has nothing to carry anything." give = give (obj) * 'to' (act) -- JuL WHERE obj ISA OBJECT ELSE "You can't give that to somebody!" AND act ISA CONTAINER ACTOR ELSE "You can't give anything to $2!" open = open (obj) WHERE obj ISA OBJECT ELSE "You can't open people." close = close (obj) WHERE obj ISA OBJECT ELSE "You can't close people." examine = examine (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't examine that." look_at = 'look' 'at' (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't examine that." look_under = 'look' under (obj) -- JuL WHERE obj ISA OBJECT OR ACTOR ELSE "You can't examine that." look_behind = 'look' behind (obj) -- JuL WHERE obj ISA OBJECT OR ACTOR ELSE "You can't examine that." look_up = 'look' u. -- JuL look_down = 'look' d. -- JuL read = read (obj) WHERE obj ISA OBJECT ELSE "You can't read people." ask = ask (act) WHERE act ISA ACTOR ELSE "You know, things don't talk. People do." ask_about = ask (act) about (obj)! WHERE act ISA ACTOR ELSE "You know, things don't talk. People do." talk = 'talk' 'to' (act) WHERE act ISA ACTOR ELSE "You know, things don't talk. People do." talk_about = 'talk to' (act) about (obj)! WHERE act ISA ACTOR ELSE "You know, things don't talk. People do." tell = tell (act) WHERE act ISA ACTOR ELSE "You know, things don't talk. People do." tell_about = tell (act) about (obj)! WHERE act ISA ACTOR ELSE "You know, things don't talk. People do." throw = throw (obj) *! WHERE obj ISA OBJECT ELSE "You can't throw people." throw_at = throw (obj1) 'at' (obj2) WHERE obj1 ISA OBJECT ELSE "You can't throw people." AND obj2 ISA OBJECT OR ACTOR ELSE "You can't throw anything at that." throw_to = throw (obj1) 'to' (obj2) WHERE obj1 ISA OBJECT ELSE "You can't throw people." AND obj2 ISA OBJECT OR ACTOR ELSE "You can't throw anything at that." throw_in = throw (obj1) 'in' (obj2) WHERE obj1 ISA OBJECT ELSE "You can't throw people." AND obj2 ISA CONTAINER OBJECT -- :-( (JuL) ELSE "You can't throw anything in the $2." attack = attack (act) WHERE act ISA ACTOR ELSE "You should not attack defenseless objects." attack_with = attack (act) with (obj) WHERE act ISA ACTOR ELSE "You should not attack defenseless objects." open_with = open (obj1) with (obj2) WHERE obj1 ISA OBJECT ELSE "You can't open that." AND obj2 ISA OBJECT ELSE "You can't open anything with that." close_with = close (obj1) with (obj2) WHERE obj1 ISA OBJECT ELSE "You can't close that." AND obj2 ISA OBJECT ELSE "You can't close anything with that." lock = lock (obj) WHERE obj ISA OBJECT ELSE "You can't lock that." lock_with = lock (obj) with (key) -- JuL WHERE lock OF obj <> 0 WHERE obj ISA OBJECT ELSE "You can't lock that." -- JuL AND lock OF key <> 0 AND key ISA OBJECT ELSE "You can't lock something with this." unlock = unlock (obj) WHERE obj ISA OBJECT ELSE "You can't even lock that." unlock_with = unlock (obj) with (key) -- JuL WHERE lock OF obj <> 0 WHERE obj ISA OBJECT ELSE "You can't unlock that." -- JuL AND lock OF key <> 0 AND key ISA OBJECT ELSE "You can't unlock something with this." eat = eat (obj)! WHERE obj ISA OBJECT ELSE "You can't eat that." drink = drink (obj)! WHERE obj ISA OBJECT ELSE "You can't drink that." put = put (obj) *! WHERE obj ISA OBJECT ELSE "You can't put that anywhere." put_in = put (obj1) 'in' (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA CONTAINER OBJECT -- JuL :-( ELSE "You can't put anything in the $2." put_into = put (obj1) into (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA CONTAINER OBJECT -- JuL :-( ELSE "You can't put anything in the $2." put_near = put (obj1) near (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA OBJECT ELSE "You can't put anything near the $2." put_behind = put (obj1) behind (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA OBJECT ELSE "You can't put anything behind the $2." put_on = put (obj1) 'on' (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA OBJECT ELSE "You can't put anything on the $2." put_under = put (obj1) under (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA OBJECT ELSE "You can't put anything under the $2." put_with = put (obj1) with (obj2) WHERE obj1 ISA OBJECT ELSE "You can't put that." AND obj2 ISA OBJECT ELSE "You can't put anything with the $2." push = push (obj) WHERE obj ISA OBJECT ELSE "You can't push that." push_with = push (obj1) with (obj2) WHERE obj1 ISA OBJECT ELSE "You can't push that." AND obj2 ISA OBJECT ELSE "You cant use a $2 to push anything." turn_on = 'turn on' (obj) WHERE obj ISA OBJECT ELSE "You can't turn that on." turn_off = 'turn off' (obj) WHERE obj ISA OBJECT ELSE "You can't turn that off." pull = pull (obj) WHERE obj ISA OBJECT ELSE "You can't pull that." play = play (obj) WHERE obj ISA OBJECT ELSE "You can't play that." play2 = play with (obj) WHERE obj ISA OBJECT ELSE "You can't play with that." light = light (obj) WHERE obj ISA OBJECT ELSE "You can't light that." extinguish = extinguish (obj) WHERE obj ISA OBJECT ELSE "You can't extinguish that." extinguish2 = put out (obj) WHERE obj ISA OBJECT ELSE "You can't put that out." shoot = shoot (obj) WHERE obj ISA OBJECT OR ACTOR ELSE "You can't shoot that." shoot_at = shoot (obj) 'at' (act) WHERE obj ISA OBJECT ELSE "You can't shoot that at anything." AND act ISA OBJECT OR ACTOR ELSE "You can't shoot that." shoot_with = shoot (act) with (obj) WHERE obj ISA OBJECT ELSE "You can't shoot that at anything." AND act ISA OBJECT OR ACTOR ELSE "You can't shoot that." wear = wear (obj) WHERE obj ISA OBJECT ELSE "You can't wear that." put_on2 = 'put' 'on' (obj) WHERE obj ISA OBJECT ELSE "You can't put that on." 'remove' = 'remove' (obj) WHERE obj ISA OBJECT ELSE "You can't remove that." take_off = 'take' 'off' (obj) WHERE obj ISA OBJECT ELSE "You can't take that off." dig = dig. -- JuL dig_with = dig with (obj) -- JuL WHERE obj ISA OBJECT ELSE "You can't dig with such a thing!" insert = insert (obj1) -- JuL WHERE obj1 ISA OBJECT ELSE "You can't insert that into anything." insert1 = insert (obj1) into (obj2) WHERE obj1 ISA OBJECT ELSE "You can't insert that into anything." AND obj2 ISA OBJECT ELSE "You can't insert anything into that." jump0 = jump. -- JuL jump1 = jump (obj). -- JuL jump_on = jump on (obj). -- JuL jump_onto = jump onto (obj). -- JuL jump_against = jump against (obj). -- JuL jump_into = jump into (obj). -- JuL jump_out = jump 'out of' (obj). -- JuL jump_over = jump over (obj). -- JuL jump_across = jump across (obj). -- JuL jump_through = jump through (obj). -- JuL knock_against = knock against (obj). -- JuL knock_at = knock 'at' (obj). -- JuL knock_on = knock on (obj). -- JuL say0 = 'say' (txt) -- JuL WHERE txt ISA STRING ELSE "Watcha wanna say??" say_to = 'say' (txt) 'to' (act) -- JuL WHERE txt ISA STRING ELSE "Watcha wanna say??" AND act ISA ACTOR ELSE "Talking with things again?" touch = touch (obj). -- JuL touch_with = 'touch' (obj1) 'with' (obj2) -- JuL WHERE obj2 ISA OBJECT ELSE "You can't touch anything with that." write = write (txt) -- JuL WHERE txt ISA STRING ELSE "You can't write that." write_with = write (txt) with (obj). -- JuL write_on0 = write on (obj). -- JuL write_on1 = write (txt) on (obj) -- JuL WHERE txt ISA STRING ELSE "You can't write that." AND obj ISA OBJECT ELSE "You can't write on that." write_with_on = write (txt) with (obj1) on (obj2). -- JuL write_on_with = write (txt) on (obj1) with (obj2). -- JuL ------------------------------------------------ -- PART 4: VERBS. -- ************** -- One word verbs. -- -- Quitting with comfirmation: [JuL] ACTOR hero NAME me IS NOT quitting. END ACTOR hero. SYNTAX yes = yes. no = no. VERB 'quit' DOES "Do you really want to give up? Type 'yes' to quit, or to carry on type your next command." MAKE hero quitting. SCHEDULE unquit AFTER 1. END VERB 'quit'. VERB yes CHECK hero IS quitting ELSE "That does not seem to answer any question." DOES QUIT. END VERB yes. VERB no DOES "Aw, don't be so negative!" END VERB no. EVENT unquit MAKE hero NOT quitting. END EVENT unquit. -- VERB take_inventory DOES LIST inventory. END VERB. -- VERB shout DOES "There's no point in shouting." END VERB. -- VERB 'wait' DOES "Time passes ..." END VERB. -- VERB 'look' CHECK LOCATION IS lit OR SUM OF alight HERE > 0 ELSE "It is too dark." DOES LOOK. END VERB 'look'. -- VERB 'save' DOES "Saving ..." SAVE. "Done." END VERB. -- VERB 'restore' DOES "Restoring ..." RESTORE. "Done.$n" LOOK. END VERB. -- VERB help DOES "Sorry, but you're on your own." END VERB. -- JuL: VERB brief DOES VISITS 23456. "Now BRIEF mode entered, where location descriptions will be given only the first time or if explicitly requested by (L)OOK." END VERB. -- JuL: VERB verbose DOES VISITS 0. "Now VERBOSE mode entered, where location descriptions are given every time a location is visited anew." END VERB. VERB enter0 DOES "There is nothing you could enter into." END VERB. -- JuL: VERB health DOES "You feel ok." END VERB health. -- JuL: VERB insert DOES "Insert into what?" END VERB insert. -- JuL: VERB insert1 DOES "You can't insert the $1 into the $2." END VERB insert1. -- JuL: VERB jump0 DOES "You jump up and down a bit." END VERB jump0. -- JuL: VERB knock0 DOES "You knock." END VERB knock0. -- JuL: VERB listen DOES "You hear nothing special." END VERB listen. -- JuL: VERB 'score' DOES SCORE. IF Turns OF hero <> 0 THEN DECREASE Turns OF hero. END IF. END VERB 'score'. -- JuL: VERB sit0 DOES "You squat on the ground." END VERB sit0. -- JuL: VERB smell0 DOES "You smell nothing special." END VERB smell0. -- JuL: VERB turns DOES "This session lasted " IF Turns OF hero <> 0 THEN DECREASE Turns OF hero. END IF. SAY Turns OF hero. "turns." END VERB turns. -- JuL: VERB xyzzy DOES "Another time, another world ..." END VERB xyzzy. -- -- Two or more word verbs. -- -- JuL: VERB enter DOES "You cannot enter that." END VERB enter. -- -- 'throw' and 'put' equal 'drop' as a default. VERB drop, throw, put CHECK obj IN inventory ELSE "You haven't got that." DOES LOCATE obj HERE. "Dropped." END VERB. -- VERB take CHECK obj IS takeable ELSE "You can't take that!" AND obj NOT IN inventory ELSE "You've already got that." DOES IF obj HERE THEN -- not a CHECK so visible but not reachable -- objects may be dealt with properly LOCATE obj IN inventory. "Taken." ELSE "You can't see any $1 here." END IF. END VERB take. -- JuL: VERB take_from, take_out CHECK obj IS takeable ELSE "You can't carry that!" AND obj NOT IN inventory ELSE "You already got that!" AND obj IN subj ELSE IF subj IS NOT properName THEN "The" END IF. "$2 doesn't have that." DOES "You take" IF obj IS NOT properName THEN "the" END IF. "$1 from" IF obj IS NOT properName THEN "the" END IF. "$2." LOCATE obj IN inventory. END VERB. -- JuL: VERB give CHECK obj IN inventory ELSE "You haven't got that!" DOES "`I don't think I want that.'" END VERB. -- VERB open CHECK obj IS openable ELSE "You can't open that!" AND obj IS NOT open ELSE "It's already open." AND obj IS NOT locked -- JuL ELSE "It's locked." DOES MAKE obj open. IF obj IS NOT properName THEN "The" END IF. "$o is now open." END VERB open. -- VERB close CHECK obj IS closable ELSE "You can't close that." AND obj IS open ELSE "It is not open." DOES MAKE obj NOT open. IF obj IS NOT properName THEN "The" END IF. "$o is now closed." END VERB close. -- VERB look_up DOES IF LOCATION IS roofed THEN "You look at the ceiling, seeing nothing special." ELSE "You look up at the open sky." END IF. END VERB look_up. -- VERB look_down DOES IF LOCATION IS floored THEN "You look at the ground to your feet, seeing nothing special." ELSE "You look down at the empty space beneath your feet." END IF. END VERB look_down. -- VERB examine, look_at DOES "There's nothing special about" IF obj IS NOT properName THEN "the" END IF. "$o." MAKE obj examined. END VERB. -- VERB look_behind DOES "You see nothing special." END VERB look_behind. -- VERB look_under CHECK obj IS takeable ELSE "You cannot look under that." DOES "You see nothing special." END VERB look_under. -- VERB read DOES "There's nothing to read here." END VERB. -- VERB ask DOES IF act IS NOT properName THEN "The" END IF. "$o ignores your question." END VERB. -- VERB ask_about DOES IF act IS NOT properName THEN "The" END IF. "$1 ignores your question." END VERB. -- VERB tell DOES IF act IS NOT properName THEN "The" END IF. "$o is not impressed." END VERB. -- VERB tell_about DOES IF act IS NOT properName THEN "The" END IF. "$1 is not impressed." END VERB. -- VERB talk DOES IF act IS NOT properName THEN "The" END IF. "$o does not seem to want to talk." END VERB talk. -- VERB talk_about DOES IF act IS NOT properName THEN "The" END IF. "$1 does not seem to want to talk." END VERB. -- VERB throw_at, throw_to CHECK obj1 IN inventory ELSE "You haven't got that!" AND obj2 HERE AND obj2 NOT IN inventory ELSE "You don't see any $2 here." DOES IF obj1 IS NOT properName THEN "The" END IF. "$1 bounces harmlessly off" IF obj2 IS NOT properName THEN "the" END IF. "$2 and drops to the floor.$n" LOCATE obj1 HERE. END VERB. -- VERB throw_in, put_in, put_into CHECK obj1 IN inventory ELSE "You haven't got that!" AND (obj2 HERE OR obj2 IN inventory) ELSE "You don't see any $2 here." AND obj1 <> obj2 ELSE "Now, that would be a good trick!" AND obj2 IS open ELSE IF obj2 IS NOT properName THEN "The" END IF. "$2 isn't open." DOES LOCATE obj1 IN obj2. "Done." END VERB. -- VERB attack CHECK act HERE -- seems not necessary (JuL) ELSE "You don't see that person here." DOES "No unwarranted violence, please. Remember Welch Creek." END VERB. -- (actually I don't ... - JuL) -- VERB attack_with CHECK act HERE -- seems not necessary (JuL) ELSE "I don't see that person here." AND obj IN inventory ELSE "You don't have that object to attack with." DOES "No unwarranted violence, please. Remember Welch Creek." END VERB. -- VERB open_with CHECK obj1 HERE ELSE "You don't see any $1 to open." AND obj2 IN inventory ELSE "You don't have the $2." DOES "You can't open" IF obj1 IS NOT properName THEN "the" END IF. "$1 with" IF obj2 IS NOT properName THEN "the" END IF. "$2." END VERB. -- VERB close_with CHECK obj1 HERE ELSE "You don't see any $1 to close." AND obj2 IN inventory ELSE "You don't have the $2." DOES "You can't close the $1 with" IF obj2 IS NOT properName THEN "the" END IF. "$2." END VERB. -- VERB lock CHECK obj IS lockable ELSE "You can't lock that!" AND obj HERE ELSE "You don't see what you want to lock." AND obj IS NOT locked ELSE "It's already locked." DOES "You certainly need the proper key." -- JuL(!) END VERB. -- JuL VERB lock_with CHECK obj IS lockable ELSE "You can't lock that!" AND obj HERE ELSE "You don't see what you want to lock." AND obj IS NOT locked ELSE "It's already locked." AND lock OF obj = lock OF key AND lock OF obj <> 0 ELSE "It doesn't fit." DOES IF obj IS open THEN MAKE obj NOT open. "(first closing it)" END IF. MAKE obj locked. "Ok." END VERB. -- VERB unlock CHECK obj IS lockable ELSE "You can't unlock that!" AND obj HERE ELSE "You don't see what you want to unlock." AND obj IS locked ELSE "It's already unlocked." DOES "You probably need the proper key." -- JuL(!) END VERB. -- JuL VERB unlock_with CHECK obj IS lockable ELSE "You can't unlock that!" AND obj HERE ELSE "You don't see what you want to unlock." AND obj IS locked ELSE "It's already unlocked." AND lock OF key = lock OF obj AND lock OF obj <> 0 ELSE "That doesn't work." DOES MAKE obj NOT locked. "Ok." END VERB. -- -- Right now the player can eat or drink objects defined with the edible -- and drinkable flags; however, there is still not much point in that, as -- eating or drinking an object just makes it disappear from the inventory. -- More code is required to make these actions meaningful. VERB eat CHECK obj IS edible ELSE "That is not edible." DOES IF obj HERE THEN -- co CHECK for visible but unreachable objects "You" IF obj NOT IN inventory THEN "take and" END IF. "eat" IF obj IS NOT properName THEN "the" END IF. "$o. Yum, you needed that!" LOCATE obj IN Limbo. ELSE "You don't see that here." END IF. END VERB eat. -- VERB drink CHECK obj IS drinkable ELSE "That is not drinkable." DOES IF obj HERE THEN -- no CHECK for visible but unreachable objects "You" IF obj NOT IN inventory THEN "take and" END IF. "drink" IF obj IS NOT properName THEN "the" END IF. "$o. Yum, you needed that!" LOCATE obj IN Limbo. ELSE "You don't see that here." END IF. END VERB drink. -- JuL: VERB taste DOES "Hm. Tastes bland." END VERB. -- JuL: VERB smell1 DOES "You smell nothing special." END VERB smell1. -- VERB put_with, put_near, put_behind, put_on, put_under CHECK obj1 IN inventory ELSE "You haven't got that!" AND obj2 HERE AND obj2 NOT IN inventory ELSE "You don't see any $2 here." DOES "Naaah. you'd rather put it on the floor.$n" LOCATE obj1 HERE. "Dropped." END VERB. -- VERB push CHECK obj HERE ELSE "You don't see what you want to push." DOES "Nothing happens." END VERB. -- VERB push_with CHECK obj1 HERE ELSE "You don't see what you want to push." AND obj2 HERE ELSE "You don't have any $2." DOES "Your action has no noticeable effect." END VERB. -- VERB turn_on CHECK obj IS switchable ELSE "You can't turn that on." AND obj HERE ELSE "You don't see what you want to turn on." AND obj IS NOT on ELSE "It's already on." DOES MAKE obj on. "Ok," IF obj IS NOT properName THEN "the" END IF. "$o is now on." END VERB. -- VERB turn_off CHECK obj IS switchable ELSE "You can't turn that off." AND obj IS on ELSE "It's already off." AND obj HERE ELSE "You don't see what you want to turn off." DOES MAKE obj NOT on. "Ok," IF obj IS NOT properName THEN "the" END IF. "$o is now off." END VERB. -- VERB pull CHECK obj HERE ELSE "You don't see what you want to pull here." DOES "You can't pull that." END VERB. -- VERB play, play2 CHECK obj HERE ELSE "You don't see what you want to play here." DOES "You can't play that." END VERB. -- VERB light CHECK obj HERE ELSE "You don't see the object you want to light." AND obj IS switchable ELSE "You can't see a means to do that." DOES "You can't light that object." END VERB. -- VERB extinguish, extinguish2 CHECK obj HERE ELSE "You don't see such a thing." DOES "You can't extinguish that object." END VERB. -- VERB shoot CHECK obj HERE ELSE "You don't see such a thing." DOES "`Violence is the last refuge of the incompetent' (TM)." END VERB. -- VERB shoot_at CHECK obj IN inventory ELSE "You don't have that object." AND act HERE ELSE "You don't see that being." DOES "More violence?! Don't you remember Welch Creek?!" END VERB. -- VERB shoot_with CHECK obj IN inventory ELSE "You don't have that object." AND act HERE ELSE "You don't see that being." DOES "More violence?! Don't you remember Welch Creek?!" END VERB. -- VERB wear, put_on2 CHECK obj IN inventory ELSE "You don't have that object." DOES "You can't put that on." END VERB. -- VERB remove, take_off CHECK obj IN inventory ELSE "You don't have that object." DOES "You can't remove that." END VERB. -- JuL: VERB touch DOES "You touch" IF obj IS NOT properName THEN "the" END IF. "$1. Nothing happens." END VERB. -- VERB touch_with CHECK obj2 IN inventory ELSE "You don't have a $2." DOES "You touch" IF obj1 IS NOT properName THEN "the" END IF. "$1 with" IF obj2 IS NOT properName THEN "the" END IF. "$2. Nothing happens." END VERB. -- VERB dig DOES "Digging with your bare hands will lead you nowhere." END VERB dig. -- VERB dig_with DOES "Digging with this would lead you nowhere." END VERB dig_with. -- VERB jump_on, jump_onto DOES "You try to jump on" IF obj IS NOT properName THEN "the" END IF. "$1 but fall short." END VERB. -- VERB jump1, jump_into, jump_against, jump_through DOES "You jump against" IF obj IS NOT properName THEN "the" END IF. "$1. Ouch." END VERB. -- JuL: VERB jump_out DOES "You try to jump out of" IF obj IS NOT properName THEN "the" END IF. "$1 but fall short." END VERB. -- JuL: VERB jump_over, jump_across DOES "You try to jump over" IF obj IS NOT properName THEN "the" END IF. "$1 but realize in time you won't make it." END VERB. -- JuL: VERB knock_against, knock_at, knock_on DOES "You knock on" IF obj IS NOT properName THEN "the" END IF. "$1." END VERB. -- JuL: VERB say0 DOES "You mumble something into your beard." END VERB say0. -- JuL: VERB say_to DOES "You mumble something to" IF act IS NOT properName THEN "the" END IF. "$2." END VERB say_to. -- JuL: VERB sit1 DOES "You can't sit on" IF obj IS NOT properName THEN "the" END IF. "$1." END VERB sit1. -- JuL: VERB wave DOES "You wave" IF object IS NOT properName THEN "your" END IF. "$1." END VERB wave. -- JuL: VERB write DOES "You scribble `$1'." END VERB write. -- JuL: VERB write_with DOES "You scribble `$1' with your $2." END VERB write_with. -- JuL: VERB write_on0 DOES "You scribble something on" IF obj IS NOT properName THEN "the" END IF. "$1." END VERB write_on0. -- JuL: VERB write_on1 DOES "You scribble `$1' on" IF obj IS NOT properName THEN "the" END IF. "$2." END VERB write_on1. -- JuL: VERB write_with_on DOES "You scribble `$1' with" IF obj1 IS NOT properName THEN "your" END IF. "$2 on" IF obj2 IS NOT properName THEN "the" END IF. "$3." END VERB write_with_on. -- JuL: VERB write_on_with DOES "You scribble `$1' on" IF obj1 IS NOT properName THEN "the" END IF. "$2 with" IF obj2 IS NOT properName THEN "your" END IF. "$3." END VERB write_on_with. ------------------------- -- Part 5 Locations (JuL) -- The nowhere-location ------------------------- LOCATION Limbo EXIT nw, ne, sw, se, inn, o TO Limbo. -- for safety's sake ... END LOCATION Limbo. ----------------------- -- Part 6 Objects (JuL) ----------------------- -- The dummy objects -- -- You have to comment them out (and copy them into your adventure file) to -- append any messages or behaviour special to your adventure. ( :-( ) OBJECT Room IS NOT takeable. DESCRIPTION "" VERB Examine DOES ONLY LOOK. END VERB Examine. END OBJECT Room. -- OBJECT Wall NAME northern southern western eastern wall -- IS NOT takeable. -- DESCRIPTION "" -- END OBJECT Wall. -- OBJECT Floor -- IS NOT takeable. -- DESCRIPTION "" -- END OBJECT Floor. -- OBJECT Ceiling -- IS NOT takeable. -- DESCRIPTION "" -- VERB examine DOES ONLY -- "You can't reach the ceiling." -- END VERB examine. -- END OBJECT Ceiling. ---------------------- -- Part 7 Events (JuL) ---------------------- -- The turn-counter EVENT TurnCounter INCREASE Turns OF hero. SCHEDULE TurnCounter AFTER 1. END EVENT TurnCounter. -- The room object mover EVENT RoomMover LOCATE Room AT hero. IF LOCATION IS walled THEN LOCATE Wall AT hero. END IF. IF LOCATION IS roofed THEN LOCATE Floor AT hero. END IF. IF LOCATION IS floored THEN LOCATE Ceiling AT hero. END IF. SCHEDULE RoomMover AFTER 1. END EVENT RoomMover. ------------------------ -- Part 8 Messages (JuL) ------------------------ MESSAGE NOSUCH: "You can't see any $1 here." ----------------------------------------------- -- End of File. ---------------