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


Joined: 08 Jul 2004
Posts: 3
Location: USA

PostPosted: Thu Jul 08, 2004 6:33 am   

Capturing Tells that are longer than 1 line long.
 
I have a tellwindow that obviously captures tells and sends them to a window above the main mud interface. Also have a similar trigger that i use to have my tells read back to me using the plugin MudReader. Thing is both mudreader and the tellwindow will not capture more than 1 line of a single tell. Thus the first line goes to the window leaving the rest in the main window, and the Mudreader says half the tell.

Thanks for any help that can be provided.
Very Happy[8D][:I][:p][}:)]Wink[:o)][8]Cool[:0][:(!][xx(][|)][V][^][:X]
Reply with quote
Cbisazza
Wanderer


Joined: 27 Feb 2003
Posts: 69
Location: Australia

PostPosted: Thu Jul 08, 2004 6:55 am   
 
Ideally your MUD will have a mode where it sends all the tell in one line - This is the easy solution.

Otherwise you'll have to match the start of the tell and the end of the tell, and process all lines in the tell manually.

Paste a sample 'tell' if you need help in this.
Reply with quote
Deadlok
Newbie


Joined: 08 Jul 2004
Posts: 3
Location: USA

PostPosted: Thu Jul 08, 2004 7:19 am   
 
here is a sample tell. My script is pretty shoddy so a new one would be nice. but ill show you what i have for my tellwindow script.

2 triggers:
1st trig: ^ (%*)
2nd trig: ^(%w) tells you: (%*)

value: #IF (%1 != Alexa) {
#IF (%1 != Laryn) {
#CAP TellHist
#GAG
}
}

Alexa and Laryn's Ifs are to gag them. They are auctioners on my mud that i didnt want in my tellhist window.

Fofester tells you: Thranduil's Kingdom at A Large Cavern. room: lower
chamber
Reply with quote
madman
Newbie


Joined: 08 Jul 2004
Posts: 2

PostPosted: Thu Jul 08, 2004 11:34 pm   
 
I am going to piggy back on this topic as well because I am having a heck of a time with this same type of problem

Here's what I got.

Pattern:
^(*) tells you: (*)$

Value:
#GAG
#WINDOW Channel {%1 tells you: %2}

Works great and nice and simple. But when the tell is over a line long, it only does the first line. (Seems like a lot of people have this problem)

The only way to know that its a tell on the next line is that the second line on the screen has 3 spaces in front of it.

So basically the tell fills up the first line, works fine, but the second line of the tell is indented 3 spaces and shows up on the main window (obviously).

Any advice would be greatly appreicated!

-M-
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Jul 09, 2004 1:00 am   
 
Do a search for tell capturing shuold get you on the right track for multiline tells
Reply with quote
Zorprime
Newbie


Joined: 01 Feb 2003
Posts: 4
Location: USA

PostPosted: Fri Jul 09, 2004 4:17 am   
 
This is what I am using at 3Kingdoms. I have a window called Chats.

#REGEX "Tell_Trigger" {^(?:>s|)(You tell w+|w+ tells you|w+ LTs (.+)|You LT (.+)):?(.*)$$(.*)$$} {
#GAG
:Chats:#SAYPROMPT {%cr%ansi( bold, red)"["%time( hh:mm)"] "%ansi( bold, cyan)"["%1"]: "%ansi( bold, grey)%2}
}
#COND {^ +(?:LT:)?(.*)$$} {
#GAG
:Chats:#SAYPROMPT {%ansi( bold, grey)" "%1}
} {looppat|prompt|regex}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jul 09, 2004 4:37 pm   
 
LightBulb's standard multiline approach:
Starting pattern - enable main trigger
* - main trigger to color, capture, gag, add to database variable, etc
Ending pattern - disable main trigger

#TR {(%w) tells you: } {#IF (("%1" != "Alexa") AND ("%1" != "Laryn")) {#T+ tellcapture}}
#TR tellcapture {*} {#CAP TellHist;#GAG} {} {disable}
#TR {{.|?|!}$} {#T- tellcapture}

Sorry, Deadlok, but I can't tell from your sample output how you would know that you reached the end of the line, so I don't know what to use for an ending pattern. I've assumed an ending period, question mark, or exclamation point and used that.
Reply with quote
Falan
Wanderer


Joined: 17 Aug 2004
Posts: 98
Location: OK, USA

PostPosted: Sun Aug 22, 2004 11:04 am   
 
(wrong thread)
_________________
zMUD 7.05a
Reply with quote
a5hi5m
Beginner


Joined: 04 Mar 2004
Posts: 24
Location: Australia

PostPosted: Thu Dec 02, 2004 9:47 pm   
 
Sorry to railroad someone elses thread/posts, but with Lightbulb's script, is there a way to store what is captured into (a) variable, rather than sending it to another window?
_________________
Smoking@BatMUD
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Dec 03, 2004 11:57 am   
 
Intead of this line:
Code:
#TR tellcapture {*} {#CAP TellHist;#GAG} {} {disable}


change it to:
Code:
#TR tellcapture {*} {#var cTells %1} {} {disable}

The above isn't tested, but it should just put all of the above line(s) into the cTells variable
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Sun Dec 05, 2004 10:56 pm   
 
#TRIGGER {(%w) tells you '(*)'} {#capture Channels} always worked for me O.o
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Tue Dec 07, 2004 5:59 pm   
 
Orrrr, you could do this:

#trigger {(%w) tells you: *} {#capture TellHist %line}
#cond {%match(%line,"^ *$")} {#capture TellHist %line} {loopexp|param=2}

This will catch a tell that extends over 3 lines, and will stop as soon as it encounters a line without the 3 spaces at the front.
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