Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!howland.erols.net!newsfeed.fast.net!uunet!dca.uu.net!ash.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: [inform] <<AskFor>>, or <<>> with actors
Message-ID: <GFpCqo.E2o@world.std.com>
Date: Fri, 29 Jun 2001 17:32:48 GMT
Organization: The World Public Access UNIX, Brookline, MA
Lines: 45
Xref: news.duke.edu rec.arts.int-fiction:89367

I want to make it so if the player types
   BOB, DROP ITEM
it's redirected into the command
   BOB, GIVE ITEM TO ME

I do not see anyway of making redirected commands (using <> or <<>>)
be directed at an actor, however, nor does the DM4 discussion of <>
indicate this possibility, unless there is another discussion not in
the index.

I figured I could sneak around this one particular case by using
the "ask for" grammar, which redirects into a "GIVE" command, e.g.
by saying <<AskFor bob item>>. However, when I try this, I just
get the library's default orders response. Moreover, I can see that Bob's
orders code is only getting called once--with 'drop'--and is
never getting called again.

Here's sample code that shows this behavior, which is I assume
a bug; any suggestions for how to make any of these approaches
work is appreciated.

==

Include "Parser";
Include "VerbLib";
Include "Grammar";

[ Initialise; location = start; ];

Object start "Test Room" with description "You are in a test room." has light;

Object -> "Bob" with name 'bob',
   orders [;
      Give:
         if (noun in self && second==player) {
            move noun to second;
            "Bob says, ~Sure thing, boss.~";
         } else "Bob says, ~No way.~";
      Drop: <<AskFor self noun>>;
      default: "Bob says, ~Leave me alone.~";
   ],
   has animate proper transparent
;

Object -> -> "item" with name 'item', article "an";
