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
cypren
Wanderer


Joined: 03 Nov 2000
Posts: 59

PostPosted: Mon Sep 02, 2002 2:22 pm   

Suppressing dual lines
 
I've run into an interesting situation regarding MUD prompts and was hoping to find a little advice that might solve it here.

A little background: my issue is that I'm moving some speech lines to different windows, and those lines are usually, but not always, followed by a prompt. Hence, I can #GAG 2 on those lines, but there's a chance that the line following it might not actually be a prompt, and could instead be a useful line of text. (The MUD, if two actions occur almost simultaneously, won't send a prompt between them.) This has occurred enough for me to rule out the double-gag as a solution.

Currently, I'm just using #GAG to mute the transmitted line, and allowing the prompt after it to display, but this creates the annoying effect of having multiple "disembodied" prompts display one after the other if lots of speech lines are going back and forth and no actions are occurring in the room. While not destructive to gameplay, it's a bit annoying.

What I really need to do is find a way to, every time a prompt is displayed, check to see if the previous line displayed (AFTER all triggers were fired, including #GAGs) is also a prompt, and gag it if so. The %line2 variable won't do the trick, because it stores the last line received from the MUD, not the last line displayed in the window.

Does anyone know of an easy way to do this?
Reply with quote
Ralgha
Wanderer


Joined: 13 Aug 2001
Posts: 51
Location: USA

PostPosted: Tue Sep 03, 2002 2:16 am   
 
I had a hell of a time figuring this one out not too long ago, here's how I did it. I'm not posting actual code here since I'm not using Windows at the moment.

I had the trigger that moved the line to another windows gag that one line.

I then set up another trigger for prompts that would check the previous line. If the previous line matched a line that would be grabbed to another window, it would gag the prompt, otherwise the prompt stayed.

If anyone knows of a better way I'm all ears.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Sep 03, 2002 4:11 am   
 
You could also try the reverse of what Ralgha suggested:
#TRIGGER {%w tells you *$(*)} {#IF ("%1" =~ "~<%dhp %dm %dmv~>") {#GAG 2} {#GAG}} "" {prompt}

This trigger matches two lines: a speech line and the line that comes right after that one. It then looks at the second line to see if it matches the pattern of your prompt (I used a generic prompt pattern). If it does, it does #GAG 2, otherwise it does #GAG. Also, I made the trigger so that it will fire on both, newlines and prompt.

Kjata
Reply with quote
cypren
Wanderer


Joined: 03 Nov 2000
Posts: 59

PostPosted: Tue Sep 03, 2002 6:19 am   
 
I actually wound up solving the problem in the plugin layer using the COM CaptureOutput function to verify the displayed text in the main window, but this isn't a solution for everyone, obviously. Kjata's suggestion seems like the best way of handling it in-engine.
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Wed Sep 04, 2002 6:57 pm   
 
The way I handled this is to always gag my prompt... I capture the data, and save it to variables, which I used to set the status bar, then gag the prompt. That way I don't have ANY prompts floating around my screen, this makes my screen much cleaner, and easier for me to read, and I still have my current prompt info available in the status bar.

AzCowboy
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