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

[Plugin] "Item Rules 2" File based scripting language!

pssssssssssssssssssst :p

If you can get the full database, i mean buyout price and item affixes of every scanned item, you could auto-generate this file growing basic decision trees for every legendary item in the game.
 
Just a check. Is anyone fixing vigilance being misc? Not sure it's a db bug or d3 bug or what
 
hmm i will have a look at it ... also heart slaugther ... or so .... seems buggged ....

- vigilance
- heart slaughter
- andariels visag (misc instead of armor in baseType)
 
moved into beta ...

Code:
// +---------------------------------------------------------------------------+
// | ______ __                             __              
// ||      |  |--.---.-.-----.-----.-----.|  |.-----.-----.
// ||   ---|     |  _  |     |  _  |  -__||  ||  _  |  _  |
// ||______|__|__|___._|__|__|___  |_____||__||_____|___  |
// |                         |_____|                |_____|
// +---------------------------------------------------------------------------+
// | 2.013(beta):
// | - removed testing rules
// | - added function possibility for float attributes
// | - function dual transform a number into binary 0 or 1
// |   ex. item has 123 vitalityand no strength [VIT].dual -> 1 [STR].dual -> 0
// | - function max gets back the percentage of the max that is pos on that item
// |   this function is under work.
// | - .max function still in work
// | - added macro possibility
// | - some fixes at the log system
// | - added a open-source AH Parser (use on ur own risk!) documentation incl.
// | - moved from Trinity 1.7.1.6 to 1.7.1.7 thx to rrix for his hard work
// | - moved on last developer version.
// +---------------------------------------------------------------------------+

on going work:
- some smaller stuff ...
- adding numbers to the functionality max
- another log viewer
- statistical ah parsing

Code:
// +---------------------------------------------------------------------------+
// | _______                    __   __                    
// ||    ___|.--.--.-----.----.|  |_|__|.-----.-----.-----.
// ||    ___||  |  |     |  __||   _|  ||  _  |     |__ --|
// ||___|    |_____|__|__|____||____|__||_____|__|__|_____|
// |                                                                  
// +---------------------------------------------------------------------------+
// |  FUNCTIONS:
// |  ----------
// |  .dual		converting into a binary value 0 and 1
// |  			ex. [VIT].dual (item with vitality 123) -> 1
// |  			ex. [VIT].dual (item with vitality 0)   -> 0
// |
// | 
// |  .max		returning a percentage of the max value possible on that
// |                    item.
// |                    ex. [VIT].max (gloves with 100 VIT, max is 200) -> 0.5 
// |                    not implmented right now !!!
// +---------------------------------------------------------------------------+
 
moved into beta ...

Code:
// +---------------------------------------------------------------------------+
// | ______ __                             __              
// ||      |  |--.---.-.-----.-----.-----.|  |.-----.-----.
// ||   ---|     |  _  |     |  _  |  -__||  ||  _  |  _  |
// ||______|__|__|___._|__|__|___  |_____||__||_____|___  |
// |                         |_____|                |_____|
// +---------------------------------------------------------------------------+
// | 2.013(beta):
// | - removed testing rules
// | - added function possibility for float attributes
// | - function dual transform a number into binary 0 or 1
// |   ex. item has 123 vitalityand no strength [VIT].dual -> 1 [STR].dual -> 0
// | - function max gets back the percentage of the max that is pos on that item
// |   this function is under work.
// | - .max function still in work
// | - added macro possibility
// | - some fixes at the log system
// | - added a open-source AH Parser (use on ur own risk!) documentation incl.
// | - moved from Trinity 1.7.1.6 to 1.7.1.7 thx to rrix for his hard work
// | - moved on last developer version.
// +---------------------------------------------------------------------------+

on going work:
- some smaller stuff ...
- adding numbers to the functionality max
- another log viewer
- statistical ah parsing

