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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Blain20
Beginner


Joined: 27 Aug 2010
Posts: 25

PostPosted: Sat Apr 28, 2012 12:08 am   

Request: ^ ignore prompt
 
Currently, I'm issuing an empty #SAY to put all new text on the next line after a prompt. What I'd rather do, is let the ^ pattern character ignore the prompt in determining if the text is at the beginning or not. Is this at all possible somehow? Perhaps a prompt trigger can call a command to reset the column count to 0 for subsequent triggers.

If this is already possible, please let me know. ;)

Just a thought.
Reply with quote
shalimar
GURU


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

PostPosted: Sat Apr 28, 2012 4:42 am   
 
It is possible. There are a few ways to go about this.

I assume you have your commands echoing to the screen? often turning that off can help.

Alternatively, make a trigger to match your prompt and replace it with nothing.
#SUB {}
_________________
Discord: Shalimarwildcat
Reply with quote
Blain20
Beginner


Joined: 27 Aug 2010
Posts: 25

PostPosted: Sat Apr 28, 2012 5:01 am   
 
Making input move to the next line works for normal MUD operation. Replacing the prompt also would work. However, each comes with its own price. ;) I'm a Wizard, and I need my ed prompt to stay as it is, but if I receive a tell while in ed, the tell isn't at the beginning of the line. Not forcing the trigger to work only at the beginning of a line causes CMUD to churn on every bit of output and actually locks the client up on non-tell output. So somehow allowing ^ to ignore a prompt seems to be my best bet.
Reply with quote
Blain20
Beginner


Joined: 27 Aug 2010
Posts: 25

PostPosted: Sat Apr 28, 2012 5:20 am   
 
Oh, and hello from Mobile, Shalimar. =)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Apr 28, 2012 2:18 pm   
 
No, there isn't any way to change the behavior of ^. The best you can do is change your triggers to allow for an optional prompt at the beginning, or change the output so it never has a prompt at the beginning, as you have already figured out.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Apr 28, 2012 6:11 pm   
 
If your game doesn't allow you to customize the prompt in such a way that you can end with a carriage return (in Aardwolf, this is represented by %c as a prompt command option), you should be able to sub your prompt so that it ends in one. If you give it a priority of 1, I think all further triggers will use the subbed line instead of the original.
_________________
EDIT: I didn't like my old signature
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Sat Apr 28, 2012 9:05 pm   
 
MattLofton: Better than the sub would be:
Code:
<trigger priority="1" newline="false" prompt="true" id="38">
  <pattern>^<Your prompt here> </pattern>
  <value>#SAYADD %char(13)</value>
</trigger>
Reply with quote
shalimar
GURU


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

PostPosted: Sun Apr 29, 2012 2:59 am   
 
My question here would be...
Do you really need to see that prompt? And if so, why?
You claim to need it, but without a reason I really have to doubt why anyone ever needs a visible prompt in this day and age.
Also, as you are a wizard... why not just edit the prompt itself server side to provide it own carriage return?
_________________
Discord: Shalimarwildcat
Reply with quote
Blain20
Beginner


Joined: 27 Aug 2010
Posts: 25

PostPosted: Mon Apr 30, 2012 8:45 pm   
 
The line numbering prompt isn't a prompt, I realized after doing some testing. The ed prompt I was thinking of is "^:$" verbatim and I suppose I'll have to sub that. It'll make editing a little funky, but at least I won't be having to parse out numbers. Those only show up between prompts, and I was thinking they were part of the prompt for some silly reason. Thanks for your help, guys. I will be adjusting my prompt triggers to the highest priority because I've been having an occasional prompt be ignored. ;) Thanks!
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Mon Apr 30, 2012 9:08 pm   
 
Blain20 wrote:
I will be adjusting my prompt triggers to the highest priority because I've been having an occasional prompt be ignored.


Keep in mind that triggers with lower priorities fire first, not triggers with higher priorities.
Reply with quote
Blain20
Beginner


Joined: 27 Aug 2010
Posts: 25

PostPosted: Mon Apr 30, 2012 9:19 pm   
 
Ah, yes. My programmer brain considered 1 as highest. ;)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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