|
Mathe Newbie
Joined: 12 Sep 2004 Posts: 2
|
Posted: Sun Sep 12, 2004 2:30 am
Triggers & Variables |
Have a trigger question that I can't seem to figure out. Have tried all the expressions in the helps and none are working. Here is what I have:
Pattern:
cast '(%w)' (%w)
Value:
#var target %1
#var spell {%2}
This will successfully capture most of my spell commands such as armor, bless, etc.
The problem comes in when I cast a spell with two words such as "cure light". To fix this problem I edited my pattern to look like this:
cast '(%w%s%w)' (%w)
That works great with two word spells, but now it will not capture the single word spells successfully.
Any suggestions for how I can easily capture a single or two word spell and assign it to the @spell variable with that pattern?
Thanks all and happy mudding!
Mathe |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Sep 12, 2004 4:11 am |
Sure use a different wildcard. From the Pattern Matching page of the help we find that * is the correct wildcard. Also since you are triggering off your commands it is best to use the proper trigger type and correct the options to ensure a trigger loop does not occur should you ever add more to this trigger.
Pattern:
cast '(*)' (%w)
Value:
#VAR target %2
#VAR spell {%1}
Options: Type=Command Input, Trigger On Trigger=unchecked |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Mathe Newbie
Joined: 12 Sep 2004 Posts: 2
|
Posted: Mon Sep 13, 2004 1:21 pm |
That worked great! I have tried using the (*) before but I did not adjust the options. Thanks again.
|
|
|
|
|
|