Code:
// +---------------------------------------------------------------------------+
// | _______                    __   __                    
// ||    ___|.--.--.-----.----.|  |_|__|.-----.-----.-----.
// ||    ___||  |  |     |  __||   _|  ||  _  |     |__ --|
// ||___|    |_____|__|__|____||____|__||_____|__|__|_____|
// |                                                                  
// +---------------------------------------------------------------------------+
// |  FUNCTIONS:
// |  ----------
// |  .dual		converting into a binary value 0 and 1
// |  			ex. [VIT].dual (item with vitality 123) -> 1
// |  			ex. [VIT].dual (item with vitality 0)   -> 0
// |
// | 
// |  .max		returning a percentage of the max value possible on that
// |                    item.
// |                    ex. [VIT].max (gloves with 100 VIT, max is 200) -> 0.5 
// |                    not implmented right now !!!
// +---------------------------------------------------------------------------+

instead of adding always new functionality, release finally for public xD ^^

come on!!!
 
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.020(public):
// | - removed testing rules
// | - added function possibility for float attributes
// | - function dual transform a number into binary 0 or 1
// |   ex. item has 123 vitalityand no strength [VIT].dual -> 1 [STR].dual -> 0
// | - function max gets back the percentage of the max that is pos on that item
// |   this function is under work.
// | - .max function still in work
// | - added macro possibility
// | - some fixes at the log system
// | - added a open-source AH Parser (use on ur own risk!) documentation incl.
// | - moved from Trinity 1.7.1.6 to 1.7.1.7 thx to rrix for his hard work
// | - moved on last developer version.
// | - added documentation for macro, function and installation
// +---------------------------------------------------------------------------+
// | 2.009(beta):
// | - working on a better log system
// | - added again more rules
// | - fixed some filepath issues
// | - added archive functionality
// +---------------------------------------------------------------------------+
// | 2.0081(beta):
// | - changed attribut pickupradius to [PICKRAD]
// | - moved from Trinity 1.7.1.4 to 1.7.1.5 thx to rrix for his hard work
// | - moved from Trinity 1.7.1.5 to 1.7.1.6 thx to rrix for his hard work
// +---------------------------------------------------------------------------+
// | 2.007(beta):
// | - smarter log files
// | - can set [RULE] type now in config.dis (soft,medium,hard,custom)
// | - all rule files now included in release
// | - small fix in comment only use words soft,medium,hard
// | - updated with the new rules
// +---------------------------------------------------------------------------+
// | 2.0063(beta):
// | - PICKUP rules should work now! Trinity setting was still active.
// +---------------------------------------------------------------------------+
// | 2.0062(beta):
// | - reverted a monk change that isn't good for everyone
// +---------------------------------------------------------------------------+

on stable 1.7.1.7 with ItemRules 2.0.2.0

on devOnly 1.7.1.7 with ItemRules 2.0.2.0
this build isn't stable so only use if u can take the risk ..

public release contains actual beta
including rules sets from private dev.
- all rules included

HAVE FUN!!!

plz report bugs and errors

PUBLIC RELEASE : RELEASED! :p


CONTACT:
skype: darkfriend77
email: [email protected]
PM demonbuddypage: darkfriend77
 
Last edited:
I'm using the latest stable ItemRules and I can't find the actualLog.txt anywhere in the GilesTrinity folder.
 
The weapon swap bug was resolved in ItemRules2013UniTrinity1-7-1-7stable.zip, but the bug came back in ItemRules2020UniTrinity1-7-1-7stable.rar
 
Hi,
explain how to make that left the legendaries in the Russian client
replacement of English names in Russian in legendary.dis not working
thx
 
guessing unid legs are not implemented yet?
idc if it just keeps all legs unid as well

thanks
 
For those who modified legendary.dis of non-English version client.

I got some advice for you.

In the core/scanner.cs file

