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

[Plugin Addon] "Item Rules" with a file based scripting language

darkfriend77

Member
Joined
Jun 14, 2011
Messages
467
Reaction score
2
Code:
// +---------------------------------------------------------------------------+
// | _______         ___                             __   __              
// ||_     _|.-----.'  _|.-----.----.--------.---.-.|  |_|__|.-----.-----.
// | _|   |_ |     |   _||  _  |   _|        |  _  ||   _|  ||  _  |     |
// ||_______||__|__|__|  |_____|__| |__|__|__|___._||____|__||_____|__|__|
// |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                                                                                                                                                                                   
// +---------------------------------------------------------------------------+
// | - actual beta development can be downloaded separate on the
// |   donators repository.
// | - actual beta rules can be downloaded separate on the donators repository
// | - contributors are welcome to help building rules
// | - rules sets provide a best effort for valuable items (not beeing perfect)
// | - donators: https://riouxsvn.com/svn/dbplugins
// | - public:   https://subversion.assembla.com/svn/CustomTrinity/trunk
// +---------------------------------------------------------------------------+
// | ______ __                             __              
// ||      |  |--.---.-.-----.-----.-----.|  |.-----.-----.
// ||   ---|     |  _  |     |  _  |  -__||  ||  _  |  _  |
// ||______|__|__|___._|__|__|___  |_____||__||_____|___  |
// |                         |_____|                |_____|
// +---------------------------------------------------------------------------+
// | 2.0061(beta):
// | - fixed the PICKUP validation ...
// | - fix selling craftingPlan
// +---------------------------------------------------------------------------+
// | 2.005(beta):
// | - better pickup identification with PICKUP & IGNORE
// | - better logging and fixed some bugs
// | - added pickup rules
// | - workaround for name bug
// | - fixed some rules
// | - added soft rules
// | - added language legendary.dis for fr, it, ru
// | - moved UnifiedTrinity CE 1.7.1.3 to 1.7.1.4
// +---------------------------------------------------------------------------+
// | 2.004(alpha):
// | - starting on implementation for pickup.dis
// | - separate pickup rules for itemtypes possible
// | - added some medium rules from tesslerc
// +---------------------------------------------------------------------------+
// | 2.003(beta):
// | - fixed bug, ... hope so 
// +---------------------------------------------------------------------------+
// | 2.0021(beta):
// | - dirty hack to loot all 58+ rare gloves fix applied
// | - added better rules for legendary 2-h weapons
// | - experimentel try on Cached Items - working stable so far
// | - rewrote some rules to be easier readable
// +---------------------------------------------------------------------------+
// | 2.001(beta):
// | - Fixed CraftingPlans
// +---------------------------------------------------------------------------+       
// | 2.00(beta):
// | - no major issues (i think)         
// | - moved UnifiedTrinity 0.44 to 0.45
// | - moved UnifiedTrinity CE 1.7.1.2 to 1.7.1.3
// | - added the converted rules to section hard
// | - added some documentation
// | - added better rules for legendary 1-h weapons
// +---------------------------------------------------------------------------+
// | 2.00(alpha):
// | - complete new scripting engine
// | - allowing much more flexibility
// | - converted all rules to 2.0 standard
// | - more information comming                                               
// +---------------------------------------------------------------------------+
// | 1.03a(fix1):
// | - Fixed selling of crafting plans
// | - added a version in repository with UnifiedTrinity v0.44                                                
// +---------------------------------------------------------------------------+
// | 1.03a(final):
// | - working on rule set ... relying on auctionhouse values
// | - better log's
// | - changed [DMGFACTOR] to include also average dmg
// | - added [OFFSTATS] and [DEFSTATS]
// | - crafting plans settings now in special.dis
// | - fixed crafting plans [TYPE] == CraftingPlan,
// |   [QUALITY] == Legendary,Rare6,Rare5,Rare4
// | - added rules for class specific one-hand weapons
// | - added rules for class specific two-hand weapons
// | - added rules for class specific helms and chest .. cloak
// +---------------------------------------------------------------------------+

STATUS: PUBLIC DOWNLOAD (since 04.12.12)


PUBLIC RELEASE : RELEASED! :p


public release contains actual beta
including rules sets from private dev.
- hard rare rules
- soft legendary rules
- common pickup rules

