• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Custom Class] Mammon - The Prince of Greed, All-In-One Combat Routine

    Discussion in 'Archives' started by j0achim, Jun 11, 2012.

    Thread Status:
    Not open for further replies.
    1. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Vault is way a head, need some clever coding to do it, since it will fool bot to do something it does not want to do traveling too far from planned route. Then it starts backtracking A LOT.

      As for smart use of smoke its on the agenda. As for tactical advantage.



      I have not botted with frenzy yet but i can totally see it be a problem since it can be seen upon as a channeling spell. (its not, but it can resemble one) My suggestion is that you swap out frenzy. (btw if your farming for gold frenzy is not the best choice)
       
    2. haymaker

      haymaker New Member

      Joined:
      Jun 14, 2012
      Messages:
      28
      Likes Received:
      0
      Trophy Points:
      0
      First off, thanks for the contribution. This CC for my DH is much better than the stock ones that come with DB. I plan to make some of my own improvements for the combat sequencing, thanks for the framework.

      However, when my bot tries to sell, it just opens up the inventory and sits there (also spamming SS). Anyone else experiencing this behavior?

      I am running build 99 of DB and this loot rule: http://www.thebuddyforum.com/attachments/demonbuddy-forum/demonbuddy-profiles/43417d1339542818-no-trash-loot-rules-keep-legendary-sell-blue-yellow-no-trash-keep-legendary-yellow-sell-blue.xml.html
       
    3. Epics

      Epics New Member

      Joined:
      Jun 12, 2012
      Messages:
      393
      Likes Received:
      1
      Trophy Points:
      0
      Seems that Wizards are running a bit sluggish, but Monks performance has greatly improved.
       
    4. GoldenSlug

      GoldenSlug New Member

      Joined:
      Jun 11, 2012
      Messages:
      89
      Likes Received:
      0
      Trophy Points:
      0
      Seems to spam SS all the time, going back to .11 until I can figure out why or it gets fixed if it's a problem for more than just myself.
       
    5. mridontevenknowu

      mridontevenknowu New Member

      Joined:
      Jun 13, 2012
      Messages:
      229
      Likes Received:
      0
      Trophy Points:
      0
      The following is a mash up of a few of the barb attack functions with some wizard spells. it should work i believe have not tested it as my script needs to run for awhile without interuption cause im poor. if anyone wants to test and let me know what they find id be happy to try and fix any errors. otherwise hope it makes the wizard a little better for you.

      if anyone has a referance of code that would do something like what follows:

      Spell.CastOnUnit(SNOPower.Wizard_Meteor, ctx => ((DiaUnit)ctx).ACDGuid, extra => ClusterCount >= 4 within a 4ft radius),
      require => Zeta.CommonBot.PowerManager.CanCast(Wizard_Meteor) && CombatTargeting.Instance.FirstNpc.Distance < 6f
      ),

      PM me with the full script the code is from with note on which line its on plz :) think i figured this out now id like to figure out a way to say. Cast A if mob is within 6ft or B if mob is >6ft

      plz someone let me know how this code works. if not ill test tommorow but id like to get some opinions.


      Code:
      using System;
      using System.Linq;
      
      using Mammon.Dynamics;
      using Mammon.Helpers;
      using Zeta;
      using Zeta.Common;
      using Zeta.CommonBot;
      using Zeta.Internals.Actors;
      using Zeta.TreeSharp;
      using Action = Zeta.TreeSharp.Action;
      
      namespace Mammon.Routines
      {
          public class Wizard
          {
              private static int ClusterCount { get { return Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 20f); } }
      
      
              [Class(ActorClass.Wizard)]
              [Behavior(BehaviorType.OutOfCombat)]
              [Priority(2)]
              public static Composite WizardBuff()
              {
                  return
                  new PrioritySelector(
                          Spell.Buff(SNOPower.Wizard_IceArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_IceArmor)),
                          Spell.Buff(SNOPower.Wizard_StormArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_StormArmor)),
                          Spell.Buff(SNOPower.Wizard_EnergyArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_EnergyArmor)),
                          Spell.Buff(SNOPower.Wizard_MagicWeapon, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_MagicWeapon))
                  );
              }
              [Class(ActorClass.Wizard)]
              [Behavior(BehaviorType.Combat)]
              [Priority(1)]
              public static Composite WizardCombat()
              {
                  return
                      new PrioritySelector(ctx => CombatTargeting.Instance.FirstNpc,
      
                          Common.CreateWaitWhileIncapacitated(),
                          Common.CreateWaitForAttack(),
                          Common.CreateUsePotion(),
      
                          // Make sure we are within range/line of sight of the unit.
                          Movement.MoveTo(ctx => ((DiaUnit)ctx).Position, 40f),
                          //Movement.MoveToLineOfSight(ctx => ((DiaUnit)ctx)),
      
                          // Low health stuff
                          Spell.CastAOESpell(SNOPower.Wizard_DiamondSkin, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.3),
                          Spell.Buff(SNOPower.Wizard_MirrorImage, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.4),
      
                          //Buffs
                          Spell.Buff(SNOPower.Wizard_IceArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_IceArmor)),
                          Spell.Buff(SNOPower.Wizard_StormArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_StormArmor)),
                          Spell.Buff(SNOPower.Wizard_EnergyArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_EnergyArmor)),
                          Spell.Buff(SNOPower.Wizard_MagicWeapon, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_MagicWeapon)),
                          Spell.Buff(SNOPower.Wizard_Familiar, extra => !HasFamiliar),
      
                          // AoE spells.
                          Spell.CastAOESpell(SNOPower.Wizard_WaveOfForce, extra => ClusterCount >= 4,
      					    require => Zeta.CommonBot.PowerManager.CanCast(Wizard_WaveOfForce) && CombatTargeting.Instance.FirstNpc.Distance < 6f
                          ),
      					
                          Spell.CastAOESpell(SNOPower.Wizard_FrostNova, extra => ClusterCount >= 2),
      						require => Zeta.CommonBot.PowerManager.CanCast(Wizard_FrostNova) && CombatTargeting.Instance.FirstNpc.Distance < 6f
                          ),
      					
                          Spell.CastOnUnit(SNOPower.Wizard_EnergyTwister, ctx => ((DiaUnit)ctx).ACDGuid, extra => ClusterCount >= 2),
      						require => Zeta.CommonBot.PowerManager.CanCast(Wizard_EnergyTwister) && CombatTargeting.Instance.FirstNpc.Distance < 18f
                          ),
      					
                          Spell.CastOnUnit(SNOPower.Wizard_Meteor, ctx => ((DiaUnit)ctx).ACDGuid, extra => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 6f) >= 4),
      					
                          Spell.CastOnUnit(SNOPower.Wizard_Blizzard, ctx => ((DiaUnit)ctx).ACDGuid, extra => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 6f) >= 4),
      					
                          Spell.CastAOESpell(SNOPower.Wizard_ExplosiveBlast, extra => ClusterCount >= 3),
      					    require => Zeta.CommonBot.PowerManager.CanCast(Wizard_ExplosiveBlast) && CombatTargeting.Instance.FirstNpc.Distance < 6f
                          ),
      
                          //Hydra
                          Spell.CastAtLocation(SNOPower.Wizard_Hydra, ctx => ((DiaUnit)ctx).Position, exta => !HasHydra),
      
                          // Arcane power spenders.
                          Spell.CastOnUnit(SNOPower.Wizard_ArcaneOrb, ctx => ((DiaUnit)ctx).ACDGuid),
                          Spell.CastOnUnit(SNOPower.Wizard_RayOfFrost, ctx => ((DiaUnit)ctx).ACDGuid),
                          Spell.CastOnUnit(SNOPower.Wizard_ArcaneTorrent, ctx => ((DiaUnit)ctx).ACDGuid),
                          Spell.CastOnUnit(SNOPower.Wizard_Disintegrate, ctx => ((DiaUnit)ctx).ACDGuid),
      
                          // Signature spells.
                          Spell.CastOnUnit(SNOPower.Wizard_SpectralBlade, ctx => ((DiaUnit)ctx).ACDGuid),
                          Spell.CastOnUnit(SNOPower.Wizard_Electrocute, ctx => ((DiaUnit)ctx).ACDGuid),
                          Spell.CastOnUnit(SNOPower.Wizard_ShockPulse, ctx => ((DiaUnit)ctx).ACDGuid),
                          Spell.CastOnUnit(SNOPower.Wizard_MagicMissile, ctx => ((DiaUnit)ctx).ACDGuid)
      
                      );
              }
      
              public static bool HasFamiliar
              {
                  get
                  {
                      int dynId = ZetaDia.Me.CommonData.DynamicId;
                      var summoned = ZetaDia.Actors.GetActorsOfType<DiaUnit>().FirstOrDefault(u => u.SummonedByACDId == dynId && u.Name.Contains("Familiar"));
                      return summoned != null;
                  }
              }
      
              public static bool HasHydra
              {
                  get
                  {
                      int dynId = ZetaDia.Me.CommonData.DynamicId;
                      var summoned = ZetaDia.Actors.GetActorsOfType<DiaUnit>().FirstOrDefault(u => u.SummonedByACDId == dynId && u.Name.Contains("Hydra"));
                      return summoned != null;
                  }
              }
      
              public static void WizardOnLevelUp(object sender, EventArgs e)
              {
                  if (ZetaDia.Me.ActorClass != ActorClass.Wizard)
                      return;
      
                  int myLevel = ZetaDia.Me.Level;
      
                  Logger.Write("Player leveled up, congrats! Your level is now: {0}",
                      myLevel
                      );
      
                  // Set Ray of Frost as secondary spell.
                  if (myLevel == 2)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_RayOfFrost, -1, 1);
                      Logger.Write("Setting Ray of Frost as Secondary");
                  }
      
                  // Set Shock Pulse as primary.
                  if (myLevel == 3)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ShockPulse, -1, 0);
                      Logger.Write("Setting Shock Pulse as Primary");
                  }
      
                  if (myLevel == 4)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_FrostNova, -1, 2);
                      Logger.Write("Setting Frost Nova as Defensive");
                  }
      
                  if (myLevel == 5)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ArcaneOrb, -1, 1);
                      Logger.Write("Setting Arcane Orb as Secondary");
                  }
      
                  if (myLevel == 8)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_DiamondSkin, -1, 2);
                      Logger.Write("Setting Diamond Skin as Defensive");
                  }
      
                  if (myLevel == 9)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_WaveOfForce, -1, 3);
                      Logger.Write("Setting Wave of Force as Force");
      
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ShockPulse, -1, 2);
                      Logger.Write("Changing rune for Shock Pulse: \"Explosive Bolts\"");
                  }
      
                  // First passive skill!
                  if (myLevel == 10)
                  {
                      // Blur - Decreases melee damage taken by 20%.
                      ZetaDia.Me.SetTraits(SNOPower.Wizard_Passive_Blur);
                  }
      
                  if (myLevel == 11)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ArcaneOrb, 2, 1);
                      Logger.Write("Changing rune for Arcane Orb: \"Obliteration\"");
                  }
              }
          }
      }
      
      
       
      Last edited: Jun 15, 2012
    6. kaihaider

      kaihaider Community Developer

      Joined:
      May 18, 2010
      Messages:
      1,325
      Likes Received:
      5
      Trophy Points:
      38
      The bot seems to waste my sprint most of the time, simply adding a movement check has made a huge speed boost: Spell.Buff(SNOPower.Barbarian_Sprint,
      require => !ZetaDia.Me.HasBuff(SNOPower.Barbarian_Sprint)&& ZetaDia.Me.Movement.IsMoving)
       
    7. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Thanks for pointing it out will add it on svn right away.
       
    8. Rikku

      Rikku New Member

      Joined:
      Jun 8, 2012
      Messages:
      36
      Likes Received:
      0
      Trophy Points:
      0
      thx for update. but new prob. he spam only rapidfire and dost not use hungryarrow to generating hate.
       
    9. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Right, swap out Rapid Fire for now its a channeling spell and they don't work as intended right now.
       
    10. oruna

      oruna Member

      Joined:
      Feb 11, 2012
      Messages:
      114
      Likes Received:
      0
      Trophy Points:
      16
      Could you perhaps put it on Github or Svn?
       
    11. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      It is on hosted on my SVN server. See first post below installation.
       
    12. Shakam

      Shakam Member

      Joined:
      Jan 15, 2010
      Messages:
      274
      Likes Received:
      0
      Trophy Points:
      16
      DH works a way better now, thank u :)
      Can u make it using preperation if discizplin is below 14?

      Fan of Knives if 2 enemies are in a range of 15 yards would be also great.

      thanks for ur work !
       
    13. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Fan of Knives added.

      I will also ass smart disc / hate usage.
       
    14. AutomaticCoding

      AutomaticCoding Banned

      Joined:
      Dec 20, 2011
      Messages:
      1,091
      Likes Received:
      1
      Trophy Points:
      0
      Finally a custom class that does what it's meant to do, such as drinking potions:
      [​IMG]

      Only issue I see, at the moment, is that for the Wizards "disintegrate" it keeps casting, then stops, then starts, then stops.

      Realized it has nothing to with my FPS, has to do with if diablo's the active window or not...
       
      Last edited: Jun 15, 2012
    15. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Mammon cant currently use channeling spells properly.

      Will look at how this is done in Singular and see if i can port something :)
       
    16. Joker76

      Joker76 Member

      Joined:
      Feb 8, 2010
      Messages:
      835
      Likes Received:
      9
      Trophy Points:
      18
      ass-venture.jpg
       
    17. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Rofl, good one ^^
       
    18. mephuser1000

      mephuser1000 Active Member

      Joined:
      Jun 10, 2011
      Messages:
      1,636
      Likes Received:
      1
      Trophy Points:
      38
      Doesn't seem to be breaking objects. Anyway to custom adjust the break object radius like the Generic class routine?
       
    19. pwnzoor

      pwnzoor New Member

      Joined:
      Jan 15, 2010
      Messages:
      91
      Likes Received:
      0
      Trophy Points:
      0
      since .23 my demonhunters level 2-10 only wants to use rapidfire, not m1 anymore
       
    20. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      What class is this? My Demon Hunter will even walk back to break objects.

      Thanks and i will look at it later, i have been planning on doing a 1-60 Demon Hunter once I'm done with the 1-60 Barbarian.
       
    Thread Status:
    Not open for further replies.

    Share This Page