Trigger help

Posted by Supermanjnk on Thu 09 Oct 2003 02:35 AM — 3 posts, 13,096 views.

#0
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.
USA #1
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
Amended on Thu 09 Oct 2003 03:00 AM by Flannel
Greece #2
Or you could do ^(.*?) Race ([A-Za-z]+) (.*?)$, should work too