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

this rule is guilty for that ...
[QUALITY] == Rare && [BASETYPE] == Armor # [MAXSTATVIT] > 400 || [DMGFACTOR] > 15

that will fix it? im noob with code :(

[QUALITY] == Rare && [BASETYPE] == Armor && [TYPE] != Quiver # [MAXSTATVIT] > 400 || [DMGFACTOR] > 15
[QUALITY] == Rare && [BASETYPE] == Armor # && [TYPE] != Quiver [MAXSTATVIT] > 300 && ([DMGFACTOR] > 12 || [ALLRES] > 60)
[QUALITY] == Rare && [BASETYPE] == Armor # && [TYPE] != Quiver [MAXSTATVIT] > 200 && [DMGFACTOR] > 9 && [ALLRES] > 60
 
Just add a "[QUALITY] == Rare && [TYPE] == Quiver # [1] == 1 # [TRASH]" line just below the "[QUALITY] == Rare && [TYPE] == Quiver # [DEX] >= 150 && [AS%] == 15 && [CRIT%] >= 9 && [MAXDISCIP] >= 9 # [KEEP]" (this is not the exact line, it's my edited version) line in quivers seciton (which is wierdly named "shields") :D
 
Tried installing this today with the latest version from the svn, it worked ok for a couple of chars, but on one char - he just stands there looping the "scoring" process and does nothing. Inactivity kicks in, he rejoins game and goes on looping. This is a bummer =\
 
This is working well on all but one of my bots, the one with the problem is TP to town, ID items and then stands there and the items in the log window loop over over. He does not move to the chest to stash items nor to the vendor to sell. Just stands there looping :confused:
The exact same problem.
 
Also, I have found, that it's not char-specific. 1 char has ran 2 successful townruns, and then got stuck on the 3rd one.
Also upon some log-inspections I see these lines in all 3 logs when stuck:
Code:
[21:38:55.386 N] [GilesTrinity] ItemRuleSet: Колющие бурки [Boots_hell_base_05-174] = (TRASH)
[21:38:55.452 N] [GilesTrinity] ItemRuleSet: Зверская брешь [combatStaff_norm_base_03-175] = (TRASH)
[21:38:55.517 N] [GilesTrinity] ItemRuleSet: Изысканный фасад [voodooMask_norm_base_03-176] = (TRASH)
[21:38:55.588 N] [GilesTrinity] ItemRuleSet: Обломок кремации [Sword_norm_base_07-177] = (TRASH)
[21:38:55.658 N] [GilesTrinity] ItemRuleSet: Атака рубца [Sword_norm_base_08-178] = (TRASH)
[21:38:55.737 N] [GilesTrinity] ItemRuleSet: Рыщущее наблюдение [voodooMask_norm_base_04-179] = (TRASH)
[21:38:55.811 N] [GilesTrinity] ItemRuleSet: Пышущая жаром жердь [Staff_norm_base_06-180] = (TRASH)
[21:38:55.875 N] [GilesTrinity] ItemRuleSet: Неустрашимые благодатные поножи [pants_hell_base_04-181] = (TRASH)
[21:38:55.941 D] System.FormatException: Входная строка имела неверный формат.
   в System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
   в System.Single.Parse(String s)
   в GilesTrinity.Functions.Interpreter.checkExpression(String str1, String comparator, String str2, Boolean& checkFlag)
   в GilesTrinity.Functions.Interpreter.checkTruth(String str, Boolean& checkFlag)
   в GilesTrinity.Functions.Interpreter.checkTruth(String str, Boolean& checkFlag)
   в GilesTrinity.Functions.Interpreter.checkTruth(String str, Boolean& checkFlag)
   в GilesTrinity.Functions.Interpreter.interpret(String line, Boolean& checkFlag)
   в GilesTrinity.Functions.Interpreter.checkItem(ACDItem item)
   в GilesTrinity.GilesTrinity.ShouldWeStashThis(GilesCachedACDItem thisitem)
   в GilesTrinity.GilesTrinity.GilesStashOverlord(Object ret)
   в Zeta.TreeSharp.Decorator.CanRun(Object context)
   в Zeta.TreeSharp.Decorator..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.TreeSharp.PrioritySelector..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.TreeSharp.PrioritySelector..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.TreeSharp.Decorator..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.TreeSharp.PrioritySelector..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.Common.HookExecutor.Run(Object context)
   в Zeta.TreeSharp.Action.RunAction(Object context)
   в Zeta.TreeSharp.Action..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.TreeSharp.PrioritySelector..()
   в Zeta.TreeSharp.Composite.Tick(Object context)
   в Zeta.CommonBot.BotMain.()
[21:38:56.036 N] [GilesTrinity] ItemRuleSet: Колющие бурки [Boots_hell_base_05-174] = (TRASH)
[21:38:56.100 N] [GilesTrinity] ItemRuleSet: Зверская брешь [combatStaff_norm_base_03-175] = (TRASH)
[21:38:56.163 N] [GilesTrinity] ItemRuleSet: Изысканный фасад [voodooMask_norm_base_03-176] = (TRASH)

And it repeats. There is an error "the input string has incorrect format", does it mean that I've screwed up somewhere in my specifications and it bugs the bot out now? Any chance to know where that might be, or do I need to just reread the whole file again? -_-
 
One thing that make me crazy last night and may be someone can help me.

What I am trying to do is
1. Upgrade DB from beta 54 to 284
2. Upgrade GilesPlugin from 1.6.3.4 to (Unified GilesPlugin's Unnoficial Updates File, Build 32)
3. Upgrade (Unified GilesPlugin's Unnoficial Updates File, Build 32) together with Item Rules with Scripting language.

All files are downloaded from the thread and from the SVN, all clean install on three different bot, but all the bot get the same issue.

If you manully start DB, it is working. If you start DB from command line and let DB to login to D3, then DB can not find the plugin, in the plugin window, all empty.

Here is my analysis steps.

A. DB 284 + Unified GilesPlugin's Unnoficial Updates + Item Rules from SVN with Manual Login (Working fine)
B. DB 284 + Unified GilesPlugin's Unnoficial Updates + Item Rules from SVN with Auto Login (Failed)
C. DB 284 + Unified GilesPlugin's Unnoficial Updates with Auto Login via relogger or command line shortcut (Working Fine)
D. DB 282 + Unified GilesPlugin's Unnoficial Updates with Auto Login via relogger or command line shortcut (Working Fine)
E. DB 282 + Unified GilesPlugin's Unnoficial Updates with Auto Login + Item Rules from SVN via relogger or command line shortcut (Failed)

My test results indicate that the installation of the Item Rules are all fine, as manully start doesn't have any problem.
But there is definite some issue with db command line start, especially you set the -bnetusername -bnetpassword and let it login.
After login, not any plugin was loaded, plugin in window is blank and I have checked the compiledclassed folder, and it looks like compile stopped after compiled giles plugin.(any plug in after giles like Rads, Unstucker doesn't get compiled)

But the strange thing is, if you manully login to D3, start DB, no problem at all.
Any one share any clue or idea of this issue? As this basically screwed the relogger on this plugin.
 
Further on this issue,

As I noticed that GilesPlugin has GilesTrinity.cs file in the plugin folder
and the Item rules has Functions/Interpreter.cs as second cs file.

What I tried is,
A: Change the Functions/Interpreter.cs to GilesPlugin Folder, change namespace in the GilesTrinity.cs. Manually start DB, compiled successfully, and run without problem. However, changed to auto start, failed.
B: Merged Interpreter.cs into GilesTrinity.cs, which make the GilesTrinity.cs a big file contains everything. Same issue happen, Manually OK, auto failed.

Based on above test, it might not be the DB issue. What I suspect is During the initialization,

If the charactor is not logged in, and the plugin get's compiled. Some class or object instance is not ready to initialize.

That's why I manually Login to D3, start DB, is working, but auto failed.

Or there is some issue with class path, that while using auto login script, the class path changed and can not find the *.dis file?

Also, in the DB window, there is no log shows any errors, where can I see plugin compile errors?

Cheers
Tom
 
Can someone please help me trouble shoot the following rules?

[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTATVIT] > 100 && [SOCKET] > 0 && [MINDMG] > 0 && [MAXDMG] > 0 # [KEEP]
[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTATVIT] > 100 && [SOCKET] > 0 && [ALLRES] > 0 # [KEEP]
[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTAT] > 50 && [SOCKET] > 0 && [ALLRES] > 0 # [KEEP]
[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTAT] > 50 && [SOCKET] > 0 && [MINDMG] > 0 && [MAXDMG] > 0 # [KEEP]
 
Does it work on non-english client??

I have found this in my \GilesTrinity\... - JunkLog - WitchDoctor.log:
WeaponTwoHand - TwoHandMighty 'Felsenbrecher des unsterblichen K?nigs'. Score = 92319 {legendary item}
Strength=542. DPS=1467

Can it be that all "[NAME]" based code and therefore the whole ledgenary selection
does not work on a non-english client??


Also I have found this in my DB log file:
...[GilesTrinity] ItemRuleSet: Felsenbrecher des unsterblichen Königs [mightyWeapon_2H_norm_unique_flippy_10-33784] = (TRASH)
...[GilesTrinity] ItemRuleSet: Felsenbrecher des unsterblichen Königs [mightyWeapon_2H_norm_unique_flippy_10-33784] = (TRASH)

Sorry when that was mentioned before, I now have read the 38 pages very quick, and couldn't see a statement about
non-english D3 clients.

BTW: Is it possible to get always the english item name from D3/DB?
Or use an item code / number instead?
(in the strong hope not to have to translate all the names, for all new versions!)

Anyway, very good work, darkfriend77!


BR ?Golem
 
I have found this in my \GilesTrinity\... - JunkLog - WitchDoctor.log:
WeaponTwoHand - TwoHandMighty 'Felsenbrecher des unsterblichen K?nigs'. Score = 92319 {legendary item}
Strength=542. DPS=1467

Can it be that all "[NAME]" based code and therefore the whole ledgenary selection
does not work on a non-english client??


Also I have found this in my DB log file:
...[GilesTrinity] ItemRuleSet: Felsenbrecher des unsterblichen Königs [mightyWeapon_2H_norm_unique_flippy_10-33784] = (TRASH)
...[GilesTrinity] ItemRuleSet: Felsenbrecher des unsterblichen Königs [mightyWeapon_2H_norm_unique_flippy_10-33784] = (TRASH)

Sorry when that was mentioned before, I now have read the 38 pages very quick, and couldn't see a statement about
non-english D3 clients.

BTW: Is it possible to get always the english item name from D3/DB?
Or use an item code / number instead?
(in the strong hope not to have to translate all the names, for all new versions!)

Anyway, very good work, darkfriend77!


BR ?Golem

The question has already been asked and answered. Yes, the name tag will work only on english client with the default rules. You need to write your own rules for legendaries in different language.
 
Can someone please help me trouble shoot the following rules?

[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTATVIT] > 100 && [SOCKET] > 0 && [MINDMG] > 0 && [MAXDMG] > 0 # [KEEP]
[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTATVIT] > 100 && [SOCKET] > 0 && [ALLRES] > 0 # [KEEP]
[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTAT] > 50 && [SOCKET] > 0 && [ALLRES] > 0 # [KEEP]
[QUALITY] == Rare && [TYPE] == Ring # [DMGFACTOR] > 3 && [MAXSTAT] > 50 && [SOCKET] > 0 && [MINDMG] > 0 && [MAXDMG] > 0 # [KEEP]


its [SOCKETS] ...
 
Hey, darkfriend77
What about the problem that I've posted before, do you have any advice on that? Am I even right that the problem is in the specification files? I don't clearly get why it works sometimes, and sometimes doesn't, shouldn't it "try" all rules in any given check anyway, or does it go file by file in order specified in a config until it finds a line that suits the item?

Seems like a tool for trouble-shooting the lists would be very helpful (make sure no unrecognized tags are there, no unrecognized symbols, no brackets unclosed and so on), or maybe putting the "readlines function" in a "try {} catch " close and if any exception was caught just ignore the line, instead of breaking the process.
 
And nvm my last post, I've looked through the code and saw you already have a similiar function. Also I have found that the output goes to gilestrinity/logs folder instead of the general DB log, that's why I couldn't find it in the first place.
 
Hey darkfriend77, is every legendary item in diablo 3 listed in legendary.dis? If so, can we just edit the rules to our own values and then won't need to update legendary.dis anymore? Or will the rules/syntax change down the road where it will make our own personal legendary.dis not function anymore? Just wondering before I dedicate a lot of time changing all the legendary rules to my liking, and then realize it'll break something down the road ><.
 
Hey darkfriend77, I still noticed rare.dis has a lot un-needed "# [KEEP]" tags, because you mention no tags will mean keep anyways, so it'll be redundant having that tag there. Also, there are 3 rules in rare.dis:

[QUALITY] == Rare && [TYPE] == Mojo # [1] == 1 # [TRASH]
[QUALITY] == Rare && [TYPE] == Orb # [1] == 1 # [TRASH]
[QUALITY] == Rare && [TYPE] == Shield # [1] == 1 # [TRASH]

Wouldn't the last rule "[QUALITY] == Rare && [BASETYPE] == Armor # [1] == 1 # [TRASH]" apply to those 3 categories? Or are those 3 rules are each type of category on it's own. If so, to make it cleaner, I think you should put those 3 rules towards the end with all the other trash rules so they are together.
 
I know this isn't a priority at all, but I would like to ask if you could edit the rules for amulets / rings - it's keeping a lot of trash.. I'm just scared of changing them myself, then when I update the plugin I would have to redo everything?
Thanks
 
Hey darkfriend77, I still noticed rare.dis has a lot un-needed "# [KEEP]" tags, because you mention no tags will mean keep anyways, so it'll be redundant having that tag there. Also, there are 3 rules in rare.dis:

[QUALITY] == Rare && [TYPE] == Mojo # [1] == 1 # [TRASH]
[QUALITY] == Rare && [TYPE] == Orb # [1] == 1 # [TRASH]
[QUALITY] == Rare && [TYPE] == Shield # [1] == 1 # [TRASH]

Wouldn't the last rule "[QUALITY] == Rare && [BASETYPE] == Armor # [1] == 1 # [TRASH]" apply to those 3 categories? Or are those 3 rules are each type of category on it's own. If so, to make it cleaner, I think you should put those 3 rules towards the end with all the other trash rules so they are together.
Nah, they should stay where they are (also add a trash quivers rule there), because there are more "safety" rules for armor there. If you don't trash shields and OHs they will be caught by the safety rule like armor + maxstatvit > 300, this way, they will get trashed before they have a chance to trigger a rule they don't necessary need to trigger.

upd. I would say that it is a good style to right a trash_the_rest line after each block of code, so that you don't get anything extra. Just "keep this, keep this, trash rest" for each category.
 
Last edited:
All of you, who are scared of making changes because of updates, you do know, that you can backup your personal .dis files and NOT rewrite them, just use them instead of darkfriend77's ones? Unless he changes the syntax (and that shouldn't ever happen really) they will work on all further versions.
 
Further on this issue,

As I noticed that GilesPlugin has GilesTrinity.cs file in the plugin folder
and the Item rules has Functions/Interpreter.cs as second cs file.

What I tried is,
A: Change the Functions/Interpreter.cs to GilesPlugin Folder, change namespace in the GilesTrinity.cs. Manually start DB, compiled successfully, and run without problem. However, changed to auto start, failed.
B: Merged Interpreter.cs into GilesTrinity.cs, which make the GilesTrinity.cs a big file contains everything. Same issue happen, Manually OK, auto failed.

Based on above test, it might not be the DB issue. What I suspect is During the initialization,

If the charactor is not logged in, and the plugin get's compiled. Some class or object instance is not ready to initialize.

That's why I manually Login to D3, start DB, is working, but auto failed.

Or there is some issue with class path, that while using auto login script, the class path changed and can not find the *.dis file?

Also, in the DB window, there is no log shows any errors, where can I see plugin compile errors?


OK, I know why command line has problems with plugin.

It is in the Functions/Interpreter.cs constructor

string customPath = @"Plugins\GilesTrinity\Specification\";

string logPath = @"Plugins\GilesTrinity\Log\";

These two lines are using absolute path, as command line use a full path to start Demonbuddy without CD to demonbuddy directory, it failed. And, there is no error handling if the directory is not correct.

Now, I changed it to absolute path ,with a centralized location for all my bots, it works..

Thanks
 
Last edited:
Back
Top