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
veek
Beginner


Joined: 28 Sep 2006
Posts: 21

PostPosted: Mon Oct 09, 2006 6:08 pm   

Perl Regex/zMUD - matching a multiline string
 
How do i match something like this:
Valev asks you: I am merely curious, what type of weapons do you intend
<lots of spaces>to focus on using?

It's a multiline string and i don't want to use a timer! Note all those spaces - it's always in that pattern -

SanatClaus tells you: blah blah
<space space space>some more blah
<space space space>even more blah blah, etc

In Perl i could m|^(.+)$|si and use . to match \n.

Is there a way to #IF(perl-pattern)

What i'm trying to do is put all chat and says and group says in one window and my monitor(health/gp/spell status - shield) in a seperate window and the room desc in a third - when i jump into combat mode.

2. How do i do #TRIGGER with a PERL Regex from cmd line.

3. How do i set focus to another window and cycle through them.

4. I also want to timestamp every line that is generated and try to figure out how long shields last and other things:
I tried something like (Perl Regex):
^(.+)$
#SAY %time( "hh:nn:ss") -> %1

That goes into a infinite loop! Why? I checked the docs for SAY and it says that text is just locally displayed and not sent to the MUD. Is it being parsed by the Perl engine? I suspect that that may be causing the loop?
Reply with quote
veek
Beginner


Joined: 28 Sep 2006
Posts: 21

PostPosted: Mon Oct 09, 2006 6:25 pm   
 
5. Also how do i do something like #SEND say %ansi(brown)Booo!

6. I use #WIN CHAT %1 to send the text to the CHAT window. Now to scroll up i have to click in that (ideally i'd like to just Ctrl 1 and setfocus on that window) and PgUp/PgDown - however window no 1 also splits up when i PgUp and i have to Shift Z after scrolling through that. Since the Chat window is just a scroll buffer i'd like to prevent it from splitting?
Reply with quote
veek
Beginner


Joined: 28 Sep 2006
Posts: 21

PostPosted: Mon Oct 09, 2006 6:28 pm   
 
7. Err..also Lets say i use the Editor to create some Functions - how do i now put that into zMUD? Is there some place where i can store all my functions (a central repository) and then just reuse them from various triggers?
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