|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Mon Sep 20, 2010 3:34 am
Pattern Matching. |
I am trying to match the following line. Putting everything inside the brackets.
Code: |
Str[avg] Dex[good] Con[great] Int[avg] Wil[good] Agi[avg] |
I thought I had it correctly with the following but that doesn't match.
Code: |
Str~[(%w)~] Dex~[(%w)~] Con~[(%w)~] Int~[(%w)~] Wil~[(%w)~] Agi~[(%w)~] |
|
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Mon Sep 20, 2010 5:11 pm |
cna you give a little more info? i tryed out your strin and it worked for me
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Sep 20, 2010 6:40 pm |
Copy and paste into your reply the line from the mud which this trigger should match, enclosing the line within [code]...[/code] markers.
|
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Mon Sep 20, 2010 8:51 pm |
Nevermind on this it works. I think it was the wizard not working correctly. I closed CMUD and reopened it with same string and it worked.
|
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Tue Sep 21, 2010 1:46 am |
Matching to different sentences.
I am trying to store some information from the score command, but I have to different lines that I am having some difficulty with. Here is the score:
Code: |
Mytrem, a 19 year old Common Human Male:
Str[avg] Dex[good] Con[great] Int[avg] Wil[good] Agi[avg]
Your soul sparks like embers flying free of a fire.
Your account has been awarded 1 roleplay points.
You are quite full, and feeling thirsty.
You are 63 inches tall, and weigh 129 pounds.
You are of medium build for one of your people, and wear size Small (S).
When in combat, your mode is Normal.
You are currently speaking Westron.
You are currently unencumbered.
You are carrying about 20 pounds.
You were born on the 20th day of Viresse, 2472.
You have been playing for 0 days and 7 hours.
You will fight with 100 percent of your effort.
You are standing.
You walk when you travel.
Your group is currently open to new members.
You are affiliated with the following clans:
Dwellers in Gondor (Membership)
|
Now the two lines that are getting confused are:
You are quite full, and feeling thirsty.
and
You are of medium build for one of your people, and wear size Small (S).
Now I have a few triggers, that capture the information I wanted, but the trigger for your hunger and thirst gets fired twice. The pattern is {You are (*) and (*).$} For this pattern I need the star because it can change to one or two words. The color is different for those words.
Now when I hit the second line the trigger gets fired again, which overwrites the first time it was triggered. Any ideas how to fix this? |
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Tue Sep 21, 2010 2:08 am |
you might wanna use annonymous variables in your trigger pattern then since (*) grabs to many options.
instead of '(*)' use '({quite full|hungry|other states|etc})'
takes a little longer to get out the possible hunger states, but the trigger will be more precise. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Tue Sep 21, 2010 2:11 am |
Duh!!!! I didn't even think of that. I should have remembered I could do that. :)
|
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
|
|
|