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


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Wed Dec 27, 2006 11:39 pm   

Gagging prompt and mapper
 
I play dragonrealms and if I gag the prompt mapper fails to work, if I do not gag the prompt mapper works fine, but triggers fail to work properly

#TRIGGER {^>%s$} {#GAG} "" {nocr|prompt}

That is my prompt gag trigger.

Now without that trigger on, when a message is received from the mud and is to be stored in a variable, 9/10 times it has a prompt in the variable. If I care to trigger off an output from the mud, I need this prompt in my trigger (not always for some reason)

With this trigger enabled however, I cannot get mapper to work at all.

Any suggestions?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 28, 2006 1:20 am   
 
Try instead
#TRIGGER {^>%s$} {#SHOW %cr} "" {nocr|prompt}

That way you'll keep the new line for your triggers to work, and it'll not interfere with the mapper
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Thu Dec 28, 2006 1:23 am   
 
if not your prompt, get some other static frame of reference for your mapper to identify as marking the end of room information.
Reply with quote
Eyeless
Wanderer


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Thu Dec 28, 2006 2:00 am   works kinda
 
This kind of works but for any line that is gaged I sometimes get a fullscreen of >
>
>
>
>
>
>

Any way to recrify that?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 28, 2006 2:05 am   
 
Did you try not gagging it, and instead doing what I suggested?
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Eyeless
Wanderer


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Thu Dec 28, 2006 2:33 am   
 
Yes, I did what you said and my reply was to you sorry, should have specified whose method I tried. When I do the:
#TRIGGER {^>%s$} {#SHOW %cr} "" {nocr|prompt}

I get multipule empty lines of >
>
>
>
>
>
>

Do I need to have this string at the end of any trigger that gags?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Thu Dec 28, 2006 4:53 am   
 
make two seperate triggers

one to supress the prompt

#TR {^>} {#SUB {}}

and one to supress blank lines

#TR {^$} {#GAG}
_________________
Discord: Shalimarwildcat
Reply with quote
Eyeless
Wanderer


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Thu Dec 28, 2006 10:35 am   
 
Well that works too, but not quite how I want it to. Now I have to have 3 triggers 1 to make the mapper see the prompt properly and 2 to surpress the prompt from view.

However it would be much simplier if zmud would just ignore the prompt. After all it isn't the prompt that bugs me, but that the prompt is added to captured triggers.

Also with the second set of triggers offered, I now just see blank lines scroll through my screen. If a line is blank, I don't want my screen to move.

With my original trigger
#TRIGGER {^>%s$} {#GAG} "" {nocr|prompt}
I had that. With these new ones, I do not.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Thu Dec 28, 2006 7:32 pm   
 
If the line is blank, it should have been gagged with my second trigger, now if it just had empty whitespace... that wasnt accounted for.

I personally play Gemstone IV so i know the mapper issues your having... but im not sure why a prompt would affect your variables being assigned.
_________________
Discord: Shalimarwildcat
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 28, 2006 8:04 pm   
 
Problem I can see (but can't think how to fix offhand) is that it's fairly easy to set up a trigger that'll gag consecutive lines containing only ^>%s$
But the lines aren't actually consecutive, since they're being padded out by a bunch of stuff that's being gagged. They appear consecutive. Otherwise you could use some sort of regex negative lookahead ^(?!\s+$) that would fire on any newline that isn't an empty prompt and set a flag to tell the zMUD that different input has been received (so that it shouldn't gag the next empty prompt).
But I think that'd be messed up by normal mud text that's being gagged, since the regex would be firing on stuff that would also get gagged...

Now that I think about it, I think I can see one way around this (lol) - upgrade to CMUD.
Then you could set a high priority for the gagging and tell CMUD not to process any further triggers after the text had been gagged, which would probably get the regex working better.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Eyeless
Wanderer


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Fri Dec 29, 2006 2:00 am   
 
What happens is for some reason the prompt is stored in my triggered variables when the thing being saved is either a whole line or at the beginning of a line (near the prompt) it's as if zmud does not recognise it as a prompt at all. The work around was to disable my trigger when wanting to move with the map and re-enabling when not. Also now the gags only move the screen when the output is client side ( Tick in x seconds) etc.
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