Excluding a name from a trigger.

Posted by Scarn on Fri 12 Mar 2010 01:57 PM — 4 posts, 19,334 views.

#0
I know there is a VB function for this, but cannot find it.

Basicly I have a reply trigger set up so when someone sends me a tell it adds the name to a variable.

eg.

Scarn tells you: Hello.

I think type "r Heya."

The problem I am having is auctioneers also use the tell system and its pretty spammy, a lot of times in mid converstaion with someone an auctioneer will send me a tell and I will have to type the players name.

How can I exclude a name from the trigger?

For example if "Alexa tells you: Blah for sale!" I want Alexa NOT to be added to the variable.

Thanks,

Scarn.
Australia Forum Administrator #1
Since you are adding to a variable I presume you are already scripting? So just test in the script, eg.


if string.match ("%0", "^%a+ tells you, .* for sale!$") then
  return
end


Or even:


if string.match ("%0", "tells you, .* for sale!") then
  return
end


Sorry, that isn't VBscript. Well you could do something similar. Or switch to Lua. ;)
#2
Gah, I refuse to learn Lua - took me long enough to get to grips with VB. :P

This is my trigger.

Upon seeing "Someone tells you: Something"

I return:

setvariable "Reply", "%1"

I remember there being a function that was something like

*(!Alexa|John) tells you: *

that would stop Alexa/John from being added to the variable?

Australia Forum Administrator #3
Template:post=5089
Please see the forum thread: http://gammon.com.au/forum/?id=5089.


Scroll down to "negative lookbehind assertions".