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


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Mon Aug 16, 2004 11:17 am   

Problem with pattern
 
Hello!
I have trigger with pattern:

^{> |}(*) {ledwo muska|lekko rani|rani|powaznie rani|bardzo ciezko rani|masakruje} cie

In english, this is something like: ^{> |}(*) {hurts|hits|etc} you

And when i gave the line:

1)
Ovvi powaznie rani cie toporem.
In %1 I have: "Ovvi powaznie"

2) Ovvi lekko rani cie toporem.
In %1 I have: "Ovvi lekko"

I don't want to change it in value becouse it can make lag when I write: %remove(" bardzo ciezko", %remove(" lekko", %remove(" powaznie",%1))) etc.
I want to eliminate this only IN PATTERN.

But how to do this?
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Mon Aug 16, 2004 1:06 pm   
 
Couple things:

1. The Library explains, "The pattern is the text to be matched" while "The command is the command to be executed when the pattern is received from the MUD" (for command line entry, equivalent to the Settings Editor's Pattern and Value fields). I don't think it's possible to eliminate string list entries via "PATTERN".

You could create a string list and delete from it.

#AL AttackStyles {ledwo muska|lekko rani|rani|powaznie rani|bardzo ciezko rani|masakruje}
#TR {^{> |}(*) ({@AttackStyles})} {#DELI AttackStyles whatever}

When your #TR matches you can use #DELI to delete from the string list.

2. I noticed your original trigger has duplicate overlapping matches (e.g. lekko rani cie, rani cie, powaznie rani cie, etc.) I'm not sure if that will lead to conflicts/problems later. Just wanted to mention it in case. Smile
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Mon Aug 16, 2004 2:00 pm   
 
It not what I wanted.
I found the solution.

^(?:> |)(.*?) (?:@rani_cie)

where rani_cie = ledwo muska|lekko rani|rani|powaznie rani|bardzo ciezko rani|masakruje
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