What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Help with the regex on Item filter

kossboss

New Member
Joined
May 22, 2013
Messages
144
Reaction score
2
Having trouble with the regex on the item filter.

What I am try to do is have the bot vendor items[1-16]. I have tried to get it to do this many ways.
Like this which I didnt think would work.
OneHandSword[1-16]
Like this which should have worked.
OneHandSword*([1-9]|[1][0-6])
And also like this that should have worked.
/Weapons/\w*/(?!(Wands|FishingRods))\w*/[a-zA-Z]*([1-9]|[1][0-6])

Here's a pick of what my options look like when I am trying to do it.

k5OFDXi.webp

What I am guess is it is somthing really small and stupid that is not making this work.
I would love to try and get this version to work as it is easier to modify. OneHandSword*([1-9]|[1][0-6])

Some other side questions. Why are there three cycles when clicking Regex(An open box, close box, and checked off). What do they mean?
Same goes for Match Any on the Types section.

Please help I have done through and redone my pickit, took hours and wanna get this is done and good to go!.

Once this get sorted I can post up a decent easily configurable pickit so peoples stashes don't get cluttered and stop the bot from running.
 
Before trying in the bot, test it here.

Regex Tester

Use the DATA from here: https://gist.github.com/anonymous/93c4e72b5acad002f371
paste it there, in the Regex TEster, and try you code in the REGEX text field.

edit1,

Some of your code is wrong, i tested it and it does not match what you want.

edit2,

this: /Weapons/\w*/\w*/[a-zA-Z]*
gets you almost there, but REGEX with numbers is complicated.

Was speaking with Drew earlier today, and while it seems that with REGEX we get the least lines and achieve a lot, but most times is not the best.

edit3,

the best approach to this would be to "match all expect these items in the list"
Dagger17
Dagger18
Dagger19
.
.
.
 
Last edited:
That is what I was doing but for some reason it would not work. What combination of buttons IE on item filter to I click to say match all besideds these?
 
check the match any box (there are three states for that box: checked, unchecked, white checked)

in the sell category, with it checked, will match ANY item/category you listed.

OR/AND (if you have both at the same type, it is just a double dipping/check)

in stash category, with it unchecked, will not stash ANY item/category you listed.

I have something similar to this, i add/remove stuff from that list depending on rare drops i want to keep, like 2handed when i am lvling a marauder . . .

i ll post some screens what i have done.

edit,
Screenshot%202014-03-19%2021.18.44.png

Screenshot%202014-03-19%2021.18.54.png


i have both, but i think one would already do the job, the filter does not overlap, ive both just for the case one fail, the other will catch . . .

the first will make sure that stash all rares that match that list
the second will sell all rares that do not match that list

oh, i also id all rares/uniques i stash/sell.

Screenshot%202014-03-19%2021.21.16.png


you just have to do the other way around, you want to stash everything that does not match the list and sell the ones that match, while with me, i want to stash everything that match the list and sell all other.

like i described at the start of this post . . .
 
Last edited:
What I am guess is it is somthing really small and stupid that is not making this work.

There's two things:
1) Make sure you don't have any overlapping Stash filters, as the bot will not sell anything that matches any stash filter.
2) The regex you posted for "OneHandSword*([1-9]|[1][0-6])" is indeed correct and works with the bot. However, it's only going to match the OneHandSword item type, not the one hand sword weapon category type. Consider a 1H rapier, which is: "Metadata/Items/Weapons/OneHandWeapons/OneHandThrustingSwords/Rapier1". Your regex would not match that, so you'd need to make one for that weapon type as well. The same is true of the 1H maces, swords, sceptres, and so on.

You could make a regex to match them all of course, but you'd just have to play with that. This is all you need to do to test in C# though:
Code:
using System;
using System.Text.RegularExpressions;

namespace RegexTest
{
    class Program
    {
        static void Main(string[] args)
        {
            const string input = @"Metadata/Items/Weapons/OneHandWeapons/OneHandSwords/OneHandSword1";

            Match match = Regex.Match(input, @"OneHandSword*([1-9]|[1][0-6])", RegexOptions.IgnoreCase);
            if (match.Success)
            {
                Console.WriteLine("Matched");
            }
            else
            {
                Console.WriteLine("Did not match");
            }
        }
    }
}

That's all the bot does in the item evaluator to test regex.

Some other side questions. Why are there three cycles when clicking Regex(An open box, close box, and checked off). What do they mean?
Same goes for Match Any on the Types section.

3 state is for: Enabled/On (checked), Disabled/Off (unchecked), Not Considered (indeterminate)

The indeterminate state is what we use for "null", so we don't have to check properties on items that never need it to be checked. This allows for filters to be small and concise rather than how they used to be where every single thing to filter had to exist in the json file first.

