[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Trigger change....
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Trigger change....

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


Posted by Tatewaki2365   (34 posts)  [Biography] 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?
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] 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.
[Go to top] top

Posted by Tatewaki2365   (34 posts)  [Biography] bio
Date Reply #2 on Wed 30 Jun 2004 09:07 AM (UTC)
Message
A million thanks.
[Go to top] top

Posted by Assassin   (73 posts)  [Biography] 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

[Go to top] 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.


3,899 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]