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 help

Trigger help

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


Posted by Supermanjnk   (1 post)  Bio
Date Thu 09 Oct 2003 02:35 AM (UTC)
Message
Alright, I'm trying to set up a trigger to mass message people with tells. Right now i haev the trigger set up as

* Race *

first astrik is level, second star is name. I have it send the command to the mud
tell %2 (message)
This is where it gets messed up. It includes their title with this line, so say i wanted to message all Elves. I would type who elf and it would give me a list and send a tell to all elves with my message. and it would look like this.
You tell Mistle 'The wandering elf test'
you tell Caytiera 'the dark suductress test'

I want to have it say
You tell Mistle 'test'
you tell Caytiera 'test'

Is there anyway i can keep the second astrik from including the rest of the title.

Thanks.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Thu 09 Oct 2003 02:59 AM (UTC)

Amended on Thu 09 Oct 2003 03:00 AM (UTC) by Flannel

Message
You need to update your trigger, or do some scripting, either way, you need to make it so what youre sending is only the first word of their name, and not their title.

Easiest way would probably be:
Assuming Race is literal "race" and not the race itself, although, itd be easily modifiable.
^(\d+) race (\w+)( .*)?$

Thats assuming the title is optional, if it isnt... you can do this:
^(\d+) race (\w+) (.*)$

This would replace your old trigger, You just need to check "regular expression" on the trigger menu

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Thu 09 Oct 2003 12:03 PM (UTC)
Message
Or you could do ^(.*?) Race ([A-Za-z]+) (.*?)$, should work too

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
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.


9,953 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.