Match Any means that it will match any of the entries, as otherwise it would match all. That setting is to allow for anti-filters, for example, the skill gem filter that doesn't pickup common skill gems that are matched by name. So when Match Any is unchecked, the filter will match unless a value listed matches, in which case the filter does not match.
 
So if say it says stash all rares is will overide the sell filter?
Also If the but does not have it as a vendor filter it will just stash it?
 
Last edited:
Correct, if you have a Stash filter for all rares, then it's impossible for any Sell filter to match if it checks for a Rare item.

Stash filters are really "Do Not Sell" filters. After you Id, the Stash filters would be checked so nothing is sold if it matched any of them. The name just wasn't changed, since there's hardly any case where you don't want to stash an item in your inventory (the exception cases were added, which were the shards).

There was a time when the Stash filter would dictate what would get stashed, but that design didn't make much sense after using it some and people's inventories were left full due to not stashing various things. From then, it made more sense to just stash everything in your inventory rather than have a filter that says what to stash.
 
Last edited:
Well here is my code that I was testing last night, even after all of this I still do not see what is wrong with it.

Here it is.

Code:
[
  {
    "Description": "Default pickup filter.",
    "Type": 1,
    "Filters": [
      {
        "Description": "Pickup all maps",
        "Enabled": true,
        "Types": [
          "/Maps/"
        ]
      },
      {
        "Description": "Pickup Rares and Uniques",
        "Enabled": true,
        "Rarities": [
          3,
          2
        ]
      },
      {
        "Description": "Pickup all currency except...",
        "Enabled": true,
        "Names": [
          "Name Goes Here"
        ],
        "NameRegex": false,
        "NameMatchAnyRatherThanAll": false,
        "Rarities": [
          5
        ]
      },
      {
        "Description": "Pickup Gems",
        "Enabled": true,
        "Types": [
          "/Gems/"
        ],
        "Names": [
          "Greater Multiple Projectiles",
          "Portal",
          "Reduced Mana",
          "Life Leech",
          "Faster Casting",
          "Life Gain on Hit",
          "Blood Magic",
          "Chain",
          "Multistrike",
          "Melee Splash",
          "Cast On Critical Strike",
          "Empower",
          "Cast when Damage Taken",
          "Enhance",
          "Enlighten",
          "Vaal"
        ],
        "NameMatchAnyRatherThanAll": true,
        "Rarities": [
          4
        ]
      },
      {
        "Description": "Chromatic Orbs",
        "Enabled": true,
        "Rarities": [
          0,
          1
        ],
        "SocketColors": [
          "R-G-B"
        ]
      },
      {
        "Description": "Pickup all 5/6-link items",
        "Enabled": true,
        "MinLinks": 5
      },
      {
        "Description": "Pickup all 6-socket items",
        "Enabled": true,
        "MinSockets": 6
      },
      {
        "Description": "Pickup all quality flasks. (Disabled)",
        "Enabled": false,
        "Types": [
          "/Flasks/"
        ],
        "MinQuality": 1
      },
      {
        "Description": "Pickup all utility flasks. (Disabled)",
        "Enabled": false,
        "Types": [
          "FlaskUtility"
        ]
      },
      {
        "Description": "Armourer's Scrap",
        "Enabled": true,
        "Types": [
          "/Armours/"
        ],
        "Rarities": [
          0
        ],
        "MinQuality": 20
      },
      {
        "Description": "Whetstone",
        "Enabled": true,
        "Types": [
          "/Weapons/"
        ],
        "Rarities": [
          0
        ],
        "MinQuality": 20
      },
      {
        "Description": "Baubles",
        "Enabled": true,
        "Types": [
          "/Flasks/"
        ],
        "Rarities": [
          0
        ],
        "MinQuality": 20
      },
      {
        "Description": "Pick Up quality gems.",
        "Enabled": true,
        "Types": [
          "/Gems/"
        ],
        "MinQuality": 1
      }
    ]
  },
  {
    "Description": "Default stash filter.",
    "Type": 3,
    "Filters": [
      {
        "Description": "Currency and Uniques",
        "Enabled": true,
        "Rarities": [
          5,
          3
        ]
      },
      {
        "Description": "5+ linked items",
        "Enabled": true,
        "Rarities": [
          2,
          1,
          0,
          3
        ],
        "MinLinks": 5
      },
      {
        "Description": "Maps and Utility Flasks",
        "Enabled": true,
        "Types": [
          "/Maps/"
        ],
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          2,
          1,
          0,
          3,
          5
        ]
      },
      {
        "Description": "Rings, Amulets and Belts",
        "Enabled": true,
        "Types": [
          "/Rings/",
          "/Amulets/",
          "/Belts/"
        ],
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          3,
          2
        ]
      },
      {
        "Description": "Gems",
        "Enabled": true,
        "Types": [
          "/Gems/"
        ],
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          4
        ]
      }
    ]
  },
  {
    "Description": "Default vendor filter.",
    "Type": 2,
    "Filters": [
      {
        "Description": "Chromatic 3L's",
        "Enabled": true,
        "Rarities": [
          0,
          1
        ],
        "MaxLinks": 4,
        "SocketColors": [
          "R-G-B"
        ]
      },
      {
        "Description": "6 Sockets",
        "Enabled": true,
        "Rarities": [
          0,
          1,
          2
        ],
        "MinSockets": 6,
        "MaxLinks": 4
      },
      {
        "Description": "Helms to sell",
        "Enabled": true,
        "Types": [
          "HelmetStr*([1-7])",
          "HelmetDex*([1-7])",
          "HelmetInt*([1-7])",
          "HelmetStrDex*([1-7])",
          "HelmetStrInt*([1-7])",
          "HelmetDexInt*([1-9])"
        ],
        "TypeRegex": true,
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          2
        ]
      },
      {
        "Description": "Boots to sell",
        "Enabled": true,
        "Types": [
          "BootsStr*([1-6])",
          "BootsDex*([1-6])",
          "BootsInt*([1-6])",
          "BootsStrDex*([1-6])",
          "BootsStrInt*([1-6])",
          "BootsDexInt*([1-6])"
        ],
        "TypeRegex": true,
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          2
        ]
      },
      {
        "Description": "Gloves to sell",
        "Enabled": true,
        "Types": [
          "GlovesStr*([1-6])",
          "GlovesDex*([1-6])",
          "GlovesInt*([1-6])",
          "GlovesStrDex*([1-6])",
          "GlovesStrInt*([1-6])",
          "GlovesDexInt*([1-6])"
        ],
        "TypeRegex": true,
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          2
        ]
      },
      {
        "Description": "Shields to sell",
        "Enabled": true,
        "Types": [
          "ShieldStr*([1-9]|[1][0-4])",
          "ShieldDex*([1-9]|[1][0])",
          "ShieldStrDex*([1-9]|[1][0-3])",
          "ShieldStrInt*([1-8])",
          "ShieldDexInt*([1-9]|[1][0-3])"
        ],
        "TypeRegex": true,
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          2
        ]
      },
      {
        "Description": "Armourer Scraps, Whetstones and Baubles",
        "Enabled": true,
        "Rarities": [
          0,
          1
        ],
        "MinQuality": 20,
        "MaxLinks": 4
      },
      {
        "Description": "Weapons to sell",
        "Enabled": true,
        "Types": [
          "Claw*([1-9]|[1][0-9])",
          "OneHandAxe*([1-9]|[1][0-6])",
          "OneHandSword*([1-9]|[1][0-6])",
          "Rapier*([1-9]|[1][0-6])",
          "OneHandMace*([1-9]|[1][0-6])",
          "Sceptre*([1-9]|[1][0-6])",
          "Dagger*([1-9]|[1][0-2])",
          "Dagger14",
          "Dagger*([1][6-9])",
          "Dagger21",
          "OneHandAxe*([1][7-8])",
          "Bow*([1-9]|[1][0-5])",
          "Bow*([1][7-9]),",
          "Staff*([1-9]|[1][0-3])",
          "TwoHandAxe*([1-9]|[1][0-3])",
          "TwoHandSword*([1-9]|[1][0-3])",
          "TwoHandMace*([1-9]|[1][0-3])"
        ],
        "TypeRegex": true,
        "TypeMatchAnyRatherThanAll": true,
        "NameMatchAnyRatherThanAll": false,
        "Rarities": [
          2
        ]
      },
      {
        "Description": "Armours to sell",
        "Enabled": true,
        "Types": [
          "BodyStr*([1-9]|[1][0-4])",
          "BodyDex*([1-9]|[1][0-4])",
          "BodyInt*([1-9]|[1][0-4])",
          "BodyStrDex*([1-9]|[1][0-4])",
          "BodyStrInt*([1-9]|[1][0-4])",
          "BodyDexInt*([1-9]|[1][0-4])"
        ],
        "TypeRegex": true,
        "TypeMatchAnyRatherThanAll": true,
        "Rarities": [
          2
        ]
      }
    ]
  },
  {
    "Description": "ID Filters",
    "Type": 5,
    "Filters": [
      {
        "Description": "Id filter Rares + Uniques.",
        "Enabled": true,
        "Rarities": [
          2,
          3
        ]
      }
    ]
  }
]
 
What specific item are you trying to test with?
 
I was testing with an assortment of onehandswords (not raipiers). And it was selling them all.

And you were expecting it not to? I'm trying to setup the exact test case you did so I can run your filter and tell you why it's doing what it is.
 
And you were expecting it not to? I'm trying to setup the exact test case you did so I can run your filter and tell you why it's doing what it is.

Alright and no, It was suppost to stash a few and sell a few.
 
Please test Beta #780 to see if your filter is now working as expected. There was indeed a bug with selling.
 
Back
Top