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
➜ Match a trigger, highlight the next line of text
|
Match a trigger, highlight the next line of text
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Sleeve
(31 posts) Bio
|
| Date
| Fri 19 Sep 2003 10:13 PM (UTC) |
| Message
| On the mud I play on, there is a small chance that a spellup spell that you cast could be a "lucky" cast that ends up with greater affects than normal ones. In that case, the output goes like this:
Your magic is blessed with the luck of Mota!
You grant yourself the favor of Mota.
What I would like to do is match on the "Your magic is blessed with the luck of Mota!", omit it from the output, and highlight the next line in yellow or another color (to easily indicate to me that it was a lucky cast). I can't really figure out if this is possible or not, so I thought maybe somebody here can help. Another thing is that the second line can be different messages, it is not always "You grant yourself the favor of Mota." | | Top |
|
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Reply #1 on Fri 19 Sep 2003 11:45 PM (UTC) |
| Message
| Hmm.
<triggers>
<trigger
enabled="y"
match="^Your magic is blessed with the luck .*"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>enabletrigger "Capture_spell",1</send>
</trigger>
</triggers>
<triggers>
<trigger
custom_colour="17"
enabled="n"
match="^.*"
regexp="y"
send_to="12"
sequence="100"
name="Capture_spell"
other_text_colour="gold"
other_back_colour="black"
>
<send>enabletrigger "Capture_spell",0</send>
</trigger>
</triggers>
I am relatively certain that it will color the line before disabling itself, so this should works as long as the second line always appears immediately and regardless of what the line actually says. | | Top |
|
| Posted by
| Sleeve
(31 posts) Bio
|
| Date
| Reply #2 on Sat 20 Sep 2003 12:35 AM (UTC) |
| Message
| | This is great! Thanks so much.. didn't realize it was a simple solution. :) | | Top |
|
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Reply #3 on Sat 20 Sep 2003 04:04 AM (UTC) |
| Message
| | No problem. I practically wrote the book on this sort of triggering and use it for channel traffic. Every time the mud adds a new channel I have access to I think, "Oh great, glad I coded all that mess already..." lol Though your problem was 'very' simple in comparison. ;) | | 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.
14,742 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top