HAVE FUN!!!

plz report bugs and errors



CONTACT:
skype: darkfriend77
email: [email protected]
PM demonbuddypage: darkfriend77


OLD ITEM RULES

Code:
// +--------------------------------------------------------------------------------------+
// | _ _| __ __| __|     |     __|  __| __ __|    _   |  | |     __|   __| 
// |   |     |   _|   |/ |   __   _|     |        /  |  | |     _|  __  
// | ___|   _|  ___| _|  _|   ____/ ___|   _|     _|_ __/ ____| ___| ____/ 
// +--------------------------------------------------------------------------------------+
// | Created by darkfriend ... idear from D2 Pickit
// +--------------------------------------------------------------------------------------+


the example implementation in the attachment is made with Unified Giles ...

http://www.thebuddyforum.com/demonb...ied-gilesplugins-unnoficial-updates-file.html

An example of an item rule:

Code:
// - The Butcher's Sickle -----------------------------------------------------+
// Legendary Axe
// 349.7?1044.4 Damage Per Second
// (204-536)?(334-1071) Damage
// 1.30 Attacks per Second
// +66-316 Minimum Damage
// +88-411 Maximum Damage
// +26-30% Damage
// Critical Hit Damage Increased by 51-55%
// 2.50-2.70% of Damage Dealt Is Converted to Life
// 20-25% chance to drag enemies to you when attacking.
// +2 Random Magic Properties
// Item Level: 60
[QUALITY] == Legendary && [NAME] == The Butcher's Sickle # [DPS] > 800 && [SOCKETS] > 0 && ([LOH] > 0 || [MAXSTATVIT] > 100) 
[QUALITY] == Legendary && [NAME] == The Butcher's Sickle # [DPS] > 900 && [SOCKETS] > 0
[QUALITY] == Legendary && [NAME] == The Butcher's Sickle # [DPS] > 1000


How to use with GilesTrinity:
- just use it as it would be a version of GilesTrinity.
- Copy or Replace ur GilesTrinity with this TrinityCustom.

returned u get
  • InterpreterAction.NULL = NO ACTION
  • InterpreterAction.KEEP = KEEP ITEM
  • InterpreterAction.TRASH = TRASH ITEM

How it is working:
Item drop -> Town Run for identify and stash/sell items

Sell to vendor <--- [TRASH] <------ Item Rules Addon ------> [KEEP] ---> Stash in your chest.
.................................................. ...... |.................................................
.................................................. .......V.......................................... .......
.................................Nothing. Not [KEEP] and not [TRASH]...................
.................................................. ...... |.................................................
.................................................. .......V.......................................... .......
.....................................Use Giles Trinity Settings..................................

thx to Crazymanxox for this asci gfx ^^

