|
Yodous Apprentice
Joined: 23 Jun 2004 Posts: 105 Location: Poland
|
Posted: 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? |
|
|
|
SCORNME Novice
Joined: 25 Jul 2004 Posts: 48 Location: aka Falan
|
Posted: 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. |
|
|
|
Yodous Apprentice
Joined: 23 Jun 2004 Posts: 105 Location: Poland
|
Posted: 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 |
|
|
|
|
|