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
Darcnar
Newbie


Joined: 28 Feb 2002
Posts: 6
Location: USA

PostPosted: Fri Mar 01, 2002 12:30 am   

MUD Chat help
 
Hi,

I tried a few triggers and the like from the forum with my MUD chat interface and don't seem to be having any luck.

Here's a sample of what the different interfaces I have and what I might want them to be.

I need all chat channels to go to another window and NOT display in the main window.

Chat examples:
say: You say 'test'
Darcnar says 'test'
newbie: Darcnar [newbie]: test

I just want to offshoot all chat into a new window so battle spam doesn kill it. I'd also like to color the different channels for easy viewing.

Any help would be greatly apprecaited.



Darcnar Darksoul
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 01, 2002 1:20 am   
 
Rework Rainchild's example until you get what
you desire.

If you could post actually mud output it would help in refining the example or create
similar examples. I find the examples you posted "odd" to my mud knowledge.

TonDiening
Beta Upgrading to 6.26
Reply with quote
Darcnar
Newbie


Joined: 28 Feb 2002
Posts: 6
Location: USA

PostPosted: Fri Mar 01, 2002 2:03 am   
 
Here are outputs from the MUD. Exactly how they come out.

Newbie Channel:
Darcnar [newbie]: test
Say:
You say 'Test'
Character says, 'Test'

And I tried reworking Rain's code. I don't really understand it.

Darcnar Darksoul
Reply with quote
Darcnar
Newbie


Joined: 28 Feb 2002
Posts: 6
Location: USA

PostPosted: Fri Mar 01, 2002 2:51 am   
 
Also, how can I color just a part of those phrases.

Like so:

Darcnar tells you 'test'
I want to color "tells you" in blue.

Or for a channel

Darcnar [newbie]: test
I'd like "[newbie]" colored.

Thanks in advance.

Darcnar Darksoul
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 01, 2002 7:31 am   
 
Here is the concept then.
It offers no multiline support.
It guesses that all your communication triggers start on a newline {^pattern}
It thinks all the character names are only one word with only alpha characters.

Newbie Channel:
Darcnar [newbie]: test
I'd like "[newbie]" colored.
#TRIGGER {^(%w) ~[newbie~]~: (%*)} {#GAG;:comms:%ansi(red)%1 %ansi(green)~[newbie~]~: %ansi(red)"%3"}

Say:
You say 'Test'
Character says, 'Test'
#TRIGGER {^(%w) sa({y|ys,}) ~'(%*)~'} {#GAG;:comms:%ansi(red)%1 %ansi(blue)sa%2 %ansi(red)~'"%3"~'}

Tell:
Darcnar tells you 'test'
I want to color "tells you" in blue.
#TRIGGER {^(%w) tells you ~'(%*)~'} {#GAG;:comms:%ansi(red)%1 %ansi(blue)tells you %ansi(red)~'"%2"~'}


1) #GAG takes it out of your main window

2) :comms: Sends it to the comms window.
-> If you don't have a comms window or it doesn't create it then do a
-> #CAP comms;#ECHO Comms window created to make one.

3) To change the colors, modify the word in the %ansi(colorname) function.

TonDiening
Beta Upgrading to 6.26
Reply with quote
Darcnar
Newbie


Joined: 28 Feb 2002
Posts: 6
Location: USA

PostPosted: Fri Mar 01, 2002 9:01 pm   
 
GREAT! Works great.

One other question. What about multiline? And what if the character's name is something like:
Darcnar the toasted [newbie]: test

Would I just use * ~[newbie~] ??

Thanks for the help!!!!

Darcnar Darksoul
Reply with quote
Darcnar
Newbie


Joined: 28 Feb 2002
Posts: 6
Location: USA

PostPosted: Fri Mar 01, 2002 9:06 pm   
 
Ok so three questions...had an extra one in the last post.

THe MUD sometimes does a prompt ">" on a newline and any com channels that end up on that line don't get put into the comms window.

Again, would it work like I was thinking with the * instead of the %w?

Thanks in advance.

Darcnar Darksoul
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Mar 02, 2002 12:27 pm   
 
1)
Darcnar the toasted [newbie]: test
Would I just use * ~[newbie~] ??
#TRIGGER {^(%*) ~[newbie~]~: (%*)} {...}


2)
THe MUD sometimes does a prompt ">" on a newline and any com channels that end up
on that line don't get put into the comms window.
#TRIGGER {^(%*) ~[newbie~]~: (%*)} {...}
becomes with no forced pattern matching from the beginning of the line:
#TRIGGER {(%*) ~[newbie~]~: (%*)} {...}

That is a nasty looking trigger though. I really don't like %* patterns but the
result is just sending that info to a non operational window so your risk is minimized.

3)
multiline would be interesting but slow to process with the *'s maybe. Check to see
if your mud supports a width command first, else post a large segment with the multiline
channel/say and we'll investigate it.

TonDiening
Beta Upgrading to 6.26
Reply with quote
beerygaz
Newbie


Joined: 19 Feb 2006
Posts: 3

PostPosted: Sun Feb 19, 2006 10:06 am   
 
These are grat triggers to get a newbie started, thanks. One question though, the "comm:" to end the output to another window also give that windo focus, is there a way to prevent that?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sun Feb 19, 2006 2:01 pm   
 
use :comm: note the : before comm, that prevents focus being given to the window you are sending to
_________________
Taz :)
Reply with quote
beerygaz
Newbie


Joined: 19 Feb 2006
Posts: 3

PostPosted: Sat Feb 25, 2006 9:31 am   
 
Thanks Taz, much appreciated.

I'm guessing handling multi-line stuff is quite a bit more complex if there's no indicator on the proceeding lines that it is part of the previous line yhat matched the trigger?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Feb 26, 2006 6:32 am   
 
Quote:

I'm guessing handling multi-line stuff is quite a bit more complex if there's no indicator on the proceeding lines that it is part of the previous line yhat matched the trigger?


Sort of. Have you tried playing with #MAKEWINDOW yet? It's just like #WINDOW, but it has options:

#MAKEWINDOW window name REDIRECT

This command sends the entire line straight to the named window, so there's no need to #gag anything. In that window's settings, use a trigger on the prompt or whatever comes after to redirect the window back to your main one.
_________________
EDIT: I didn't like my old signature
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