Scripting:
Code:
// +---------------------------------------------------------------------------+
// | _ _| __ __| __|   \  |     __|  __| __ __|    _ \  |  | |     __|   __| 
// |   |     |   _|   |\/ |   \__ \  _|     |        /  |  | |     _|  \__ \ 
// | ___|   _|  ___| _|  _|   ____/ ___|   _|     _|_\ \__/ ____| ___| ____/ 
// +---------------------------------------------------------------------------+
// | Created by darkfriend ... idear from D2 Pickit
// +---------------------------------------------------------------------------+
// +---------------------------------------------------------------------------+
// |   __| __ __| _ \  |  |  __| __ __| |  | _ \  __| 
// | \__ \    |     /  |  | (       |   |  |   /  _|  
// | ____/   _|  _|_\ \__/ \___|   _|  \__/ _|_\ ___|                                            
// +---------------------------------------------------------------------------+
// | only use one line per rule
// | 
// | '#' sign divides the rule in to 3 parts
// | 1 # 2 # 3 example. [TYPE] == Legs # [STR] < 50 # [TRASH]
// | 
// | part 1 =  [TYPE] == Legs
// | the info available on unidentified items ...
// | 
// | part 2 =  [STR] < 50
// | the info available on identified items ...
// | 
// | part 3 =  [TRASH]
// | the action to do with the item on a positive rule outcome
// | 
// | TO TEST any kind of logical coposition u can use [1]
// | that returns 1 and [TEST] that returns TEST.
// | ex. [TEST] == Test # [1] == 1 && ([1] != 1 || [1] != 1)
// +---------------------------------------------------------------------------+
// +---------------------------------------------------------------------------+
// |   _ \  _ \ __|  _ \    \ __ __| _ \  _ \   __| 
// |  (   | __/ _|     /   _ \   |  (   |   / \__ \ 
// | \___/ _|  ___| _|_\ _/  _\ _| \___/ _|_\ ____/ 
// +---------------------------------------------------------------------------+
// | and                   "&&"
// | or                    "||"
// | equal then            "=="
// | not equal then        "!="
// | less or equal then    "<="
// | bigger or equal then  ">="
// | less then             "<"
// | bigger then           ">"
// | u can use round brackets (blah || blah || blah)
// +---------------------------------------------------------------------------+
// +---------------------------------------------------------------------------+
// |    \ __ __| __ __| _ \ _ _|  _ )  |  | __ __| __|   __| 
// |   _ \   |      |     /   |   _ \  |  |    |   _|  \__ \ 
// | _/  _\ _|     _|  _|_\ ___| ___/ \__/    _|  ___| ____/     
// +---------------------------------------------------------------------------+
// | -CODE-                           | Attribute-                  | Example                                                 
// +----------------------------------+-----------------------------+----------+
// |  [BASETYPE]                      | ItemBaseType                | Weapon 
// |  [QUALITY]                       | ItemQuality                 | Rare						 
// |  [TYPE]                          | ItemType                    | Axe							 
// |  [LEVEL]                         | Level                       | 60								 
// |  [ONEHAND]                       | OneHand                     | true							
// |  [TWOHAND]                       | TwoHand                     | false							 
// +----------------------------------+-----------------------------+----------+
// |  [STR]                           | Strength                    | 100							 
// |  [DEX]                           | Dexterity                   | 100							 
// |  [INT]                           | Intelligence                | 100						 
// |  [VIT]                           | Vitality                    | 100							 
// +----------------------------------+-----------------------------+----------+
// |  [REGEN]                         | HealthPerSecond             | 254					 
// |  [LIFE%]                         | LifePercent                 | 12						 
// |  [LS%]                           | LifeSteal                   | 3							 
// |  [LOH]                           | LifeOnHit                   | 655							 
// |  [MS%]                           | MovementSpeed               | 12						 
// |  [AS%]                           | AttackSpeedPercent          | 6				 
// +----------------------------------+-----------------------------+----------+
// |  [CRIT%]                         | CritPercent                 | 4.5						 
// |  [CRITDMG%]                      | CritDamagePercent           | 59					 
// |  [BLOCK%]                        | BlockChance                 | 8						 
// +----------------------------------+-----------------------------+----------+
// |  [ALLRES]                        | ResistAll                   | 80							 
// |  [RESPHYSICAL]                   | ResistPhysical              | 60					 
// |  [RESFIRE]                       | ResistFire                  | 60						 
// |  [RESCOLD]                       | ResistCold                  | 60						 
// |  [RESLIGHTNING]                  | ResistLightning             | 60					 
// |  [RESARCAN]                      | ResistArcane                | 60						 
// |  [RESPOISON]                     | ResistPoison                | 60						 
// |  [RESHOLY]                       | ResistHoly                  | 60						 
// +----------------------------------+-----------------------------+----------+
// |  [ARMOR]                         | Armor                       | 345								 
// |  [ARMORBONUS]                    | ArmorBonus                  | 200						 
// |  [ARMORTOT]                      | ArmorTotal                  | 1300					 
// +----------------------------------+-----------------------------+----------+
// |  [FIREDMG%]                      | FireDamagePercent           | 3					 
// |  [LIGHTNINGDMG%]                 | LightningDamagePercent      | 3			 
// |  [COLDDMG%]                      | ColdDamagePercent           | 3					 
// |  [POISONDMG%]                    | PoisonDamagePercent         | 3				 
// |  [ARCANEDMG%]                    | ArcaneDamagePercent         | 3				 
// |  [HOLYDMG%]                      | HolyDamagePercent           | 3					 
// +----------------------------------+-----------------------------+----------+
// |  [DPS]                           | WeaponDamagePerSecond       | 1100				 
// |  [WEAPAS]                        | WeaponAttacksPerSecond      | 1.5			
// |  [WEAPMAXDMG]                    | WeaponMaxDamage             | 560					 
// |  [WEAPMINDMG]                    | WeaponMinDamage             | 255					 
// |  [MINDMG]                        | MinDamage                   | 100							 
// |  [MAXDMG]                        | MaxDamage                   | 200							 
// +----------------------------------+-----------------------------+----------+
// |  [THORNS]                        | Thorns                      | 2345							 
// |  [DMGREDPHYSICAL]                | DamageReductionPhysicalPerc.| 2		 
// +----------------------------------+-----------------------------+----------+
// |  [MAXARCPOWER]                   | MaxArcanePower              | 15					 
// |  [ARCONCRIT]                     | ArcaneOnCrit                | 10						 
// |  [MAXMANA]                       | MaxMana                     | 5							 
// |  [MANAREG]                       | ManaRegen                   | 5							 
// |  [MAXFURY]                       | MaxFury                     | 5							 
// |  [HEALTHSPIRIT]                  | HealthPerSpiritSpent        | 245				 
// |  [MAXSPIRIT]                     | MaxSpirit                   | 10							 
// |  [SPIRITREG]                     | SpiritRegen                 | 5						 
// |  [HATREDREG]                     | HatredRegen                 | 5						 
// |  [MAXDISCIP]                     | MaxDiscipline               | 5						 
// +----------------------------------+-----------------------------+----------+
// |  [GF%]                           | GoldFind                    | 25							 
// |  [MF%]                           | MagicFind                   | 20							 
// |  [PICKUP]                        | PickUpRadius                | 5						 
// |  [GLOBEBONUS]                    | HealthGlobeBonus            | 5468					 
// +----------------------------------+-----------------------------+----------+
// |  [SOCKETS]                       | Sockets                     | 1							 
// +----------------------------------+-----------------------------+----------+
// |  [MAXSTAT]                       | highest class specific stat | 200	
// |                                  | (str,int,dex)		    |
// |  [MAXSTATVIT]                    | highest class specific stat | 250		
// |                                  | (str,int,dex) + vit         |				
// |  [MAXONERES]                     | highest single resist       | 60				
// |                                  | (arcane,cold,fire,holy,     |
// |                                  |  lightning,physical,poison) |
// |  [TOTRES]                        | total resistance            | 140					
// |                                  | (allres,arcane,cold,fire,holy,
// |                                  |  lightning,physical,poison) |
// |  [DMGFACTOR]                     | dmg factor                  | 12						
// |                                  | = as% + crit%*2 + critdmg%/5|
// |                                  |   + average/20              |
// |  [STRVIT],[DEXVIT],[INTVIT]      | primary attribut vitality   | 200			
// |  [AVGDMG]                        | average dmg                 | 200						
// |                                  | = (mindmg + maxdmg) / 2	    |
// |  [OFFSTATS]                      | offensiv stats              | 3					
// |                                  | = as%,crit%,critdmg%,avgdmg |
// |                                  | counting each as one if it is
// |                                  | bigger then 0	            |
// |  [DEFSTATS]                      | defensiv stats              | 3					
// |                                  | = vit,allres,armorbonus,    |
// |                                  |   block%,life%,regen        |
// |                                  | counting each as one if it is
// |                                  | bigger then 0               |
// +----------------------------------+----------------------------------------+			
// +---------------------------------------------------------------------------+
// | \ \   /  \    |     |  | __|   __| 
// |  \ \ /  _ \   |     |  | _|  \__ \ 
// |   \_/ _/  _\ ____| \__/ ___| ____/ 
// +---------------------------------------------------------------------------+
// |  ItemType:
// |  ---------
// |  Axe,Sword,Mace,Dagger,Bow,Crossbow,Staff,Spear,Shield
// |  Gloves,Boots,Chest,Ring,Amulet,Quiver,Shoulder,Legs
// |  FistWeapon,Mojo,CeremonialDagger,WizardHat,Helm,Belt
// |  Bracer,Orb,MightyWeapon,MightyBelt,Polearm,Cloak,Wand
// |  SpiritStone,Daibo,HandCrossbow,VoodooMask,FollowerSpecial
// +---------------------------------------------------------------------------+
// |  ItemBaseType
// |  ------------
// |  Armor,Weapon,Jewelry,Misc,Gem
// +---------------------------------------------------------------------------+
// |  ItemQuality
// |  -----------
// |  Inferior,Normal,Superior,Rare,Magic,Legendary,Special
// |
// |  for CraftingPlans use Rare4,Rare5,Rare6 & Legendary
// +---------------------------------------------------------------------------+
// +---------------------------------------------------------------------------+
// |  |  /   \ |   _ \ \ \      / \ |    _ )  |  |  __|   __| 
// |  . <   .  |  (   | \ \ \  / .  |    _ \  |  | (_ | \__ \ 
// | _|\_\ _|\_| \___/   \_/\_/ _|\_|   ___/ \__/ \___| ____/ 
// +---------------------------------------------------------------------------+
// | - [AS%] not working on weapons ... use [WEAPAS] to check for speed
// | - [BLOCK%] not working on shields (untested) 
// +---------------------------------------------------------------------------+

