• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Belphegor the official combat routine - We need you're feedback to improve it!

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

    1. tegots

      tegots New Member

      Joined:
      Jul 11, 2012
      Messages:
      21
      Likes Received:
      0
      Trophy Points:
      0
      barb work as a charm!
       
    2. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Ill make it cast if your CC'd.

      Edit the file:
      Demonbuddy\Settings\Belphegor\BarbarianSettings.xml

      Code:
        <RageSkillsAoeCount>4</RageSkillsAoeCount>
      Increase the number to 100 or something high. I know its a pain till we have a gui.



      Ill add it into the buff routine aswell then, you'll still need to change the setting tho.



      We cant see the resources apart from health, so at the moment prperation is set to cast when you health is below a certain point.

      Edit the file:
      Demonbuddy\Settings\Belphegor\DemonHunterSettings.xml
      Code:
        <SpamSmokeScreen>True</SpamSmokeScreen>
      It will then cast it every 10 seconds.
       
      Last edited: Jul 15, 2012
    3. xasset

      xasset New Member

      Joined:
      Jan 15, 2010
      Messages:
      308
      Likes Received:
      4
      Trophy Points:
      0
      Nuok, then I'll wait for update. I have changed settings, now it uses Boh for buff, but during the fight. Still need to have option to buff aura and BoH before fight.

      Question about Tempest Rush.

      Can you change logic of using this ability. To use it ONLY for 1.running on long distances 2.to run away from elite. Right now bot tries to use this skill at any time when it has sufficient amount of spirit - 15 and not uses primary damage ability such as fists of thunder. So in fight this ability is useless comparing with fists of thunder or cyclone or wave of light.

      Please look at logic of using this ability
       
      Last edited: Jul 15, 2012
    4. flupppa

      flupppa Member

      Joined:
      Jan 2, 2012
      Messages:
      42
      Likes Received:
      0
      Trophy Points:
      6
      hi
      i have a problem..my monk dont fight:

      my profil runs perfect on my wizard but the monk dont want attack...can any one help me?

      p.s. Generic works fine...but not belphegor :(
       
      Last edited: Jul 16, 2012
    5. dasBuddha

      dasBuddha New Member

      Joined:
      Jul 16, 2012
      Messages:
      3
      Likes Received:
      0
      Trophy Points:
      0
      I've finally registered on the forums and had some comments about Belphegor's WD routines. I'm a programmer and was impressed to see some of the classical design patterns as part of DB's interface and in Belphegor's routines. I like the progression of the code changes for the most part. I was sad to see code removed that renamed the gargantuan to "Ted". The comment was like "He is Ted for he is awesome".

      The routine's situational awareness looks like a strategy design pattern that looks through a priority queue (ordered list) of rules for the first applicable rule to choose. The rules check to see if the skill is available and then whether or not some extra conditions are applicable. Some look to be about player health, pets being up, number of monsters in an area or an elite being present.

      So yeah... the witch doctor's routines felt slow and I wanted to tailor it for my needs. What I have below is what my current WD file is like: (1) I added horrify/stalker and spirit walk when possible for extra movement speed and (2) commented out all of the non-applicable skills.

      In moving forward, an automated method could be done as an optimization: take the base priority selector and create an intermediary object that only contains the user's applicable skills. This should speed up the AI. Extra work would involve creating/recreating that intermediary object at game creation time and when the skills are modified.

      Code:
      using System;
      using System.Linq;
      using Belphegor.Composites;
      using Belphegor.Dynamics;
      using Belphegor.Helpers;
      using Belphegor.Settings;
      using Zeta;
      using Zeta.Common.Helpers;
      using Zeta.CommonBot;
      using Zeta.Internals.Actors;
      using Zeta.TreeSharp;
      using Action = Zeta.TreeSharp.Action;
      namespace Belphegor.Routines
      {
          public class WitchDoctor
          {
      
              [Class(ActorClass.WitchDoctor)]
              [Behavior(BehaviorType.Buff)]
              public static Composite WitchDoctorBuff()
              {
                  return
                  new PrioritySelector(
                      Common.CreateWaitForAttack(),
                      Spell.Buff(SNOPower.Witchdoctor_Gargantuan, extra => !Unit.HasPet("Gargantuan")),
                      Spell.Buff(SNOPower.Witchdoctor_SummonZombieDog, extra => Unit.PetCount("WD_ZombieDog") < 3)
                  );
              }
      
              [Class(ActorClass.WitchDoctor)]
              [Behavior(BehaviorType.Combat)]
              public static Composite WitchDoctorCombat()
              {
                  return new PrioritySelector(ctx => CombatTargeting.Instance.FirstNpc,
                      new Decorator(ctx => ctx != null,
                          new PrioritySelector(
      
                          Common.CreateWaitWhileIncapacitated(),
                          Common.CreateWaitForAttack(),
                          Common.CreateUsePotion(),
      
                          // Make sure we are within range/line of sight of the unit.
      					new SelfCast(SNOPower.Witchdoctor_SpiritWalk), // faster run walk when possible
                          Movement.MoveTo(ctx => ((DiaUnit)ctx).Position, 30f),
                          //Movement.MoveToLineOfSight(ctx => (DiaUnit)ctx),
      
                          new SelfCast(SNOPower.Witchdoctor_SpiritWalk, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.4),
                          //new SelfCast(SNOPower.Witchdoctor_Sacrifice, extra => Unit.PetCount("WD_ZombieDog") > 1 && ZetaDia.Me.HitpointsCurrentPct <= BelphegorSettings.Instance.WitchDoctor.SacrificeHp),
      
                          //added to keep faster run walk up and/or vision quest up
      					new SelfCast(SNOPower.Witchdoctor_Horrify),
      					
      					//Pets
                          Spell.Buff(SNOPower.Witchdoctor_Gargantuan, extra => !Unit.HasPet("Gargantuan")),
                          Spell.Buff(SNOPower.Witchdoctor_SummonZombieDog, extra => Unit.PetCount("WD_ZombieDog") < 3),
                          //new SelfCast(SNOPower.Witchdoctor_Hex),
      
                          //new SelfCast(SNOPower.Witchdoctor_SoulHarvest, 
                          //    ctx => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 16f) >= 2
                          //        || (Unit.IsElite((DiaUnit)ctx, 16f))),
                          //new SelfCast(SNOPower.Witchdoctor_BigBadVoodoo, ctx => nearbycount >= 4 || Unit.IsElite((DiaUnit)ctx)),
                          //new SelfCast(SNOPower.Witchdoctor_FetishArmy, ctx => nearbycount >= 4 || Unit.IsElite((DiaUnit)ctx)),
                          new SelfCast(SNOPower.Witchdoctor_Horrify, extra => nearbycount >= 4),
                          //new CastOnUnit(SNOPower.Witchdoctor_MassConfusion, ctx => ((DiaUnit)ctx).ACDGuid, extra => nearbycount >= 3),
      
                          new CastOnUnit(SNOPower.Witchdoctor_GraspOfTheDead, ctx => ((DiaUnit)ctx).ACDGuid),
      
                          //new Decorator(ret => _acidTimer.IsFinished && PowerManager.CanCast(SNOPower.Witchdoctor_AcidCloud),
                          //    new Sequence(
                          //        new CastAtLocation(SNOPower.Witchdoctor_AcidCloud, ctx => ((DiaUnit)ctx).Position, 
                          //            ctx => Clusters.GetClusterCount(((DiaUnit)ctx), CombatTargeting.Instance.LastObjects, ClusterType.Radius, 18f) >= 3),
                          //        new Action(ret =>_acidTimer.Reset())
                          //        )),
      
                          //new CastAtLocation(SNOPower.Witchdoctor_Firebats, ctx => ((DiaUnit)ctx).Position, extra => ClusterCount >= 3),
                          //new CastAtLocation(SNOPower.Witchdoctor_WallOfZombies, ctx => ((DiaUnit)ctx).Position, extra => ClusterCount >= 3),
      
                          //new Decorator(ctx => _locustSwarmTimer.IsFinished && PowerManager.CanCast(SNOPower.Witchdoctor_Locust_Swarm) && ((DiaUnit)ctx).Distance < 16 &&
                          //    (Clusters.GetClusterCount((DiaUnit)ctx, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 20) >= 3 || Unit.IsElite((DiaUnit)ctx)),
                          //    new Sequence(
                          //        new CastOnUnit(SNOPower.Witchdoctor_Locust_Swarm, ctx => ((DiaUnit)ctx).ACDGuid),
                          //        new Action(ret => _locustSwarmTimer.Reset())
                          //        )),
      
                          //new Decorator(ret => _hauntTimer.IsFinished && PowerManager.CanCast(SNOPower.Witchdoctor_Haunt),
                          //    new Sequence(
                          //        new CastOnUnit(SNOPower.Witchdoctor_Haunt, ctx => ((DiaUnit)ctx).ACDGuid),
                          //        new Action(ret => _hauntTimer.Reset())
                          //        )),
      
      
      
                          //Other spells
                          //new CastOnUnit(SNOPower.Witchdoctor_SpiritBarrage, ctx => ((DiaUnit)ctx).ACDGuid),
                          //new CastOnUnit(SNOPower.Witchdoctor_ZombieCharger, ctx => ((DiaUnit)ctx).ACDGuid),
      
                          //Primary
                          //new CastAtLocation(SNOPower.Witchdoctor_PlagueOfToads, ctx => ((DiaUnit)ctx).Position),
                          //new CastAtLocation(SNOPower.Witchdoctor_CorpseSpider, ctx => ((DiaUnit)ctx).Position),
                          new CastOnUnit(SNOPower.Witchdoctor_Firebomb, ctx => ((DiaUnit)ctx).ACDGuid)
      					//,new CastOnUnit(SNOPower.Witchdoctor_PoisonDart, ctx => ((DiaUnit)ctx).ACDGuid)
                          )
                         ),
      
                         new Action(ret => RunStatus.Success)
                         );
              }
      
              #region timmers
              static WitchDoctor()
              {
                  GameEvents.OnGameLeft += OnGameLeft;
                  GameEvents.OnPlayerDied += OnGameLeft;
              }
      
              private static WaitTimer _acidTimer = new WaitTimer(TimeSpan.FromSeconds(5));
              private static WaitTimer _locustSwarmTimer = new WaitTimer(TimeSpan.FromSeconds(6));
              private static WaitTimer _hauntTimer = new WaitTimer(TimeSpan.FromSeconds(10));
              
      
              static void OnGameLeft(object sender, EventArgs e)
              {
                  _acidTimer.Stop();
                  _locustSwarmTimer.Stop();
                  _hauntTimer.Stop();
              }
              #endregion
      
              private static int ClusterCount
              {
                  get { return Clusters.GetClusterCount(CombatTargeting.Instance.FirstNpc, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 60f); }
              }
      
              private static int nearbycount { get { return Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 40f); } }
      
      
              public static void WitchDoctorOnLevelUp(object sender, EventArgs e)
              {
                  if (ZetaDia.Me.ActorClass != ActorClass.WitchDoctor)
                      return;
      
                  int myLevel = ZetaDia.Me.Level;
      
                  Logger.Write("Player leveled up, congrats! Your level is now: {0}",
                      myLevel
                      );
      
                  // Set Lashing tail kick once we reach level 2
                  if (myLevel == 2)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Witchdoctor_GraspOfTheDead, -1, 1);
                      Logger.Write("Setting Grasp of the Dead as Secondary");
                  }
      
                  // Set Dead reach it's better then Fists of thunder imo.
                  if (myLevel == 3)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Witchdoctor_CorpseSpider, -1, 0);
                      Logger.Write("Setting Grasp of the Dead as Secondary");
                  }
      
                  // Make sure we set binding flash, useful spell in crowded situations!
                  if (myLevel == 4)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Witchdoctor_SummonZombieDog, -1, 2);
                      Logger.Write("Setting Summon Zombie Dogs as Defensive");
                  }
      
                  // Make sure we set Dashing strike, very cool and useful spell great opener.
                  if (myLevel == 9)
                  {
                      ZetaDia.Me.SetActiveSkill(SNOPower.Witchdoctor_SoulHarvest, -1, 3);
                      Logger.Write("Setting Sould Harvest as Terror");
                  }
      
                  if (myLevel == 10)
                  {
                      ZetaDia.Me.SetTraits(SNOPower.Witchdoctor_Passive_JungleFortitude);
                  }
                  if (myLevel == 13)
                  {
                      ZetaDia.Me.SetTraits(SNOPower.Witchdoctor_Passive_SpiritualAttunement);
                  }
              }
          }
      }
      
       
      Last edited: Jul 16, 2012
    6. Nab

      Nab Member

      Joined:
      May 31, 2010
      Messages:
      381
      Likes Received:
      2
      Trophy Points:
      18
      Just throwing this out here: Is it in any way possible to make a modification/option to only kill rares and ignore everything else?
       
    7. Infernik

      Infernik Member

      Joined:
      Dec 23, 2010
      Messages:
      295
      Likes Received:
      3
      Trophy Points:
      18
      Sorry if it was posted already, but when I use DB with Monks Diablo client is having quite unpleasant lag spikes that lower farm and combat effictiveness.
       
    8. tesslerc

      tesslerc New Member

      Joined:
      Jun 27, 2012
      Messages:
      803
      Likes Received:
      9
      Trophy Points:
      0
      Using a demonhunter with grenades, he is throwing grenades in the wrong direction.
      No idea if its a belphegor problem or not, but it just stands with its back to the mob and throws grenades.
       
    9. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Many thanks have fixed internally hopefully will come with next build.
       
    10. Lightseeker

      Lightseeker New Member

      Joined:
      Mar 26, 2012
      Messages:
      96
      Likes Received:
      0
      Trophy Points:
      0
      I have a simple question. I'm not a C# programmer and not so familiar with Lambda Expressions. What I wanted to do is in the Monk.cs to check whether or not the mobs are elite and pass this as a parameter to the Mantra function. Something like this... But I get the following error: Cannot convert lambda expression to type 'bool' because it is not a delegate type. Would appreciate any help.

      //Buffs
      Mantra(ctx => (Unit.IsElite((DiaUnit)ctx, 10f))),
      .
      .
      .
      private static Composite Mantra(bool unitIsElit){...}
       
    11. Marinepiggott18

      Marinepiggott18 New Member

      Joined:
      Apr 30, 2012
      Messages:
      21
      Likes Received:
      0
      Trophy Points:
      1
      any way that for an barbarian if you can prioritise Battle Rage (into the fray) over Sprint (run like the wind) so we can benefit from the crit damage, increasing rage rather than sprinting first wasting rage please
       
    12. xasset

      xasset New Member

      Joined:
      Jan 15, 2010
      Messages:
      308
      Likes Received:
      4
      Trophy Points:
      0
      When can we see changes to Monk.cs - BoH/mantra buff at starting profile, tempest rush bug fix? or it's too hard to implement this changes?
       
    13. tesslerc

      tesslerc New Member

      Joined:
      Jun 27, 2012
      Messages:
      803
      Likes Received:
      9
      Trophy Points:
      0
      Barbarian - Wrath of the Berserker

      Uses this skill vs normal mobs.
      its an "elite" skill, has a very long cooldown and is very powerful - must be VS elites only or if you are very low on health against a simple mob.

      ---

      Tested with Earthquake - same same.
       
      Last edited: Jul 24, 2012
    14. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      In the version with the gui, you can change how many mobs before you use "Rage" skills.

      You could set it too 100 or something :)

      Tempest rush along with Rapid Fire and a few other channeled spells are bugged, I would honestly advise using something else.
       
      Last edited: Jul 24, 2012
    15. tesslerc

      tesslerc New Member

      Joined:
      Jun 27, 2012
      Messages:
      803
      Likes Received:
      9
      Trophy Points:
      0
      Whats the version with the gui? where do i get that?

      btw maybe its fixed there but i have leap with armour bonus, i think using that on "low" hp on a monster nearby is a must.
      if you get to low hp having 4sec of 300% armour bonus is a game changer.
       
    16. xasset

      xasset New Member

      Joined:
      Jan 15, 2010
      Messages:
      308
      Likes Received:
      4
      Trophy Points:
      0
      And what about function to buff BoH and mantra at start of profile run instead of having buffing during fight? For monks, who runs Sarkoth it will give additional +15% damage before starting fight with sarkoth and if to use avasion mantra it can give +5% movement speed/+15% dodge ; )
       
    17. Gardettos

      Gardettos New Member

      Joined:
      Jun 11, 2012
      Messages:
      522
      Likes Received:
      6
      Trophy Points:
      0
      Running this build very well in Generic but Belphegor is garbage with it simply because it refuses to cast more than 3 wicked winds at a time.
       
    18. ixon99

      ixon99 New Member

      Joined:
      Jul 20, 2012
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      Belphegor is really good for munk, but I have one problem, the munk (bot) it dosen?t hit the monsters so often. Espacially if he gets surrounded. Maybe 1 hit ever 2 sec. Is this a common fault? I have got a slightly increased attackspeed at 1.6 but that shouldent matter, right?
       
    19. jtljudoman

      jtljudoman New Member

      Joined:
      Jun 21, 2012
      Messages:
      14
      Likes Received:
      0
      Trophy Points:
      0
      I thought of a way to improve melee combat with fleeing mobs.

      The main current problem is that the mob running away runs away... So you catch up then pause then run after it more. This is highly inefficient and results in you doing no damage to the mob for the majority of the time that it is running away from you.

      I propose the following solution - Make the bot "shift" attack the mob a few times once the distance gets small enough. So say you're chasing a treasure goblin you run up and that split second when the bot would normally pause then re-initiate the chase is now turned into 2 possibly 3 attacks depending on your weapon speed. Perhaps have it re-initiate the chase after the mob reached a certain distance away.

      Love your work! Cheers.
       
    20. Lightseeker

      Lightseeker New Member

      Joined:
      Mar 26, 2012
      Messages:
      96
      Likes Received:
      0
      Trophy Points:
      0
      Could you please provide a code example of how to use Unit.IsElite within the function; private static Composite Mantra() in Monk.cs, pretty pls?
       

    Share This Page