Re: Help with getting and processing the MUD feedback, then returning commands.

will guaraldi <[email protected]> Fri, 9 Jul 2004 14:28:35 -0500 (CDT)
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
There are two tutorials on the website that walk through writing basic
Lyntin commands and using Lyntin hooks.  You should read both of those if
you haven't already.  You should also look at the exsting Lyntin modules
that come with Lyntin--the action module is the one that handles triggers.
Seems like that's a good place to start.

http://lyntin.sourceforge.net/4.0/tutorials/tutorial1.php
http://lyntin.sourceforge.net/4.0/tutorials/tutorial2.php

There's hook-specific documentation in the API documentation.  Look in the
Index for anything that ends in "_hook".  You want to react to mud data
and not change it.  That's what the action module does.  Even so, I think
you want to react to it in the mud_filter_hook along with all the other
modules that handle mud data.

Hope that helps--
/will


On Fri, 9 Jul 2004, Ned Imming wrote:
>
> Can someone point me to a tutorial that will help me understand how to
> use the hooks to monitor MUD output? In particular something that helps
> with the syntax would be great. Essentially I want to right a bot script
> that will respond to the MUD outputs. Since I am still new to Python I
> really need something that is a very simple example.
>
> The example of flow is simple but it's the level I am looking to start
> with. I think I shouldn't have any problem with the flow control portion
> of the script. The problem I have is passing the MUD output to the
> script so I can process it and then sending a command back to the MUD.
>
> Here is the example of what I am looking for:
>
> MUD: You are in a room. There is a door.
> Script: Scans the output looking for key words, finding "room" and "door"
> Script: Notes that this is the FIRST time it's seen "room"
> Script: Triggers on "door" and sends command "go through door"
> MUD: You go through a door.
> MUD: You are in a room. There is a door.
> Script: Scans the output looking for key words, finding "room" and "door"
> Script: Notes that this is the SECOND time it's seen "room"
> Script: Triggers on "door" and sends command "go through door"
> MUD: You go through a door.
> MUD: You are in a room. There is a door.
> Script: Scans the output looking for key words, finding "room" and "door"
> Script: Notes that this is the THIRD time it's seen "room" Script triggers
> on THIRD room event.
> Script: Sends command to "Look for exits"
> MUD: You look for exits.
> MUD: There is one exit, a door.
> Script: Scans the output looking for key words, finding "door"
> Script: Triggers on "door" and sends command "go through door"
> MUD: You go through a door.
> MUD: You are in a room. There is a door.
> Script: Scans the output looking for key words, finding "room" and "door"
> Script: Notes that this is the FOURTH time it's seen "room" Script triggers
> on THIRD room event.
> Script: Sends command to "Look for exits"
> MUD: You look for exits.
> MUD: There are two exits, a door, and a window.
> Script: Scans the output looking for key words, finding "door" and "window"
> Script: Triggers on "window" and sends "Climb through window."
> MUD: You win.
>
> Thanks,
> Ned
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> Lyntin-devl mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lyntin-devl
>

-- 
whatever it is, you can find it at http://www.bluesock.org/~willg/
except Will--you can only see him in real life.


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com