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
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Fri Oct 09, 2009 4:37 pm   

need some trigger help
 
so i was never able to get this to work correctly even in zmud
the mud i play will return something like this

Code:
Level: 119 Holy mirror            N/A     
           Shockproof             N/A


so i decided to use this trigger %s(*)%sN/A to capture it to a var, and the outcome is something along this line 119 Holy mirror

cept i dont want the level of the spell to show up, is there a way to truncate this?
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Fri Oct 09, 2009 5:06 pm   
 
Code:
%d (*)%sN/A
? :>
Reply with quote
Xarsas
Beginner


Joined: 05 Mar 2008
Posts: 16

PostPosted: Thu Oct 15, 2009 7:02 pm   
 
#REGEX {\w+:\s*\d*\s*(\w+\s*\w*)\s*N/A} {var=%1}
or possibly
#REGEX {\w+:\s*\d*\s*(.*)\s*N/A} {var=%1}
the top one will match up to two words with a space between, the bottom will match anything between 119 and N/A(including numbers)

probably not the slickest way to do it but should work fine
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Oct 16, 2009 12:36 am   
 
#REGEX {(?:Level:\s+\d+\s|\s{11})(.+)\s+N\/A} {blah blah blah}

That will match it if it's Level: 119 or just the spaces in front.

Charneus

Edited to allow for extra spaces between the colon and the level. Forget if there is a space after Level or not. Correct that part as needed.
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