The sniper string will calculate a number between 0 and 80 and use this as the percentage of an item's minprice value we are willing to pay. The higher the value of an item, the higher the percentage we use. An item that has a minprice value of 500g for example would show up as long as it gets posted at or below 80% of its value, so at or below 80% 500g = 400g. But an item that is only valued at 5g would only show up if it gets posted at or below 30% 5g = 1g50s. In addition to that, the sniper string will also always show you all items that get posted below their VendorSell price, and it will completely exclude all grey quality items (unless they get listed below their VendorSell price).
The idea behind this is that we really do not want to miss valuable items when they get posted for cheap, so we want to see them even if they get listed just a little bit below their minprice value. We can then still manually decide whether or not we actually want to buy the item. But for lower value items we only want to get notified if they get posted really cheap, otherwise it is not worth our time to even bother with them and we do not want our sniper to get flooded with low value items that aren't actually great deals.
Now, how does the string decide which percentage to use for which item?
I have defined 6 (value | percentage) pairs that look like this:
|minprice value||percentage to be used|
Each of these value pairs represents a blue dot on this graph:
In addition to this, all items that are valued below the value of the first (value | percentage) pair, so below 1g, will use 0% - so items valued at below 1g will be completely excluded and they will never show up (unless they get posted below their VendorSell price).
This means an item valued at 50g will show up if it gets posted at or below 60% of its value and an item valued at 10g will show up if it gets posted at or below 40% of its value.
You might now ask yourself: "But what about an item valued at 30g? There is no percentage defined for that value, right?" This is where the math-stuff of the string comes into play. The string dynamically calculates the percentage that should be used for any given value.
Take 30g for example. The percentage for 10g is defined as 40% and the percentage to be used for 50g is defined as 60%. Since 30g is half way between 10g and 50g, it will use 50% as its percentage, because that is half way between 40% and 60%.