|
Xolademoness Wanderer
Joined: 18 Jun 2004 Posts: 73 Location: United Kingdom
|
Posted: Wed Aug 16, 2006 2:34 pm
^{ |}{^A white rabbit}(*) is now here. |
What is the problem with this syntadx I can't figure it out
I want to capture stuff like the highlighted bits from the below example lines (no, not just wizard, that's why I did the exclude for rabbit, or tried to anyway):
A fat wizard is now here.
A fat wizard is now here. [with a space at the start of the line]
WITHOUT capturing the below example lines
A white rabbit is now here.
A white rabbit is now here.[with a space at the start of the line]
Soooo, how do I make it still capture the name? At the moment it just ignores the excluder bit in curly brackets entirely, I don't know why |
|
_________________ mhm.. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Aug 16, 2006 3:07 pm |
^ means the literal start of the line.
with the way you have it might be thinking that the 2nd ^ is IN the trigger
The (*) wont help either
^{ |}{A white rabbit} is now here.
or
^{ A white rabbit|A white rabbit} is now here.
I think either will work. Don't have zmud at work anymore so can't test. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Aug 16, 2006 3:13 pm |
Here, luckily i'd brought over my exported mud file to print out.
Looked thru it and found this part:
#TRIGGER "globalquestended" {^Global Quest: The global quest has {been won by |expired~. There is no winner~.}} {
SOOOO
#trigger {^{ A white rabbit|A white rabbit} is now here.}
I think that should work, tho i dont see any reason why this shouldnt work either.
#trigger {^{ |}{A white rabbit} is now here.} |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Aug 16, 2006 5:21 pm |
exclusions require [] square brackets and a carrot^ so it would be [^a white rabbit]
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Aug 16, 2006 7:40 pm |
crud, now that I actually READ the post I see what the question is.
#trigger {^{(%*)| (%*)} is now here.} {#var mobcap "%1"}
that should be it.
For some reason I thought u were looking to trigger on a specific mob. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Aug 16, 2006 11:52 pm |
I would actually say that this can't really be done with the zScript pattern syntax and would be extremely hard even in a direct regex pattern. I think the way it would have to be done is matching a list within a list something along the lines of:
zScript: ^{ |}({{^A white rabbit|A blue rabbit}|*}) is now here.$
REGEX: ^(?: |)(?=(?!A white rabbit|A blue rabbit)|.*) is now here.$
I think it would just be simpler to use the open match then just #IF in the code for the trigger:
#TRIGGER {^{ |}(*)is now here.$} {#IF (!%match("%1","{A white rabbit|A blue rabbit}")) {Do something}} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Aug 17, 2006 3:37 am |
If I'm not mistaken, lists within lists are not possible. That wouldn't make sense though since we DO have nested list capabilities, so it was probably just a trigger/pattern issue I didn't feel like dealing with at the time.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Xolademoness Wanderer
Joined: 18 Jun 2004 Posts: 73 Location: United Kingdom
|
Posted: Sun Aug 20, 2006 7:06 am |
erm ok I'm confused :(
what do you all recommend I do then for it to work? |
|
_________________ mhm.. |
|
|
|
Xolademoness Wanderer
Joined: 18 Jun 2004 Posts: 73 Location: United Kingdom
|
Posted: Wed Aug 23, 2006 7:50 pm |
bump
|
|
_________________ mhm.. |
|
|
|
|
|