Register forum user name Search FAQ

Gammon Forum

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 change....

Trigger change....

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Tatewaki2365   (34 posts)  Bio
Date Wed 30 Jun 2004 05:14 AM (UTC)
Message
With this trigger:
([A-Za-z]+) (is( sitting| resting|) here|rides in|walks in)\.$

It's set to attack anyone who is sitting, resting, riding in, walking in, or just standing. How would I modify it to just attack a certain person? What would I have to replace?
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Wed 30 Jun 2004 05:57 AM (UTC)
Message
([A-Za-z]+) (is( sitting| resting|) here|rides in|walks in)\.$
You need to change ([A-Za-z]+) to whomever.

Bob (is( sitting| resting|) here|rides in|walks in)\.$

If you dont have any leading spaces, you might also want to add a ^ (caret) at the beginning. This will make it so you dont match on:

Joe says: Bob is sitting here.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Tatewaki2365   (34 posts)  Bio
Date Reply #2 on Wed 30 Jun 2004 09:07 AM (UTC)
Message
A million thanks.
Top

Posted by Assassin   (73 posts)  Bio
Date Reply #3 on Wed 30 Jun 2004 05:23 PM (UTC)

Amended on Wed 30 Jun 2004 05:27 PM (UTC) by Assassin

Message
I have this on my MUD

^(?:\*\>)?(.*?) the (.*?) has just arrived$

The (?:\*\>)? avoids the *> prompt i have at the
start of a line,, so this may be different from
yours. I have changed the initial "* the * has just
arrived" to a regular expression and sent this to a
variable called target.

So everytime someone 'has just arrived'
ie John or Bob it will save John or Bob to
variable named target.

Make sure Expand Variable box is ticked.

In send box put %1

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,238 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.