commited ... check out ... check changelog changes ! :-)

Code:
// +--------------------------------------------------------------------------------------+
// |  _ _|   \ |  __| _ \  _ \   \  |    \ __ __| _ _|   _ \   \ | 
// |    |   .  |  _| (   |   /  |\/ |   _ \   |     |   (   | .  | 
// |  ___| _|\_| _| \___/ _|_\ _|  _| _/  _\ _|   ___| \___/ _|\_|                                                                                                               
// +--------------------------------------------------------------------------------------+
// | - actual beta development can be downloaded separate on the donators repository
// | - actual beta rules can be downloaded separate on the donators repository
// | - contributors are welcome to help building rules
// | - rules sets provide a best effort for valuable items (far from beeing perfect)
// +--------------------------------------------------------------------------------------+
// |   __|  |  |    \     \ |   __|  __|  |      _ \   __| 
// |  (     __ |   _ \   .  |  (_ |  _|   |     (   | (_ | 
// | \___| _| _| _/  _\ _|\_| \___| ___| ____| \___/ \___|                                                        
// +--------------------------------------------------------------------------------------+
// | 1.03a(final):
// | - working on rule set ... relying on auctionhouse values
// | - better log's
// | - changed [DMGFACTOR] to include also average dmg
// | - added [OFFSTATS] and [DEFSTATS]
// | - crafting plans settings now in special.dis
// | - fixed crafting plans [TYPE] == CraftingPlan, [QUALITY] == Legendary,Rare6,Rare5,Rare4
// | - added rules for class specific one-hand weapons
// | - added rules for class specific two-hand weapons
// | - added rules for class specific helms and chest .. cloak
// +--------------------------------------------------------------------------------------+


