PDA

View Full Version : filters



horseshoecrab
03-05-2004, 09:44 PM
Hi,

I used search, read, re-read, and re-read some more each of the relevant posts in this forum along with a mostly unhelpful O'Reilly book and several web pages that have information on regexp. Now I'm stuck and some help would be greatly appreciated.

As has been discussed in 1 or 2 other threads, I'm interested in having a filtered spawn list in SEQ 5.x that properly removes summoned pets, familiars, mounts, and warders. My global.xml file is as follows:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE seqfilters SYSTEM "seqfilters.dtd">
<seqfilters>
<section name="Filtered">
<oldfilter><regex>Door</regex></oldfilter>
<oldfilter><regex>[Ee]mote</regex></oldfilter>
<oldfilter><regex>Spawner</regex></oldfilter>
<oldfilter><regex>timer</regex></oldfilter>
<oldfilter><regex>`s ([Ff]amiliar|[Mm]ount|[Ww]arder)</regex></oldfilter>
<oldfilter><regex>Name:[GJKLVXZ]([aeio][bnrsk])+(n|tik):.*:NPC:1</regex></oldfilter>
<oldfilter><regex>Name:[GJKLVXZ]([aeio][bnrsk])+([aeio]r|[aeio]b):.*:NPC:1</regex></oldfilter>
</section>
</seqfilters>

The good news is I have yet to have any "false positives" in which non-pets and such end up in the "filtered" section of the list. Now I will come to my question.

My concern is that a mob could be named something such as Lord Jobaber and it would show up in the filtered list which is obviously what I don't want. I've tried using various anchors but the end up removing pets from the list as well. For example


<oldfilter><regex>Name:^[GJKLVXZ]([aeio][bnrsk])+(n|tik):.*:NPC:1</regex></oldfilter>
<oldfilter><regex>Name:^[GJKLVXZ]([aeio][bnrsk])+([aeio]r|[aeio]b):.*:NPC:1</regex></oldfilter>

or

<oldfilter><regex>Name:\<[GJKLVXZ]([aeio][bnrsk])+(n|tik):.*:NPC:1</regex></oldfilter>
<oldfilter><regex>Name:\<[GJKLVXZ]([aeio][bnrsk])+([aeio]r|[aeio]b):.*:NPC:1</regex></oldfilter>

completely removes pets from the filtered list and I truly don't understand why. By the same token, I can't figure out how to use the $ at the end of the string to indicate the mob's name should end with tik, b, n, etc.

Please help, I've really tried hard to make this work. If somebody can nail this down, I believe it would be worthy of Blue Adept's wonderful distributions.

Thanks in advance.

Cryonic
03-05-2004, 10:12 PM
Your problem is that you are thinking that the parts that you can filter on are each their own string. The reality is that the line for filtering a spawn is ONE LONG LINE.

http://cvs.sourceforge.net/viewcvs.py/*checkout*/seq/showeq/conf/filters.conf.dist?content-type=text%2Fplain&rev=1.4

Doing something like:

Name:MobName:* will insure that it won't catch a mob that starts with something before MobName or after MobName because Name:Lord MobName: or Name:MobName Filter: because it doesn't match as there are no wildcards (+, *, ?, etc...) as part of the MobName key.

horseshoecrab
03-05-2004, 11:17 PM
Cryonic,

Thanks for your speedy reply to my post. If I understand what you are saying, there is nothing wrong with my current filters since I'm beginning and ending my filtered pet strings with a colon?

I also re-worded my question in the initial post because I didn't ask it clearly. The goal is to hide pets from the NPC list and put them in the filtered list. In this situation, wild cards are absolutely necessary because there are literally hundreds of variations of the same name.

Cryonic
03-08-2004, 12:52 PM
colons are used to seperate the fields of the spawn line. I understand that some wildcards are needed to catch pets, my example was to show that if you needed the name to end in something, then don't put a wildcard after it.

e.g. v*tik will match anything that has v followed by 0 or more other characters followed by tik

The closest you can come to anchoring the search is to realize that since the line for every spawn is:

Name:Name:Race:Race:Class:Class:NPC:NPC Value:X:X:Y:Y:Z:Z:Light:Light:Deity:Deity Name:RTeam:RTeam:DTeam:DTeam:Type:Type:\[GM:\]

you can't really use the ^ and $ values in Name because they will never match since the line starts with Name: and then the mob name.

As you can see the fields are basically a colon delimited line.

horseshoecrab
03-08-2004, 01:03 PM
Hi Cryonic,

It took me a couple days to grasp what you had told me about the spawn string info being one long string. I finally came to understand what you meant and your last post confirms my understanding of it. Having said that, I'm incredibly happy with how my global filters are functioning (no false positives or negatives) and the doors, summoned pets, etc. are all going away as intended.

Thank you for your assistance. You've taught a man to fish.