• Visit Rebornbuddy
  • [Plugin] Armory

    Discussion in 'Plugins' started by rrrix, Mar 28, 2014.

    1. rrrix

      rrrix DEVELOPER Buddy Core Dev

      Joined:
      Jul 11, 2010
      Messages:
      3,449
      Likes Received:
      61
      Trophy Points:
      0
      Armory
      Author: rrrix
      Contributions by: Gniller, Nuok

      What is Armory?

      Armory is the new "AutoEquipper".

      Armory also includes support for purchasing items from "Kadala", the mystery item vendor in Adventure Mode.

      How do Upgrades in Armory work?

      Armory uses the in-game Tool Tip percentage calculations to determine if an item is an upgrade or not.

      [​IMG]

      What's the default upgrade formula?

      Default, it's basically this:

      Code:
      if (damage > -0.05 && damage + toughness > 0)
          isUpgrade = true;
      if (damage > -0.15 && damage + toughness > 0 && healing > 0)
          isUpgrade = true;
      
      If we lose up to 5% damage but gain more toughness than we lost, it is an upgrade.

      If we lose up to 15% damage, gain more toughness than we lost, and gain healing it is an upgrade.

      Out of the box, this is pretty good for a hardcore character, but not so much for a softcore character (better to be safe than sorry, though!).

      What can I configure?

      Almost everything except "custom" formulas. For those, you will need to go into the ItemEvaluator.cs file, find the "CalculateUpgrade" method and from there you are free to create your own upgrade formulas.

      I personally use the "Basic Upgrade" formula with 1% damage minimum and -200% toughness until I get to level 70.

      [​IMG]


      Customization

      You can customize the formulas used by un-commenting the following and editing as necessary, in ItemEvaluator.cs
      Code:
      /*
       *  Want to DIY? Uncomment below as needed!
       */
      // Additive Damage Formula - Damage reduced up to 5% but toughness compensates
      //if (damage > -0.05f && damage + toughness > 0)
      //    isUpgrade = true;
      
      
      // Healing Formula - Damage reduced max 15% but toughness buff is "good enough" and healing is > 0%
      //if (damage > -0.15f && damage + toughness > 0 && healing > 0)
      //    isUpgrade = true;
      
      
      // Basic Upgrade Formula
      //if (damage > 0 && toughness > 0)
      //    isUpgrade = true;
      
      Kadala a.k.a. The Mystery Item Vendor

      Armory can also purchase items from Kadala. You can specify which kinds of items to purchase and if you want to purchase in sequential or random order.

      [​IMG]

      If you like this and want to support my work, click here:
      [​IMG]
      Bitcoin: 1NLbH6HJf5wCANFzpAAPUtkAtUqg2WmKGL


      When upgrading from a version before 1.2.5, you will need to RESET all your options. The settings will be reset when upgrading from 1.2.x to 1.2.5. ‚ÄčIt now uses per-battletag settings.
       

      Attached Files:

      Last edited: May 14, 2015
    2. rrrix

      rrrix DEVELOPER Buddy Core Dev

      Joined:
      Jul 11, 2010
      Messages:
      3,449
      Likes Received:
      61
      Trophy Points:
      0
      Reserved
       
    3. Gniller

      Gniller Community Developer

      Joined:
      Sep 29, 2012
      Messages:
      384
      Likes Received:
      5
      Trophy Points:
      16
      Reserved
       
    4. Biotin

      Biotin Member

      Joined:
      Aug 2, 2013
      Messages:
      73
      Likes Received:
      0
      Trophy Points:
      6
      Will try this out!
       
    5. itraxx

      itraxx New Member

      Joined:
      Feb 2, 2013
      Messages:
      147
      Likes Received:
      0
      Trophy Points:
      0
      Oh boy, tks so much for this rrix!
       
    6. xcat

      xcat New Member

      Joined:
      Mar 26, 2014
      Messages:
      47
      Likes Received:
      0
      Trophy Points:
      0
      Holy shit you are a god!

      Donated <3
       
    7. xcat

      xcat New Member

      Joined:
      Mar 26, 2014
      Messages:
      47
      Likes Received:
      0
      Trophy Points:
      0
      Am I correct that it doesn't show that its installed @ plugins?


      Compiler Error: c:\DBQuesting\Plugins\Armory\ItemEvaluator.cs(140,17) : error CS1501: No overload for method 'GetStatChanges' takes 4 arguments
      Compiler Error: c:\DBQuesting\Plugins\Armory\ItemEvaluator.cs(145,17) : error CS1501: No overload for method 'GetStatChanges' takes 4 arguments
      Compiler Error: c:\DBQuesting\Plugins\Armory\ItemEvaluator.cs(149,17) : error CS1501: No overload for method 'GetStatChanges' takes 4 arguments
      Compiler Error: c:\DBQuesting\Plugins\Armory\ItemWrapper.cs(285,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\ItemWrapper.cs(291,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\ItemWrapper.cs(303,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Player.cs(28,122) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Barbarian.cs(59,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Barbarian.cs(60,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Crusader.cs(36,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Crusader.cs(37,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\DemonHunter.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\DemonHunter.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Monk.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Monk.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\WitchDoctor.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\WitchDoctor.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Wizard.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
      Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Wizard.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
      [AutoGear] Initialized.
      Setting up Trinity Logging
       
    8. b3rz3rk

      b3rz3rk Member

      Joined:
      Dec 3, 2011
      Messages:
      157
      Likes Received:
      0
      Trophy Points:
      16
    9. rrrix

      rrrix DEVELOPER Buddy Core Dev

      Joined:
      Jul 11, 2010
      Messages:
      3,449
      Likes Received:
      61
      Trophy Points:
      0
      Please update your Demonbuddy to the latest BETA. Forgot to mention that!
       
    10. b3rz3rk

      b3rz3rk Member

      Joined:
      Dec 3, 2011
      Messages:
      157
      Likes Received:
      0
      Trophy Points:
      16
      Thanks for quick reply and keep up the awesome work :)
       
    11. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Thanks now I dont have to bodge autogear to work :)
       
    12. GIVEMEANAME

      GIVEMEANAME Active Member

      Joined:
      Dec 17, 2010
      Messages:
      1,533
      Likes Received:
      13
      Trophy Points:
      38
      running now, will post any issues :)

      thanks rrrix and whoever else helped :D


      edit: been running on crusader for past 8 levels - and its working an absolute treat !!!
       
      Last edited: Mar 28, 2014
    13. xcat

      xcat New Member

      Joined:
      Mar 26, 2014
      Messages:
      47
      Likes Received:
      0
      Trophy Points:
      0
      Thanks, working fine now :)
       
    14. hot12345

      hot12345 New Member

      Joined:
      Feb 3, 2013
      Messages:
      229
      Likes Received:
      0
      Trophy Points:
      0
      Thanks for this rrrix!

      How realy this works? on the items you pick up ? or also looks in your inventory to equip?
       
    15. dhaern

      dhaern New Member

      Joined:
      Mar 6, 2014
      Messages:
      40
      Likes Received:
      0
      Trophy Points:
      0
      Thx man! I will test now. +Elemental damage is included in calculations?
       
    16. rrrix

      rrrix DEVELOPER Buddy Core Dev

      Joined:
      Jul 11, 2010
      Messages:
      3,449
      Likes Received:
      61
      Trophy Points:
      0
      how about

      Code:
                  if (!(Armory.ActiveHero is Crusader && HeroClass.PassiveSkills.Contains(SNOPower.X1_Crusader_Passive_HeavenlyStrength) && item.IsTwoHand))
                  {
                      // Don't try to equip shields if we have a 2H equipped
                      if (item.IsShield && Player.HasTwoHandEquipped)
                          return false;
      
      
                      // Don't try to equip 1H into RightHand if we have a 2H equipped
                      if (Player.HasTwoHandEquipped && slot == InventorySlot.RightHand)
                          return false;
                  }
      
       
    17. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Or that would seem more obvious now :)

      Although you wont be able to check for shield upgrades as ** will return true for is IsDualWielding
      Code:
                  else if (slot == InventorySlot.RightHand && !Player.HasTwoHandEquipped &&
                           (Player.IsDualWielding || isSlotEmpty))
      
       
    18. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      You might even have todo

      Code:
                  if (Armory.ActiveHero is Crusader && HeroClass.PassiveSkills.Contains(SNOPower.X1_Crusader_Passive_HeavenlyStrength) && (item.IsTwoHand || item.IsOneHand))
                  {
                      Logger.Debug("We are a Crusader with HeavenlyStrength Pretending we are not using a two hander");
                      item.IsTwoHand = false;
                      Player.HasTwoHandEquipped = false;
                  }
       
      Last edited: Mar 28, 2014
    19. dottzor

      dottzor Member

      Joined:
      Jan 15, 2010
      Messages:
      786
      Likes Received:
      6
      Trophy Points:
      18
      THIS!

      THIS IS IT

      From all HC-botters out there.: THANK YOU.
       
    20. xxfearxx

      xxfearxx New Member

      Joined:
      Apr 17, 2013
      Messages:
      176
      Likes Received:
      2
      Trophy Points:
      0
      will we be able to put in actual stat weights? or just adjust ratio of damage/toughness/healing? there is an addon for wow that would calculate an itemscore based on stat weights that you put in something like that would be amazing and make the plugin much more viable at max level as well
       

    Share This Page