If you have a MC variable named enemy, and want to expand that in a trigger's match pattern then,
var.Enemy = "Orc"
"^You (?P<verb>) @Enemy (?P<Predicate>.*)$"
will match:
"You hit Orc very hard."
fine.
However,
"^You (?P<verb>) @Enemy."
doesn't match
"You hit Orc."
because it seems it's taking the "." as part of the variable name.
Is there some sort of
@<Enemy>, @"Enemy", @[Enemy] quoting/delimiting syntax?
Does @Enemy\. work? Don't have MUSHclient in front of me, but it's just an idea...
Nope, it doesn't... and the real pattern I'm trying to match is:
^You (?P<verb>.*?) @Enemy(?:(?: \.)|(?P<predicate>.+))$
and I wouldn't want to escape the regexp's parenthesis anyway. :)
Why do I always end up asking questions that turn out to have really stupid fixes? (at least I've stopped claiming it was a bug in your code)
I really need to double check while debugging that when I added the trigger, (ctrl+shift+8, alt+a); that I didn't bounce any key strokes.
Cuz, ya know, ctrl+shift+8, alt+a, alt+a ends up
Bringing up the Trigger dialog
Bringing up the Edit Trigger Dialog.
Clearing the enabled flag
side note, you've proved that copying the trigger and pasting the XML into notepad is a good debugging tool.
Umm, can I redeem myself by pointing out that a complete idiot couldn't make:
http://tinyurl.com/59nk9k
Thanks for the compliment, Nick. :)
I actually wrote most of it as a lua module (since just making a plugin is very specific to a task/mud/guild(class)).
After the 500 lines in the module, the actual script that makes and populates values is 20 lines. (not bad for 2 windows and 9 "bars".)
I'll be posting it (probably to a blog since only you can do inline images on the forum) after I get done documenting it.