Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
potnoodle
Newbie


Joined: 12 Feb 2008
Posts: 5

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
potnoodle
Newbie


Joined: 12 Feb 2008
Posts: 5

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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 :(
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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