Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Trigger matching an expanding variable
Trigger matching an expanding variable
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Trevize
(21 posts) Bio
|
Date
| Mon 04 Jan 2010 08:15 PM (UTC) |
Message
| <variable name="names">trevize|crean|kacie|zeltik</variable>
<trigger
expand_variables="y"
ignore_case="y"
match="^(\w+) waves (his|her) hands quickly in front of the eyes of a Vodun doll of @!names\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>Note("Matched")</send>
</trigger>
It's quite obvious what I want to do. I'm sorry for most likely asking for an answer that is somewhere in this forum already but I've been searching for a hour or so now..
Also the reason I want to match a variable instead of adding it into the trigger itself by doing (crean|zelik|trevize|kacie) is that I have many triggers with these specific names and I want to be able to change the names easily.
Thanks | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #1 on Mon 04 Jan 2010 08:19 PM (UTC) Amended on Mon 04 Jan 2010 08:23 PM (UTC) by Twisol
|
Message
| You want to put parentheses around that: (@!names)
This is incredibly confusing, haha, every time I see a post from you I think it's from one of my friends who also uses the name Trevize. But he has a different alias on these forums... >_<
EDIT: For what it's worth, yes, it's obvious what you want to do, but it is far from obvious what the issue you're having is. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Rakon
USA (123 posts) Bio
|
Date
| Reply #2 on Tue 05 Jan 2010 05:03 AM (UTC) Amended on Tue 05 Jan 2010 05:04 AM (UTC) by Rakon
|
Message
| For future code posts:
 |
To make your code more readable please use [code] tags as described here.
|
Twisol said:
You want to put parentheses around that: (@!names). This is incredibly confusing, haha, every time I see a post from you I think it's from one of my friends who also uses the name Trevize.
Same thing I said to myself. I was like 'Oh comon Trevize, you know WAY better than that'. Then I remembered that's not his S/N here.
Twisols answer is correct. Must have an expanded variable group in ()'s in a trigger match. |
Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
13,932 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top