|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 12:34 am
Pattern Issue, Regex Coach isn't telling me anything |
Here's the Pattern:
The ancient elven questmaster says 'Thank you, brave Yasan!'
The ancient elven questmaster says 'Vile pilferers have stolen the King's sceptre from the royal treasury!'
The ancient elven questmaster says 'Look in the general area of Ancient Forest for Deep in the forest!'
There's lines between that, but they dont matter. First line turns the triggers on, to capture King's Sceptre, Ancient Forest and Deep in the Forest (variable values)
Here are their respective scripts:
Code: |
#TRIGGER Quest_On {^The (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Thank you, brave (?:Yasan|Fhaeeus|Caemlin|Ashalia|Chamenas|Khoion)!'$}
{
Quest=on
Item1="True"
Item2="True"
Item3="True"
} {General Triggers|Quest Triggers}
#REGEX Quest_Off {^You hand .* to the (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)).$}
{
Quest="off"
Place=" "
Room=" "
Quest_Item=" "
Earplugs="off"
} {General Triggers|Quest Triggers}
#REGEX Quest_Cap1 {^The (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Vile pilferers have stolen (.*) from the royal treasury!'$}
{
#IF (@Item1="True")
{
Quest_Item=%1
Item1="False"
}
} {General Triggers|Quest Triggers}
#REGEX Quest_Cap2 {^The (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Look in the general area of (.*) for (.*)!'$}
{
#IF (@Quest="on")
{
#IF (@Item2="True" AND @Item3="True")
{
Place=%1
Room=%2
Item2="False"
Item3="False"
}
}
} {General Triggers|Quest Triggers}
|
The second two lines match their trigger patterns, the first one doesn't. |
|
Last edited by chamenas on Sun May 11, 2008 12:38 am; edited 1 time in total |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sun May 11, 2008 12:37 am |
Aren't you missing "says" in your first trigger?
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 12:38 am |
Fixed it, I do have the says. Still doesnt work.
|
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Sun May 11, 2008 1:33 am |
The first one doesn't work beause you've made it as a #TRIGGER when it's looking for a #REGEX pattern. If you go into the trigger settings and tick the 'regular expression' box then it works fine.
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 1:35 am |
Oh geez, it's still something small. thanks
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 1:41 pm |
Guess what? I fixed that too, so just a refresher:
Code: |
#REGEX Quest_On {^The ancient elven questmaster says 'Thank you, brave Yasan!'$}
{
Quest=on
Item1="True"
Item2="True"
Item3="True"
} {General Triggers|Quest Triggers}
|
Still not working |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Sun May 11, 2008 3:01 pm |
scratch that
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 3:28 pm |
oops, that's also wrong. Second
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 3:43 pm |
Code: |
#REGEX Quest_Cap2 {^The (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Look in the general area of (.*) for (.*)!'$}
{
#IF (@Quest="on")
{
#IF (@Item2="True" AND @Item3="True")
{
Place=%1
Room=%2
Item2="False"
Item3="False"
}
}
} {General Triggers|Quest Triggers}
|
This is the right one, and it still doesn't work.
Edit: May have fixed it...
Edit Edit:
Code: |
#REGEX Quest_Cap2 {^(?:The|A) (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Look in the general area of (.*) for (.*)!'$}
{
#IF (@Quest="on")
{
#IF (@Item2="True" AND @Item3="True")
{
Place=%1
Room=%2
Item2="False"
Item3="False"
}
}
} {General Triggers|Quest Triggers}
|
Still doesn't work.
This is an example from just one character:
A priest of Cliath says 'Thank you, brave Caemlin!'
You have asked to find a lost item.
A priest of Cliath says 'Vile pilferers have stolen the Crown Jewels from the royal treasury!'
A priest of Cliath says 'My court wizardess, with her magic mirror, has pinpointed its location.'
A priest of Cliath says 'Look in the general area of Gahboom Hill for An Uneven, Hot Corridor!'
A priest of Cliath says 'You have 39 hours to complete this quest.'
A priest of Cliath says 'May the gods go with you!'
All the others are similar, but with different Priests and character names. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Sun May 11, 2008 5:27 pm |
And you say it's not matching? Have you stuck a #show {works} in there to see if it really matches or not?
On a side note, you could really get a lot of mileage out of switching from string values to 1s and 0s. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 5:55 pm |
I could, and I'm inconsistent. A few of my variables are 1s and 0s. *shrugs* I guess it really doesn't matter either way. But yes, it says this doesn't match. And well it works on one of my characters. Will have to check back on the other. Unfortunately, that's the one I can't copy and paste into.
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sun May 11, 2008 9:47 pm |
What do you mean Regex Coach isn't helping? That matches. You are doing something else that isn't doing what you want it to do.
When it matches in Regex Coach the whole damn thing turns bright yellow! So you need to be more specific on WHAT isn't working.
Your pattern of:
Code: |
^(?:The|A) (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Look in the general area of (.*) for (.*)!'$ |
matches the line of:
A priest of Cliath says 'Look in the general area of Gahboom Hill for An Uneven, Hot Corridor!' |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 11, 2008 11:10 pm |
It never turned yellow for me. And how do I account for variables in regexcoach? Just copy and paste all the strings with | between them?
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Mon May 12, 2008 6:03 am |
I'm not sure why you are having so much trouble.
You just take your pattern:
Code: |
^(?:The|A) (?:ancient elven questmaster|Bishop of New Thalos|priest of Cliath|High Priest of (?:Arkane|Althainia)) says 'Look in the general area of (.*) for (.*)!'$ |
Paste that in the top box. Then paste the line you are trying to match in the second box.
A priest of Cliath says 'Look in the general area of Gahboom Hill for An Uneven, Hot Corridor!'
It will highlight the line yellow showing that it matches.
Of course you would have to use the actual list. It isn't going to know what you have a in a variable.
http://img.photobucket.com/albums/v455/amphibian/RegexCoach.png |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon May 12, 2008 2:30 pm |
As a side note, I'd use a multistate trigger rather than turning the captures on and off. But in principle it should work either way.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Mon May 12, 2008 3:55 pm |
Rahab wrote: |
As a side note, I'd use a multistate trigger rather than turning the captures on and off. But in principle it should work either way. |
I don't remember if I tried that. This was just the most obvious and simple route that I could think of. |
|
|
|
|
|