Re: Newbie help with commandresponse #prompt
Joshua Berne <berne-7iHiS5+6wm7SUeElwK9/[email protected]> Tue, 14 Sep 2004 18:46:55 -0400 (EDT)
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
To use on any mud with a dynamic prompt or different prompt setting syntax commandresponse would need chaging. Its priority was really to never ever ever miss a prompt, rather than portability or flexibility. I believe the two arguments are a prompt to set the mud prompt too, (which is what it will parse out of responses) and a prompt to show in place of that. (for instance, the defaults i think are something like |---prompt--> and -----\n, so that the text is unlikely to occur accidentally on the mud, and the user gets something more pallatable to see all the time.) Converting to regexs would be difficult if you also want to keep support for prompts being split accross packets. The module does a lot (in increidbly dirty and childish python ways) to make sure it catches partial prompts at the end of a message and matches them with the rest of the prompt at the beginning of the following text from the mud. Neccessity of this and usefulness of this depends a lot on the properties of whatever mud you go to. - Josh On Tue, 14 Sep 2004, David Clymer wrote: > On Tue, 2004-09-14 at 16:52, jb test wrote: > > Hi! I just started using lyntin a week ago - great stuff thanks! But, I'm > > running into a problem getting started with the commandresponse/wbgmapper - > > what the heck does it want for the #prompt?? I tried all kinds of stuff, it > > looks like it will eventually eval to an re? But nothing I tried seems to > > work :( > > > > Anyway, the mud will give a simple prompt, its like <10P 10M> or so, so > > please give me a hint of what I should type in for #prompt :) It also looks > > like it sets it on the mud side too? I guess I really just don't get it. > > To set the above on the mud, the command is > > > prompt <@pP @mM> > > this looks as if you are using metacharacters of some sort when setting > your prompt. As i read it (and i didnt read it real carefully, so take > this with a grain of salt), commandresponse uses the string that you > provide it to set the mud prompt (using: "prompt your_string"), as well > as the string that it considers to be your prompt & that it looks for in > the data coming from the mud. If you pass it <@pP @mM> to > commandresponse, it will look for just that, while what your mud is > really sending back is <10hp 20m> or whatever. It doesnt look as if > commandresponse compiles the prompt string that you give it as a regular > expression, so may need to change your mud prompt to some string that > wont change or modify commandresponse so that it doesnt try to set your > prompt, and pass it a string which you emote before doing the command > whose output you want to capture. > > > > -davidc > > ps. I think i'm right about this, but if i'm not, I would appreciate if > those with real experience with this module would correct my > misinformation. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > Lyntin-devl mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/lyntin-devl > ------------------------------------------------------- This SF.Net email is sponsored by: thawte's Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m