 |
Sacrifice Newbie
Joined: 23 Jan 2004 Posts: 2 Location: Canada
|
Posted: Tue Mar 30, 2004 10:26 pm
capture trigger |
I was curious how I can set up a capture funtion that will capture all the text after a given pattern? I am currently using capture to save all the guild lines and tells that I may miss during combat and sending them to the tell window. I am having trouble setting it up to send all the text in after the pattern, and am only able to see the first line. I see that there is a means of inserting -1 in the trigger in order to capture all the lines. At this moment I have been unsuccesful in accomplishing this. Any help would be super!
|
|
|
 |
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 10:42 pm |
Can you post an example(s) of EXACT incomming text?
|
|
|
 |
Sacrifice Newbie
Joined: 23 Jan 2004 Posts: 2 Location: Canada
|
Posted: Tue Mar 30, 2004 10:53 pm |
[*Priest Sacrifice*] how much cna I type in this windown and still
see in my capture window, I am curious...I have a
couple lines now, maybe more..no, not more, and I
think I have the channel set up ow, so that is
good...the capture should go to my tell window
now, right?
is what I typed in to send to the Priest guild, and the following is what was returned in my capture window;
[*Priest Sacrifice*] how much cna I type in this windown and still
I am using the following as my capture trigger;
Pattern [*Priest
#cap tell
I also have verbatim selected in options |
|
|
 |
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 10:56 pm |
Here is my script for capturing tells. On my mud all tells will end with a " ...So, my script fires on *tells you,* and you tell*.
and will move all lines to the Tell window until it finds " at the end of a line.
Code: |
#CLASS {dsScripts|dsTells}
#TRIGGER "tellTrig" {^*tells you,*} {
#WINDOW {tells} {%line}
#IF (%rightback(%line,1) = %char(34)) {#STATE tellTrig 0}
} "" {notrig}
#CONDITION {} {#IF (%rightback(%line,1) = %char(34)) {
#WINDOW {tells} {%line}
#STATE tellTrig 0
} {#WINDOW {tells} {%line}}} {looplines|param=10}
#TRIGGER "tellTrigReply" {^You tell *} {
#WINDOW {tells} {%line}
#IF (%rightback(%line,1) = %char(34)) {#STATE tellTrigReply 0}
} "" {notrig}
#CONDITION {} {#IF (%rightback(%line,1) = %char(34)) {
#WINDOW {tells} {%line}
#STATE tellTrigReply 0
} {#WINDOW {tells} {%line}}} {looplines|param=10}
#CLASS 0
|
Copy and paste Version:
Code: |
#CLASS {dsScripts|dsTells};#TRIGGER "tellTrig" {^*tells you,*} {#WINDOW {tells} {%line};#IF (%rightback(%line,1) = %char(34)) {#STATE tellTrig 0}} "" {notrig};#COND {} {#IF (%rightback(%line,1) = %char(34)) {#WINDOW {tells} {%line};#STATE tellTrig 0} {#WINDOW {tells} {%line}}} {looplines|param=10};#TRIGGER "tellTrigReply" {^You tell *} {#WINDOW {tells} {%line};#IF (%rightback(%line,1) = %char(34)) {#STATE tellTrigReply 0}} "" {notrig};#COND {} {#IF (%rightback(%line,1) = %char(34)) {#WINDOW {tells} {%line};#STATE tellTrigReply 0} {#WINDOW {tells} {%line}}} {looplines|param=10};#CLASS 0
|
Hope that helps  |
|
|
 |
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 11:01 pm |
We posted at the same time. My script wont work it seems. Is there anyway you can tell if the line is done? is the text indented? on the second lines?
example
Code: |
[my channel] this is an example and goes over one line of text
but the mud indents its with 4 spaces on the next line,
and 4 more if it goes to 3 lines. |
|
|
|
 |
|
|