there is a line called
regex = new Regex(@"\""[0-9A-Za-z' :\-]*\""", RegexOptions.Compiled);
Patterns.Add(TokenType.STRING, regex);
Tokens.Add(TokenType.STRING);

This line only accept the English characters in the regex Expressions.
So, if you want to change it to other language, be sure to add other language in the regular Expression.

For example, for the Chinese charactor, what I have done is.
And modified your legendary.dis to Chinese Name. It should work.

regex = new Regex(@"\""[0-9A-Za-z\u4e00-\u9fa5' :\-]*\""", RegexOptions.Compiled);
Patterns.Add(TokenType.STRING, regex);
Tokens.Add(TokenType.STRING);
 
For those who modified legendary.dis of non-English version client.

I got some advice for you.

In the core/scanner.cs file

there is a line called


This line only accept the English characters in the regex Expressions.
So, if you want to change it to other language, be sure to add other language in the regular Expression.

For example, for the Chinese charactor, what I have done is.
And modified your legendary.dis to Chinese Name. It should work.
I tried this for russian using KOI8-R but didn't manage to make it work, any help would be nice because as of now v2 simply doesn't work with russian clients.
 
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.020(public):
// | - removed testing rules
// | - added function possibility for float attributes
// | - function dual transform a number into binary 0 or 1
// |   ex. item has 123 vitalityand no strength [VIT].dual -> 1 [STR].dual -> 0
// | - function max gets back the percentage of the max that is pos on that item
// |   this function is under work.
// | - .max function still in work
// | - added macro possibility
// | - some fixes at the log system
// | - added a open-source AH Parser (use on ur own risk!) documentation incl.
// | - moved from Trinity 1.7.1.6 to 1.7.1.7 thx to rrix for his hard work
// | - moved on last developer version.
// | - added documentation for macro, function and installation
// +---------------------------------------------------------------------------+
// | 2.009(beta):
// | - working on a better log system
// | - added again more rules
// | - fixed some filepath issues
// | - added archive functionality
// +---------------------------------------------------------------------------+
// | 2.0081(beta):
// | - changed attribut pickupradius to [PICKRAD]
// | - moved from Trinity 1.7.1.4 to 1.7.1.5 thx to rrix for his hard work
// | - moved from Trinity 1.7.1.5 to 1.7.1.6 thx to rrix for his hard work
// +---------------------------------------------------------------------------+
// | 2.007(beta):
// | - smarter log files
// | - can set [RULE] type now in config.dis (soft,medium,hard,custom)
// | - all rule files now included in release
// | - small fix in comment only use words soft,medium,hard
// | - updated with the new rules
// +---------------------------------------------------------------------------+
// | 2.0063(beta):
// | - PICKUP rules should work now! Trinity setting was still active.
// +---------------------------------------------------------------------------+
// | 2.0062(beta):
// | - reverted a monk change that isn't good for everyone
// +---------------------------------------------------------------------------+

on stable 1.7.1.7 with ItemRules 2.0.2.0

on devOnly 1.7.1.7 with ItemRules 2.0.2.0
this build isn't stable so only use if u can take the risk ..

public release contains actual beta
including rules sets from private dev.
- all rules included

HAVE FUN!!!

plz report bugs and errors

PUBLIC RELEASE : RELEASED! :p


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

thank you very much!!! just one question, if I want to use this new version with Trinity 1.7.1.7-sp what files do I need to copy? Is the ItemRules folder enough?

cheers
 
Reduced level requirement?

Again thx Darkfriend, also was wondering if you could explain what loot.utr is, and how to use it?
 
Last edited:
I don't suppose you have an script's for Happy Auction please I would "donate" for a good one
 
How to ignore on pickup (Shileds, Quiver, Mojo, Source, Wizardhat, Spiritstone, Voodoomask = lvl 61 or less)?
 
Last edited:
can you post your modified line and your regular expression with some sample Russian characters i may help you.
 
can someone explain please on how to use this script? like i dont know what to do on the pickup.dis, legendary.dis and so on.... do I need to open those files and need to uncomment or remove comments // on the codes for it to work? coz since it came out with gilestrinity my bot are always ignoring legendary items and not picking up.

would appreciate if someone could make a example on what to do for this script to work, an way that noobs would easily understand. thanks
 
Back
Top