Code:
// +---------------------------------------------------------------------------+
// |   __|  |  |    \     \ |   __|  __|  |      _ \   __| 
// |  (     __ |   _ \   .  |  (_ |  _|   |     (   | (_ | 
// | \___| _| _| _/  _\ _|\_| \___| ___| ____| \___/ \___|        
// +---------------------------------------------------------------------------+
// | 2.00(alpha):
// | - complete new scripting engine
// | - allowing much more flexibility
// | - converted all rules to 2.0 standard
// | - more information comming                                               
// +---------------------------------------------------------------------------+

Code:
// +---------------------------------------------------------------------------+
// | _______        __   __                    
// ||   _   |.----.|  |_|__|.-----.-----.-----.
// ||       ||  __||   _|  ||  _  |     |__ --|
// ||___|___||____||____|__||_____|__|__|_____|
// |                                           
// +---------------------------------------------------------------------------+
// |  -> [KEEP]   keep item  
// |  -> [TRASH]  trash item
// |  -> [SCORE]  use score to evaluate item
// +---------------------------------------------------------------------------+
// | _______                          __                    
// ||       |.-----.-----.----.---.-.|  |_.-----.----.-----.
// ||   -   ||  _  |  -__|   _|  _  ||   _|  _  |   _|__ --|
// ||_______||   __|_____|__| |___._||____|_____|__| |_____|
// |         |__|                                           
// +---------------------------------------------------------------------------+
// |  LOGICAL OPERATOR:
// |  -----------------
// |  AND         "&&"       true && false   -> false
// |  OR          "||"       true || false   -> true
// |  EQUAL       "=="         10 == 11      -> false
// |  NOTEQUAL    "!="         10 != 11      -> true
// |  LESSEREQUAL "<="         10 <= 10      -> true
// |  BIGGEREQUAL ">="         10 >= 10      -> true
// |  LESSTHEN    "<"          10 <  10      -> false
// |  BIGGERTHEN  ">"          10 >  10      -> false
// |  BRACKETS    "()"    (5+5)*2 == 5+(5*2) -> false
// |  PLUS/MINUS  "+-"          1 +  2       -> 3
// |  MULT/DIV    "*/"          1 *  2       -> 2
// +---------------------------------------------------------------------------+

