As many of you know TSM4 comes with a set of if-logic functions that allow for some amazing pricing strings. In the first part of this post I will cover the general idea of these functions, what they do and how you can use them. The second part is aimed at more advanced topics like explaining how you can connect multiple conditions via logical AND, OR and XOR connections.
Functions
These are the if-functions that are available in TSM4:
Function |
Meaning |
ifgt() |
If greater than |
ifgte() |
If greater than or equal to |
ifeq() |
If equal to |
iflte() |
If lower than or equal to |
iflt() |
If lower than |
All of these if-functions can be used with either 3 or 4 parameters. Let’s take a look at ifgt() for example:
ifgt(DBRegionSaleRate, 0.2, 50% DBRegionMarketAvg, 30% DBRegionMarketAvg)
This string will check if the DBRegionSaleRate value is greater than 0.2. If that’s the case, the pricing string will equate to 50% DBRegionMarketAvg. If that is not the case, so if the DBRegionSaleRate value is 0.2 or less, the pricing string will equate to 30% DBRegionMarketAvg.
You can essentially just read the string from left to right: If DBRegionSaleRate gt 0.2, then use 50% DBRegionMarketAvg, otherwise use 30% DBRegionMarketAvg. You can choose to leave out the fourth parameter, like this for example:
ifgt(DBRegionSaleRate, 0.2, 50% DBRegionMarketAvg)
The difference here compared to the previous string is that this string will simply be invalid for items with a DBRegionSaleRate of 0.2 or less.
Value Sources
TSM4 also introduced a number of new value sources that you can now use in your pricing strings. These new value sources combined with if-functions enable you to create pricing strings that do exactly what you want them to do.
These new value sources that are available in TSM4 are:
Value Source |
Meaning |
DBRegionSaleRate |
How many auctions actually sell compared to how many expire or get cancelled |
DBRegionSolderPerDay |
How many of an item get sold per day per realm on average |
NumExpires |
How often one of your items has expired since the last time you personally sold it |
ItemQuality |
The quality/rarity of the item, represented as a number between 0 and 5. 0 = poor, 1 = common, 2 = uncommon, 3 = rare, 4 = epic, 5 = legendary |
ItemLevel |
The itemlevel of an item |
RequiredLevel |
The level required to use/equip an item |
This means you can create pricing strings that behave differently not only depending on the values of the normal price sources like DBRegionMarketAvg, but also based on the values of any of these new value sources.
Examples
You can use this for countless of different things:
- You only want to find common or better quality items in sniper? Simply change YourSniperString to ifgte(ItemQuality, 1, YourSniperString)
- You only want to craft items that yield you a profit of at least 100g that have a DBRegionSaleRate greater than 0.2? Simply use ifgt(DBRegionSaleRate, 0.2, 100g) as your minimum profit setting.
- You want your minimum auctioning price to usually be 150% Crafting but for items that have expired 20 times or more you want to drop your minimum price to 110% Crafting? Simply set your minimum auctioning price to iflt(NumExpires, 20, 150% Crafting, 110% Crafting)
These were just some very basic quick examples to illustrate what kind of possibilities if-functions in combination with these new value sources offer.