Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
GBH
Beginner


Joined: 15 Nov 2000
Posts: 22
Location: United Kingdom

PostPosted: Mon Jul 15, 2002 11:11 pm   

Next Line Trigger Confusion
 
Hi,

I'm trying to do something very simple but no matter how I try and do it I don't seem to get the right result so any help would be greatfully received.

I have a locate spell "where dog"
The MUD prompt is very simple just a plain "*>" for it's prompt. The command goes in as "*>wh dog" and I get a single result if successful of the form "the dog house" from the MUD on the next line. There is no "*>" on the reply. I sometimes also get "The spell was not successful" which I want to ignore. When I get a "good" result I want it to go to a seperate window (easy enough that bit once I have it as a variable or something). Once the command has returned the result I gat another "*>" prompt ready for the next command.

I've already tried to use #CAP but that failed as it captures the lines above the command not below. I've tried a fancy line to capture the next line and display it in another window but that failed.

I'm suspecting I need to set up classes and start and stop it during the capture but I really dont know how.

Thanks in advance for any help you can give me.

GBH
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jul 16, 2002 12:18 am   
 
#AL where {#VAR where 0;#T+ where;#C+ Where;#GAGON;wh dog}
#TR {^~*~>) {#IF (@where) {#T- where;#C-;#GAGOFF;#ECHO {%trigger}} {#VAR where 1}}

This should catch the original input and the response (even if it's "The spell was not succesful). I've included the #ECHO in case it gags the next line. If you start seeing duplcates, delete that portion.
*>wh dog
the dog house

LightBulb
Senior Member
Reply with quote
GBH
Beginner


Joined: 15 Nov 2000
Posts: 22
Location: United Kingdom

PostPosted: Tue Jul 16, 2002 8:46 am   
 
Hi,

Many thanks for this but it doesn't work. If I do a "where dog" (incidentally its not just dog it could be necklace, axe, persona name etc.) the trigger fires and pipes the output to the other window as required. However, once this is done ALL future text and commands go to the "where" window thats opened not just the where command outputs.

The other thing is that you never do a where you always abbreviate it to wh but if it's the only way around it thats fine.

So to recap:

The sequence will look like this

*>wh dog
the dog house
*><next command goes in here>

I want to capture just the line "the dog house" to a different window. As I've said earlier this may be any object or person. However, there are a couple of special cases such as "wh key" which I either want to pipe to yet another window (its a multi line response of about 8 locations) or ignore it altogether.

I'm sorry to further complicate things but any help would be appreciated.

Thanks

GBH
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jul 16, 2002 4:19 pm   
 
Of course it's not always a dog. I must have been focused on the capture problem. Anyway, that part is easy, just remove the dog from the alias.
#AL where {#VAR where 0;#T+ where;#C+ Where;wh}

As for the trigger, you seem to have stumbled on a pattern that zMUD is unwilling to recognize from the command line. You'll have to enter it directly into the editor. Also, it would probably be best not to use gag. I've removed it from the alias.
Put this trigger in the "where" folder
Pattern: ~*~>
Value: #IF (@where) {#T- where;#C-} {#VAR where 1}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net