|
Becomplex114 Newbie
Joined: 15 Oct 2011 Posts: 4
|
Posted: Sat Oct 15, 2011 4:00 am
Multi-Line Capture |
How do i capture multiple lines a mud on with no form of punctuation? I want to be able to capture lines from different channels but can't figure out how to do it with no punctuation and no indentation on multiple lines.
Example of channels in the mud:
Bob tells you: Hey hows it going today
did you find what you were looking for
It allows lines longer than i just shortened it for this example. Though all channels are followed by a blank line, but i'm not sure how to use that to end my capture.
Edit: Ok so i looked around some and saw nexela had posted a solution
#TRIGGER "CapTell" {%x tells you: (*)} {#CAP Tell}
#COND {(*)} {#IF (!%null( "%1")) {#CAP tell} {#STATE CapTell 0}}
But this will not capture more than two lines. If someone sends me a tell of 3 lines or more it only captures the first two. Can someone help me? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sat Oct 15, 2011 10:20 am |
you should use #STATE 1, which resets the condition to being in charge, by default it will go back to state 0 after the last trigger state fires already
the condition should also be using the within lines option set to one, so it only tests one line at a time, instead of just waiting for the condition pattern indefinitely... not that thats an issue with the pattern of your condition though
#TRIGGER "CapTell" {%x tells you: (*)} {#CAP Tell}
#COND {(*)} {#IF (!%null( "%1")) {#CAP tell} {#STATE CapTell 1}} {within|param=1} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Becomplex114 Newbie
Joined: 15 Oct 2011 Posts: 4
|
Posted: Sat Oct 15, 2011 4:37 pm |
Thanks a lot, but for some reason this still will only capture 2 lines of a tell on my mud even if they send more than 2. I just can't figure it out.
So i figured i might go for something easier, how would i capture everything between two certain lines?
-=-=-| LAST TELL |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Someone tells you: hows it going today?
You reply: not bad
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I want to capture everything between:
-=-=-| LAST TELL |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
and
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sat Oct 15, 2011 5:47 pm |
you can use #C+ and #C-
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Ralph1971 Wanderer
Joined: 01 Mar 2008 Posts: 64
|
Posted: Sun Oct 16, 2011 3:34 am |
I guess this could relate to an issue I'm having.. I have a script that accesses Alexians database for Realms of Despair.. the first part works fine, but when I try to use the second one, it cuts off some of the ident's from a larger (longer) item.
first one:
Code: |
#DDE RoD_db Info {%-1}
#SAY %dde( RoD_db, Info, Data)
|
tied in with an ident alias..
ident breastplate ravager
Breastplate of the Ravager (body) : bless anti-augurer anti-mage anti-nephandi anti-bladesinger anti-fathomer anti-thief anti-neutral anti-evil Lv=49 AC=12 AC-90 HR+7 DR+7 HP+125 STR+2 wgt=75 $=400000 divinity fighter aberrant shaman good SvPa-3 SvBr-3 SvSp-3 ResCold (10%) ResElectricity (10%) ResAcid (10%)
now the second one
Code: |
#DDE RoD_db Info {%-1}
say %dde( RoD_db, Info, Data)
|
ident breastplate ravager
line too long
You say 'Breastplate of the Ravager (body) : bless anti-augurer anti-mage anti-nephandi anti-bladesinger anti-fathomer anti-thief anti-neutral anti-evil Lv=49 AC=12 AC-90 HR+7 DR+7 HP+125 STR+2 wgt=75 $=400000 divinity fighter aberrant shaman good SvPa-3 SvBr'
how can I keep it from cutting it off?[/code] |
|
_________________ Win7-home - Cmud 3.33a
WinXP-pro - Zmud 7.21 |
|
|
|
Becomplex114 Newbie
Joined: 15 Oct 2011 Posts: 4
|
Posted: Sun Oct 16, 2011 5:59 am huh |
shalimar wrote: |
you can use #C+ and #C- |
Could you elaborate? not sure how to use the C+ and #C- commands even after reading the help file lol |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun Oct 16, 2011 8:26 am |
#TR {line starting the capture} {#C+ windowName}
#TR {line ending capture} {#C-} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Becomplex114 Newbie
Joined: 15 Oct 2011 Posts: 4
|
Posted: Sun Oct 16, 2011 11:37 pm |
Ah, Thank you shalimar.
|
|
|
|
|
|