Code:
Folders			Description
-------			-----------

- alpha			some ugly testing, better don't touch this ....
- beta			try give some feedback trough... eMail, Skype, PM or what ever
- preFinal		this should be the version to use for advantage to non donators
- release		public release

to use newest release i will provide a ItemRule Version number in each file, but i will release
on a stable UnifiedGiles and on the most actual probably unstable...

so files will be ....
- ItemRules2-01UniTrinity1-7-00stable.zip
- ItemRules2-01UniTrinity1-7-12unstable.zip

actual item rules ... will be included from the separate folder

- rules
  |- soft		only best selling stuff is beeing pickt up probably 1+ Million
  |- medium		only best selling stuff is beeing pickt up probably 5+ Million
  |- hard		only best selling stuff is beeing pickt up probably 10+ Million

[DONATE via PayPal]

Development of ItemRules
is now kept private until release
access will be garanted to
donators & contributors
including new rule sets
 
Last edited:
This seems interesting, but as im no coder whatsoever im having some questions :-)

What exactly whould the code to keep this weapon and upwards? imgur: the simple image sharer

And where to put the codeline within the current GilesTrinity.cs?
 
This seems interesting, but as im no coder whatsoever im having some questions :-)

What exactly whould the code to keep this weapon and upwards? imgur: the simple image sharer

And where to put the codeline within the current GilesTrinity.cs?
why do you want to keep this one? If for the dps, this version can't help right now, just wait for darkfriend to update.
if for Critical damage, you should add this to 'item.dis' in the folder 'Specification':

[BASETYPE] == Weapon # [CRITDMG%] > 63
 
it's nice. the default rule is no good enough.
just copy your files into plugins/ ?
 
Last edited:
This is boss. I am itching to get something like this working in addition to Trinity picking/stashing routines. Keep up the good work! =)
 
darkfriend77 i will test tonight/max tomorrow and help u what I can. Eregs like this is what Im missing here to make deeper loot customisation. Was going to make my own and here u came. Great man.

edit: before tests (cant look at source now) one question:
- it has higher piority than Giles stash/sell right? So first it checks rule - if match it sells/stashes ; rest with no matches - normal Giles score routine?
 
Last edited:
Great plugin!

Some suggestions:

1. [TRASH] won't be used much since everything that isn't matched by a rule will be trashed anyways.
2. A simple '+' feature would be useful to keep rules short. Especially for main stats and resists.
3. [MAINSTAT] could simply be a constant that refers to DEX||INT||STR internally. Would keep rules short and readable.
 
trash is useful to me, especially after 1.0.5 patch, when you set a lower score for trinity, you can use this rule to trash weapon with lower dps.
 
Dear darkfriend77,

I don't know how the hell you've hard my prayers, but I'm glad you did.

Love,

A Happy Botter
 
why do you want to keep this one? If for the dps, this version can't help right now, just wait for darkfriend to update.
if for Critical damage, you should add this to 'item.dis' in the folder 'Specification':

[BASETYPE] == Weapon # [CRITDMG%] > 63

Oh, its not that i want to keep this specific one... It was an example only :)

But i was wondering how the specific code would look like for this specific one. And in what file and section within the file to put it....

Would be a bit easier to understand for a non-coder to understand if i had a direct example, thats all :)
 
