Zmud Question

by Unknown

Back to Mechanic's Corner.

Unknown2011-06-20 21:49:15
If anyone here still uses Zmud, I have a basic question.

Why doesn't this work:

#TRIGGER {^You are a Moonchilde.$} {#sub%ansi(cyan){Moonchilde}}

Thanks!
Lilija2011-06-20 22:09:15
Looks like it's using a regular expression for the capture. If so, and I'm not sure if Zmud requires this, you may need to escape the period. ^You are a Moonchilde\\.$ or something similar ought to work.
Unknown2011-06-20 23:20:06
Does: #SUB {You are a Moonchilde.} {%ansi(cyan)Moonchilde} not work?

Long, long time since I used zMUD, though.
Lendren2011-06-20 23:20:27
QUOTE (Sajin @ Jun 20 2011, 05:49 PM) <{POST_SNAPBACK}>
If anyone here still uses Zmud, I have a basic question.

Why doesn't this work:

#TRIGGER {^You are a Moonchilde.$} {#sub%ansi(cyan){Moonchilde}}

Thanks!

As you pasted it here there's no space between #sub and %ansi. That's the only thing I see that's definitely wrong, though I'm dubious about the {}s as well. My guess is that this is what you actually wanted:
#TRIGGER {^You are a Moonchilde.$} {#sub {%ansi(cyan)Moonchilde}}
Ytran2011-06-20 23:23:35
Draylor/Lendren are correct about what the problem is, and their solutions are both theoretically correct (I forget what constitutes a proper argument for %ansi). Lilija is not, as #TRIGGER does not use regular expressions.
Unknown2011-06-20 23:37:15
#TRIGGER can use regex, but you have to put it in the options parameter then. Alternatively, you use #REGEX to make the trigger.
Unknown2011-06-21 03:21:11
QUOTE (Lendren @ Jun 20 2011, 06:20 PM) <{POST_SNAPBACK}>
As you pasted it here there's no space between #sub and %ansi. That's the only thing I see that's definitely wrong, though I'm dubious about the {}s as well. My guess is that this is what you actually wanted:
#TRIGGER {^You are a Moonchilde.$} {#sub {%ansi(cyan)Moonchilde}}


That worked. Thank you!