|
potnoodle Newbie
Joined: 12 Feb 2008 Posts: 5
|
Posted: Sun Mar 23, 2008 4:30 pm
Capturing multiline message |
So my problem is capturing multiline message to variable. I have tried to solve it many ways but it won't work. So I have to capture 4 line message to variable but I only get one line captured to variable. I have used (*) to capture all frojm that message and (*)$(*) wont even get more than that one line. So if there is some guru who wanna help me in this problem you're welcome to post some ideas and maybe solution to this problem.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Mar 23, 2008 4:44 pm |
Give us some text, we'll give you a script. Without the text, we'll have to talk in general terms and you'll probably end up just as perplexed as you were to start with.
My general suggestion, though, is to see if you can turn off server-side word wrapping on your MUD. If you're really attached to lines that're 80 chars wide or whatever, you can set up CMUD's word wrapping to simulate it, but turning it off eliminates all these annoying multiline problems. |
|
|
|
potnoodle Newbie
Joined: 12 Feb 2008 Posts: 5
|
Posted: Sun Mar 23, 2008 5:12 pm |
The target is affected by Two Shields of protection, Two Barkskins, Water
walking, Brain unpain, Energy hauberk, Rebuke of ice, Ward of steel, True
unpain, Iron will and Regeneration.
So from that kinda message i have trigged The target is affected by (*) rest of that text i need to get to variable for further prosessing. And I need all lines to variable to get perfect information for reporting that. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Mar 23, 2008 5:58 pm |
#trig {The target is affected by (*)} {#var effects %1;#t+ EffCap}
#cond {(*).$} {#t- EffCap;#additem effects %1}
#trig "EffCap" {(*)} {#additem effects %1} "" {disable}
EffCap should have a higher priority than the multistate trigger.
But yeah, turn off server-side wrapping. These kind of things are so annoying :( |
|
|
|
|
|