I make an update with :
- implementation of missed stats (TotalArmor, Fire/Cold/... Resi, ...)
- Addition of [RES_SINGLE] for check single resist (Fire,Cold,Poison,Arcane,Physical,...) [Except AllResist]
- Addition of [RES_TOTAL] for addition of all resist in item
- Addition of [MAINSTAT] for check single main stat (Intel or Strengh or Dex)
Code:
Tag                               Item Property Used
BASETYPE                          ItemBaseType
TYPE                              ItemType
QUALITY                           ItemQualityLevel
LEVEL                             Level
MAINSTAT                          Strength OR Dexterity OR Intelligence
RES_SINGLE                        ResistPhysical OR ResistLightning OR ResistCold OR ResistArcane OR ResistPoison OR ResistHoly OR ResistFire
RES_TOTAL                         ResistPhysical + ResistLightning + ResistCold + ResistArcane + ResistPoison + ResistHoly + ResistFire + ResistAll
RES_PHY                           ResistPhysical
RES_LIG                           ResistLightning
RES_COL                           ResistCold
RES_ARC                           ResistArcane
RES_POI                           ResistPoison
RES_HOL                           ResistHoly
RES_FIR                           ResistFire
MANAMAX                           MaxMana
MANAREG                           ManaRegen
MINDMG                            MinDamage
MAXDMG                            MaxDamage
DPS                               WeaponDamagePerSecond
THORNS                            Thorns
DMGREDUCTION                      DamageReductionPhysicalPercent
ARCANEMAX                         MaxArcanePower
FIREDMG                           FireDamagePercent
ARCANECRIT                        ArcaneOnCrit
FURYMAX                           MaxFury
LIGHTNINGDMG                      LightningDamagePercent
SPIRITHEALTH                      HealthPerSpiritSpent
SPIRITMAX                         MaxSpirit
SPIRITREG                         SpiritRegen
COLDDMG                           ColdDamagePercent
POISONDMG                         PoisonDamagePercent
HATREDREG                         HatredRegen
ARCANEDMG                         ArcaneDamagePercent
DISIPLINE                         MaxDiscipline
HOLYDMG                           HolyDamagePercent
ARMOR                             Armor
ARMORBONUS                        ArmorBonus
ARMORTOTAL                        ArmorTotal
GF                                GoldFind
MF                                MagicFind
ALLRES                            ResistAll
HEALTHREG                         HealthPerSecond
HEALTHGLOBE                       HealthGlobeBonus
LIFE%                             LifePercent
MS%                               MovementSpeed
WEAPASPEED                        WeaponAttacksPerSecond
AS%                               AttackSpeedPercent
WEAPMAX                           WeaponMaxDamage
WEAPMIN                           WeaponMinDamage
CRIT%                             CritPercent
CRITDMG%                          CritDamagePercent
BLOCK%                            BlockChance
LS%                               LifeSteal
LOH                               LifeOnHit
SOCKETS                           Sockets
PICKUP                            PickUpRadius
STR                               Strength
DEX                               Dexterity
INT                               Intelligence
VIT                               Vitality
Just replace existing file : View attachment Interpreter.cs
 
Last edited:
darkfriend77 i will test tonight/max tomorrow and help u what I can. Eregs like this is what Im missing here to make deeper loot customisation. Was going to make my own and here u came. Great man.

edit: before tests (cant look at source now) one question:
- it has higher piority than Giles stash/sell right? So first it checks rule - if match it sells/stashes ; rest with no matches - normal Giles score routine?

if one rule returns true on the spcific item the action Trash or keep it has higher priority then giles ... if nothing matches giles scoring is applied.
 
I make an update with :
- implementation of missed stats (TotalArmor, Fire/Cold/... Resi, ...)
- Addition of [RES_SINGLE] for check single resist (Fire,Cold,Poison,Arcane,Physical,...) [Except AllResist]
- Addition of [RES_TOTAL] for addition of all resist in item
- Addition of [MAINSTAT] for check single main stat (Intel or Strengh or Dex)

Just replace existing file : View attachment 63612


i will add this to the next version ^^ in the next 2-3 hours ...

maybee someone can help to get a good rare rule set ... for high valued weapons and armors ....
 
i will add this to the next version ^^ in the next 2-3 hours ...

maybee someone can help to get a good rare rule set ... for high valued weapons and armors ....


Lol, I edit my post with list of tag for script=)
 
For something like [STAT_COMBO] or [STAT_SUM] or whatever we want to call it, would this work?

return Compare((Math.Max(item.Stats.Strength, Math.Max(item.Stats.Dexterity, item.Stats.Intelligence))) + item.Stats.Vitality, comparator, Int32.Parse(str2));

Basically you check which main stat is the highest, then add vitality on top to get a single total to see if an item has high enough stats. Most useful for armor pieces.
 
Back
Top