<!-- MHonArc v2.4.4 --> <!--X-Subject: parsing --> <!--X-From-R13: ptNnzv-pt.UenlEntr.Sqzbagba.OP.QO (Quevf Uenl) --> <!--X-Date: from babe.globecomm.net [207.51.48.8] by mx5.ibm.net id 862466183.171976-1 Thu May 1 05:56:23 1997 --> <!--X-Message-Id: 9705010515.7ywq@ami-cg.GraySage.Edmonton.AB.CA --> <!--X-Content-Type: text/plain --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, parsing</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00301.html">Previous</a> | <a href="msg00303.html">Next</a> ] Thread: [ <a href="msg00303.html">Previous</a> | <a href="msg00298.html">Next</a> ] Index: [ <A HREF="author.html#00302">Author</A> | <A HREF="#00302">Date</A> | <A HREF="thread.html#00302">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>parsing</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI> <LI><em>Subject</em>: parsing</LI> <LI><em>From</em>: <A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A> (Chris Gray)</LI> <LI><em>Date</em>: Wed, 30 Apr 97 22:15:44 MST</LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> The email last night got me thinking a bit, and I ended up asking myself what my scenario would do with a certain command. Well, I'm so happy with the result that I have to share it with you: tell packrat to follow me and tell packrat to give goblin plate mail to me both worked just as you would want! It took a bit of looking up to find out how it worked, however. Packrat looks at all things spoken. The first word is always the name of the speaker, then there is "says". I have a builtin function that strips those off, and returns the speaker name. That is saved on the NPC. If the first word of the rest of the string is "Packrat" (with some punctuation allowed), then the rest after that is also saved on the NPC, and an event is logged for 1 second in the future. That event causes the NPC to retrieve those two values. The name of the speaker is passed to a special builtin "SetMeString", where it will be available to match an agent name of "me". The command string is passed directly to the main parser, with the main grammar active. So, the command "follow me" is issued on behalf of the Packrat NPC. "me" is a special case in my agent-lookup routine, and yields the agent who originally spoke the command. And so, Packrat starts following me. Etc. Of course, if someone else spoke a command to Packrat in between, their command would override mine. Since the event that executes the command deletes those values from Packrat, they won't get done twice, however - the second event will just yield a message about Packrat being confused. We now return to our regular discussion. :-) -- Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00301.html">Re: [MUD-Dev] Magnetic Scrolls' magical parser</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00303.html">Re: Multi-threaded mudding (was a flamefest)</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00303.html">Re: Multi-threaded mudding (was a flamefest)</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00298.html">Re: (fwd) Re: Death in Muds -(also Birth, Imprisonment, Aging, and skill development)</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00302"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00302"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>Re: [MUD-Dev] Re: Multi-threaded mudding (was a flamefest)</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00321" HREF="msg00321.html">Re: [MUD-Dev] Re: Multi-threaded mudding (was a flamefest)</A></strong>, Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Sun 04 May 1997, 11:28 GMT </LI> <LI><strong><A NAME="00320" HREF="msg00320.html">Re: [MUD-Dev] Re: Multi-threaded mudding (was a flamefest)</A></strong>, Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Sun 04 May 1997, 11:30 GMT </LI> <LI><strong><A NAME="00339" HREF="msg00339.html">Re: [MUD-Dev] Re: Multi-threaded mudding (was a flamefest)</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Fri 09 May 1997, 11:11 GMT </LI> </ul> </LI> <LI><strong><A NAME="00303" HREF="msg00303.html">Re: Multi-threaded mudding (was a flamefest)</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Fri 02 May 1997, 03:35 GMT <LI><strong><A NAME="00302" HREF="msg00302.html">parsing</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 01 May 1997, 12:56 GMT <LI><strong><A NAME="00298" HREF="msg00298.html">Re: (fwd) Re: Death in Muds -(also Birth, Imprisonment, Aging, and skill development)</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Wed 30 Apr 1997, 09:39 GMT <LI><strong><A NAME="00294" HREF="msg00294.html">Re: [MUD-Dev] Re: Combat</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 30 Apr 1997, 02:19 GMT <LI><strong><A NAME="00283" HREF="msg00283.html">Re: [MUD-Dev] Re: Combat</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 29 Apr 1997, 21:49 GMT <LI><strong><A NAME="00284" HREF="msg00284.html">Re: [MUD-Dev] Magnetic Scrolls' magical parser</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 29 Apr 1997, 21:43 GMT </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>