Trigger for Tells received. (But exclude NPC Tells)

Post Reply
Settun
Posts: 5
Joined: Wed May 01, 2013 1:41 pm

Trigger for Tells received. (But exclude NPC Tells)

Post by Settun » Thu Feb 05, 2015 7:32 pm

I'm trying to adapt viewtopic.php?f=7&t=80 (the But NOT comparison)

to create a trigger that will work when a Player sends a tell, (SoAndSo tells you, )
but at the same time exclude occurences whereby
<NPC Tells shouldn't fire the trigger>
(a guild banker tells you, )
or (Parcel Delivery Liason tells you, )
or (a personal banker tells you, )
or (General Supply Merchant tells you, )
or (Teleportation Assistant tells you, )

{S1}(?!{Teleportation Assistant|Parcel Delivery Liaison|a personal banker|a guild banker|General Supply Merchant|Teleportation Assistant}) tells you, '

Unfortunately the above trigger match doesn't seem to exclude the ones I have in the list. Anyone have an idea how I can solve this?

Thanks
Settun

Sirene
Posts: 38
Joined: Fri Sep 27, 2013 2:52 pm

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by Sirene » Sat Feb 07, 2015 2:00 pm

^((?!Teleportation Assistant|Parcel Delivery Liaison|a personal banker|a guild banker|General Supply Merchant).)*tells you, '

This trigger works but it's a pretty expensive operation to exclude specific NPCs.

Settun
Posts: 5
Joined: Wed May 01, 2013 1:41 pm

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by Settun » Sat Feb 07, 2015 6:01 pm

Thank you very very much Sirene.

Sirene
Posts: 38
Joined: Fri Sep 27, 2013 2:52 pm

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by Sirene » Fri Mar 06, 2015 8:36 pm

I figured out a more efficient way of doing this -

Search Text:

^((?<!\s).)*tells you, '

This will do a negative lookbehind for \s (a space) and exclude tells from anyone or anything with a space in it's name (NPCs with more than one word in their name)

adetia
Posts: 45
Joined: Wed Apr 18, 2012 1:56 am

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by adetia » Fri Jul 24, 2015 2:52 pm

i was previously using a {s} so that when i was tabbed out or in another window, it would flash an tell me who was sending a tell.
i wonder if there is a way to combine that with this, so that it wouldnt trigger off of npcs with spaces in their name, but would tell me who was sending the tell.
anybody know?

Sirene
Posts: 38
Joined: Fri Sep 27, 2013 2:52 pm

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by Sirene » Sun Jul 26, 2015 2:18 am

Search Text: ^(?<char>\w+)((?<!\s).)*tells you, '
Display Text: ${char}

Fancier:

Search Text: ^(?<char>\w+)((?<!\s).)*tells you, '{s}'
Display Text: ${char} tells {c}: {s}

adetia
Posts: 45
Joined: Wed Apr 18, 2012 1:56 am

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by adetia » Wed Jul 29, 2015 4:00 pm

awesome, thank you!

Quuq
Posts: 3
Joined: Mon Jul 27, 2015 3:17 pm

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by Quuq » Fri Jul 31, 2015 2:59 pm

Sirene wrote:Search Text: ^(?<char>\w+)((?<!\s).)*tells you, '
Display Text: ${char}

Fancier:

Search Text: ^(?<char>\w+)((?<!\s).)*tells you, '{s}'
Display Text: ${char} tells {c}: {s}
Since you're using ^ and \w+, you don't need the negative lookbehind for whitespace.

Here's the tell trigger I use:

Search Text:

Code: Select all

^(?!PETNAME1|PETNAME2)((?:\w+\.)?\w+) (?:tells|told) you, '
It also works for cross server tells and intra-server tells sent via the chat server. If you play classes with custom-named pets, you can put their names in the lookahead to keep them from setting off your tell trigger. Otherwise, just delete the (?!PETNAME1|PETNAME2) stuff to make the trigger more efficient. The name of the person sending you the tell is captured in group one (i.e., use ${1} in your output).

If you'd like to capture the message or name the group that captures the name of the sender as well, you can modify it as Sirene has done in the fancier version.

Unfortunately, there are still a few NPCs who make it through filters like this. The Rank II spell NPC in Feerrott: The Dream is one example that comes to mind.

Xata Takushi
Posts: 2
Joined: Tue Aug 11, 2015 8:27 pm

Re: Trigger for Tells received. (But exclude NPC Tells)

Post by Xata Takushi » Tue Aug 11, 2015 9:49 pm

If you are a mage and don't want triggers to fire from tells from your pet in response to commands, I added some additional filtering. Hopefully, unless I messed it up, it still filters out tells from 2 name NPCs as well.

Not sure what kind of performance impact this would have.

^((?<!\s)[^\n\v\f\r])*tells you, (?!'Attacking |'I am unable |'By your command, master.')

Post Reply